sh pipeline step started to fail after update to 2.42

2,038 views
Skip to first unread message

Rinaldo DiGiorgio

unread,
Jan 25, 2017, 5:30:07 PM1/25/17
to Jenkins Users
The following code was working with 2.41 ( maybe it was 2.40 )

node("master") {
   sh 'ls'
}


I get the following error

Running on master in /scratch/mach5-j/jenkins/jobs/sh issue/workspace
[Pipeline] {
[Pipeline] sh
[workspace] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE

Rainer Frey

unread,
Jan 26, 2017, 6:07:52 AM1/26/17
to Jenkins Users
I have exacttly the same problem. I also upgraded all the Pipeline plugins the the newest versions. 

Rinaldo DiGiorgio

unread,
Jan 26, 2017, 7:21:26 AM1/26/17
to jenkins...@googlegroups.com
The lack of exception information or any textual indication as to the component that failed is another issue. How is one supposed to figure out what to downgrade. Here we are two days into it and we still can’t fix it without extensive trial and error. Where is the sh step defined.  Having an Opengrok of jenkins updated all the time would help.  Maybe I can donate that.


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/LN057YL_Xis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af357237-e767-422f-83b8-a92df2460087%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Beck

unread,
Jan 26, 2017, 8:57:25 AM1/26/17
to jenkins...@googlegroups.com

> On 25.01.2017, at 23:30, Rinaldo DiGiorgio <digital...@gmail.com> wrote:
>
> nohup: failed to run command ‘sh’: No such file or directory

Could this be https://issues.jenkins-ci.org/browse/JENKINS-41339 ?

Rinaldo DiGiorgio

unread,
Jan 26, 2017, 9:00:41 AM1/26/17
to Jenkins Users
I downgraded the following plugins, jenkins claimed that i did not need to restart so I didn't and tested each individually, the code below still failed. So I rebooted at the end and it worked so another bug.  I am not sure if one or more than one need to be downgraded. Some of the downgrades may not be needed.

This failure may indicates that there is very basic test missing from Jenkins CI. If I could find the code I would look to see where the test to verify that sh works on some set of target platforms.

Rinaldo DiGiorgio

unread,
Jan 26, 2017, 9:02:50 AM1/26/17
to Jenkins Users, m...@beckweb.net
Yes that is what the issue is -- thank you.

I have provided some information about downgrading -- however I have not run a full system test that will prove that it works on OSX, Linux, Sparc and windows -- If It does I will reply back.

John Mellor

unread,
Feb 10, 2017, 3:40:50 PM2/10/17
to Jenkins Users
Looking at your pipeline plugin version numbers, I assume that you are on Jenkins2.
I'm on Jenkins 1.656 and have been unable to move up to the exact pipeline plugin version numbers that you used.
However, I have the same problem, and unfortunately reverting to the previous version has not fixed the issue.
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Fetch Dependencies)
[Pipeline] deleteDir
[Pipeline] sh
[cb-automation-pipeline] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
[Pipeline] echo
No need to clear known_hosts.
[Pipeline] sh
[cb-automation-pipeline] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
[Pipeline] }
Now what?  All pipelines a inoperable at this point.

Daniel Beck

unread,
Feb 10, 2017, 5:08:25 PM2/10/17
to jenkins...@googlegroups.com

> On 10.02.2017, at 21:40, John Mellor <john....@gmail.com> wrote:
>
> Now what? All pipelines a inoperable at this point.

I linked to JENKINS-41339 earlier, which mentions solutions in the comments.

John Mellor

unread,
Feb 11, 2017, 11:22:35 AM2/11/17
to Jenkins Users, m...@beckweb.net
After downgrading the durable tasks pluginto fix this problem, a manual reboot is required to actually get pipelines functional again.  Thanks, Daniel !

Nico S

unread,
Feb 13, 2017, 2:04:01 PM2/13/17
to Jenkins Users, m...@beckweb.net
Hi Guys!

Thanks for shared the solutions! I was in the same.

Do you know why JENKINS-41339 is close as resolved if the problem is there?

Thanks again,
Nico.
Reply all
Reply to author
Forward
0 new messages