Quantcast

Jenkins Sonar Plugin Fails to work on a Slave node

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jenkins Sonar Plugin Fails to work on a Slave node

krishna chaitanya kurnala
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

Patroklos Papapetrou
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

krishna chaitanya kurnala
Hello Patroklos

As i have mentioned, i can go to the workspace and execute the maven command which will run fine. Not sure, if it is a maven issue. Also, the same Build succeeds on our Jenkins Master Server but fails on all Slave Nodes.

Wondering, if there is a Slave configuration for Sonar plugin or something.

Thanks,
Krishna Chaitanya


On Tue, Jul 10, 2012 at 1:23 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

Ann Campbell
If you can run maven from the workspace on the slave but Jenkins cannot, then it's likely a $PATH issue - mvn is in your path but not in jenkins'.

You should be able to config build that echos $PATH (or %PATH%) to verify.



On Tue, Jul 10, 2012 at 11:29 AM, krishna chaitanya kurnala <[hidden email]> wrote:
Hello Patroklos

As i have mentioned, i can go to the workspace and execute the maven command which will run fine. Not sure, if it is a maven issue. Also, the same Build succeeds on our Jenkins Master Server but fails on all Slave Nodes.

Wondering, if there is a Slave configuration for Sonar plugin or something.

Thanks,
Krishna Chaitanya


On Tue, Jul 10, 2012 at 1:23 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

Patroklos Papapetrou
Maybe Jenkins uses another user to access maven that has different access priviliges than you.
I still believe that this is not a Sonar issue (at least known). Configuring Sonar in a Jenkins Slave Node is the same as in a Master Server.

Regards
Patroklos

2012/7/10 Ann Campbell <[hidden email]>
If you can run maven from the workspace on the slave but Jenkins cannot, then it's likely a $PATH issue - mvn is in your path but not in jenkins'.

You should be able to config build that echos $PATH (or %PATH%) to verify.



On Tue, Jul 10, 2012 at 11:29 AM, krishna chaitanya kurnala <[hidden email]> wrote:
Hello Patroklos

As i have mentioned, i can go to the workspace and execute the maven command which will run fine. Not sure, if it is a maven issue. Also, the same Build succeeds on our Jenkins Master Server but fails on all Slave Nodes.

Wondering, if there is a Slave configuration for Sonar plugin or something.

Thanks,
Krishna Chaitanya


On Tue, Jul 10, 2012 at 1:23 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

krishna chaitanya kurnala
Hello All 

I am still facing this issue. I have verified the Maven $PATH on Master and Slaves are same:

I added the command echo $PATH before the build commences.

I am still facing the issue, can you please throw some ideas?
Master
echo /usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/bin:/home/iorlov/apache-maven-3.0.4/bin

Slave
[Services-Client-Sonar] $ /bin/sh -xe /tmp/hudson3958915402151014871.sh
+ echo /home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/jdk1.6.0_25/bin:/home/jenkinspan/apache-tomcat-7.0.28/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/git-1.7.9.6:/usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/export/home/jenkinspan/bin:/home/jenkinspan/perl5/bin:/home/jenkinspan/apache-tomcat-7.0.28/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/git-1.7.9.6:/usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/export/home/jenkinspan/bin:/home/jenkinspan/perl5/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/export/home/jenkinspan/bin

Thanks
Krishna Chaitanya


On Tue, Jul 10, 2012 at 10:44 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Maybe Jenkins uses another user to access maven that has different access priviliges than you.
I still believe that this is not a Sonar issue (at least known). Configuring Sonar in a Jenkins Slave Node is the same as in a Master Server.
2012/7/10 Ann Campbell <[hidden email]>
If you can run maven from the workspace on the slave but Jenkins cannot, then it's likely a $PATH issue - mvn is in your path but not in jenkins'.

You should be able to config build that echos $PATH (or %PATH%) to verify.



On Tue, Jul 10, 2012 at 11:29 AM, krishna chaitanya kurnala <[hidden email]> wrote:
Hello Patroklos

As i have mentioned, i can go to the workspace and execute the maven command which will run fine. Not sure, if it is a maven issue. Also, the same Build succeeds on our Jenkins Master Server but fails on all Slave Nodes.

Wondering, if there is a Slave configuration for Sonar plugin or something.

Thanks,
Krishna Chaitanya


On Tue, Jul 10, 2012 at 1:23 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

Freddy Mallet
Hi Krishna,

As Patroklos said, a possible explanation is that the user used to run the Jenkins slave doesn't have the required permissions to launch the "mvn" command.

Kind regards,
Freddy

-----
Sonar for Continuous Inspection



On Sun, Jul 15, 2012 at 3:39 AM, krishna chaitanya kurnala <[hidden email]> wrote:
Hello All 

I am still facing this issue. I have verified the Maven $PATH on Master and Slaves are same:

I added the command echo $PATH before the build commences.

I am still facing the issue, can you please throw some ideas?
Master
echo /usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/bin:/home/iorlov/apache-maven-3.0.4/bin

Slave
[Services-Client-Sonar] $ /bin/sh -xe /tmp/hudson3958915402151014871.sh
+ echo /home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/jdk1.6.0_25/bin:/home/jenkinspan/apache-tomcat-7.0.28/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/git-1.7.9.6:/usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/export/home/jenkinspan/bin:/home/jenkinspan/perl5/bin:/home/jenkinspan/apache-tomcat-7.0.28/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/home/jenkinspan/apache-ant-1.8.3/bin:/home/jenkinspan/git-1.7.9.6:/usr/local/apache-ant-1.8.2/bin:/home/iorlov/jdk1.6.0_25/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/iorlov/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/export/home/jenkinspan/bin:/home/jenkinspan/perl5/bin:/home/jenkinspan/apache-maven-3.0.4/bin:/export/home/jenkinspan/bin

Thanks
Krishna Chaitanya



On Tue, Jul 10, 2012 at 10:44 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Maybe Jenkins uses another user to access maven that has different access priviliges than you.
I still believe that this is not a Sonar issue (at least known). Configuring Sonar in a Jenkins Slave Node is the same as in a Master Server.
2012/7/10 Ann Campbell <[hidden email]>
If you can run maven from the workspace on the slave but Jenkins cannot, then it's likely a $PATH issue - mvn is in your path but not in jenkins'.

You should be able to config build that echos $PATH (or %PATH%) to verify.



On Tue, Jul 10, 2012 at 11:29 AM, krishna chaitanya kurnala <[hidden email]> wrote:
Hello Patroklos

As i have mentioned, i can go to the workspace and execute the maven command which will run fine. Not sure, if it is a maven issue. Also, the same Build succeeds on our Jenkins Master Server but fails on all Slave Nodes.

Wondering, if there is a Slave configuration for Sonar plugin or something.

Thanks,
Krishna Chaitanya


On Tue, Jul 10, 2012 at 1:23 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Krishna  

From the log file, it's pretty obvious that the message has nothing to do with Sonar.
It seems that you don't have access to run Maven executable. 

java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied

 Regards

2012/7/10 krishna chaitanya kurnala <[hidden email]>
Hello All

I am encountering below exception when I try to run a build on one of our Jenkins Slaves, the same Job succeeds if i tie  it to our Jenkins Master or If I execute the Mvn sonar Command(in Bold below) from the cehcked-out workspace on slave node. Please Advise what I can do to fix this.

[Services-Address] $ mvn -f /home/jenkinspan/workspace/Services-Address/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://10.242.193.136:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ******** ******** -Dsonar.host.url=http://10.242.195.243:9000/
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/jenkinspan/workspace/Services-Address"): java.io.IOException: error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:287)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Email was triggered for: Failure

Thanks,
Krishna Chaitanya





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jenkins Sonar Plugin Fails to work on a Slave node

trumpets
This post has NOT been accepted by the mailing list yet.
In reply to this post by krishna chaitanya kurnala
Hi All,

I've encountered the same problem today and maybe I can explain ti better.

We have a Jenkins master node and a slave node. Everything is configured fine and the build is set to run on the slave node always. After the build is done, Sonar is invoked with the maven command on the master pom, however, the path (location of master pom.xml) sent to the mvn command is actually on the slave node because the project has been built on the slave Jenkins node.

For some reason, the Jenkins Sonar plug-in does not respect the fact the project has been built on the slave node and it is trying to execute the command on the master node. In my case at least it has nothing to do with permission.

Now if someone can shed some light on how to tell the Jenkins Sonar plug-in to run the command on the slave, that would be great :)

Thanks all!

p.s. Patroklos, it's Ivo from CSD at City ;)
Loading...