ERROR: exec: /usr/bin/java/bin/java: cannot execute: Not a directory

195 views
Skip to first unread message

Jagadeesh YENNE

unread,
Jun 16, 2020, 1:41:01 PM6/16/20
to Jenkins Users
Hi All,

While I am running sonar-scanner job, I am getting below error, could someone suggest me how to proceed on it.
[MFT-Frontend-CI-Dev-UpdatedNode] $ /bin/bash /tmp/jenkins1683394883835788984.sh Running Sonar > market-foreca...@0.0.0 sonar /mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend > sonar-scanner /mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: /usr/bin/java/bin/java: Not a directory /mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: exec: /usr/bin/java/bin/java: cannot execute: Not a directory npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! market-foreca...@0.0.0 sonar: `sonar-scanner` npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the market-foreca...@0.0.0 sonar script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /mnt/block_device/jenkins1/.npm/_logs/2020-06-05T18_00_28_687Z-debug.log Build step 'Execute shell' marked build as failure Finished: FAILURE

Regards,
Jagadeesh

Antonio Gomez

unread,
Jun 17, 2020, 2:42:23 AM6/17/20
to jenkins...@googlegroups.com
Hello,
In global tools configuration check in JDK instalations if java path is correct.
Check also $PATH from user that run this jobs

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f590f5dc-69ab-4267-a163-3a3d87480be0o%40googlegroups.com.

Jagadeesh Yenne

unread,
Jun 17, 2020, 8:45:22 AM6/17/20
to Jenkins Users
Our slave nodes are being used by 2(old & new) master servers, Jenkins job is successful when we trigger the build from old server (with jenkins user ) but failed with new jenkins master (with jenkins1 user)

I have checked java path and the user path both looks good.

The below query is another query
======================
We are trying to upgrade our production jenkins server but afraid of if something goes wrong, could you suggest the best way to do this.

Regards,
Jagadeesh


On Wednesday, June 17, 2020 at 12:12:23 PM UTC+5:30, Antonio Gomez wrote:
Hello,
In global tools configuration check in JDK instalations if java path is correct.
Check also $PATH from user that run this jobs

El mar., 16 jun. 2020 a las 19:41, Jagadeesh YENNE (<yennek...@gmail.com>) escribió:
Hi All,

While I am running sonar-scanner job, I am getting below error, could someone suggest me how to proceed on it.
[MFT-Frontend-CI-Dev-UpdatedNode] $ /bin/bash /tmp/
jenkins1683394883835788984.sh
Running Sonar

> market-forecaster-frontend@0.0.0 sonar /mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend
> sonar-scanner

/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: /usr/bin/java/bin/java: Not a directory
/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: exec: /usr/bin/java/bin/java: cannot execute: Not a directory
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! market-forecaster-frontend@0.0.0 sonar: `sonar-scanner`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the market-forecaster-frontend@0.0.0 sonar script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /mnt/block_device/jenkins1/.npm/_logs/2020-06-05T18_00_28_687Z-debug.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Regards,
Jagadeesh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

chencho m-a

unread,
Jun 17, 2020, 8:53:18 AM6/17/20
to Jenkins Users
The error says that java is not a directory. Maybe you have your classpath pointing to binary instead of the directory


El martes, 16 de junio de 2020, 19:41:01 (UTC+2), Jagadeesh YENNE escribió:
Hi All,

While I am running sonar-scanner job, I am getting below error, could someone suggest me how to proceed on it.
[MFT-Frontend-CI-Dev-UpdatedNode] $ /bin/bash /tmp/
jenkins1683394883835788984.sh
Running Sonar

> market-forecaster-frontend@0.0.0 sonar /mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend
> sonar-scanner

/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: /usr/bin/java/bin/java: Not a directory
/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: exec: /usr/bin/java/bin/java: cannot execute: Not a directory
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! market-forecaster-frontend@0.0.0 sonar: `sonar-scanner`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the market-forecaster-frontend@0.0.0 sonar script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /mnt/block_device/jenkins1/.npm/_logs/2020-06-05T18_00_28_687Z-debug.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Regards,
Jagadeesh

Dirk Heinrichs

unread,
Jun 17, 2020, 8:56:09 AM6/17/20
to jenkins...@googlegroups.com
Am Dienstag, den 16.06.2020, 07:35 -0700 schrieb Jagadeesh YENNE:

/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: /usr/bin/java/bin/java: Not a directory
/mnt/block_device/jenkins1/workspace/MFT-Frontend/MFT-Frontend-CI-Dev-UpdatedNode/mft-frontend/node_modules/sonar-scanner/bin/sonar-scanner: line 59: exec: /usr/bin/java/bin/java: cannot execute: Not a directory

Maybe your $JAVA_HOME is wrong? To verify, add an "execute shell" step to your job which executes an "echo $JAVA_HOME" command.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
signature.asc
Reply all
Reply to author
Forward
0 new messages