Re: shell execution produces "couldn't flush stdout" error

2017-03-02 Thread jjackson
I'm seeing something similar whenever I try to use pipes in a jenkins 
pipeline sh .  I've asked a similar question on SO 
http://stackoverflow.com/questions/42568201/jenkins-pipeline-sh-does-not-seem-to-respect-pipe-in-shell-command.
 
 I can't seem to get piped shell commands to work, which seriously limits 
the power of what you can do.

On Wednesday, September 4, 2013 at 1:30:04 AM UTC-7, Matthias wrote:
>
> Hello,
>
> when using pipes in shell scripts I often get the error mentioned in the 
> subject line.
>
> To reproduce the issue add an "execute shell" build step to a new job and 
> run the following:
>
> echo replace e by a | sed 's_e_a_g' | echo done
>
> This might not make much sense - but it generates the error "couldn't 
> flush stdout" while this does not happen when executing the same in a 
> terminal.
>
>
> The jenkins console output produces:
>
>
> [EnvInject] - Loading node environment variables.
> Building on master in workspace 
> /home/jenkins/build-server/jobs/test.sed/workspace
> [workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
> + echo replace e by a
> + echo done
> done
> + sed s_e_a_g
> sed: couldn't flush stdout: Broken pipe
> Finished: SUCCESS
>
>
>
> best regards,
> Matthias
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6adccbf8-8e20-4ea8-a128-85fb5315e46c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: shell execution produces "couldn't flush stdout" error

2017-03-02 Thread jjackson
I'm seeing something similar whenever I try to use pipes in a jenkins 
pipeline sh .  I've asked a similar question on 
SO 
http://stackoverflow.com/questions/42568201/jenkins-pipeline-sh-does-not-seem-to-respect-pipe-in-shell-command.
 
 I can't seem to get piped shell commands to work, which seriously limits 
the power of what you can do.

On Wednesday, September 4, 2013 at 1:30:04 AM UTC-7, Matthias wrote:
>
> Hello,
>
> when using pipes in shell scripts I often get the error mentioned in the 
> subject line.
>
> To reproduce the issue add an "execute shell" build step to a new job and 
> run the following:
>
> echo replace e by a | sed 's_e_a_g' | echo done
>
> This might not make much sense - but it generates the error "couldn't 
> flush stdout" while this does not happen when executing the same in a 
> terminal.
>
>
> The jenkins console output produces:
>
>
> [EnvInject] - Loading node environment variables.
> Building on master in workspace 
> /home/jenkins/build-server/jobs/test.sed/workspace
> [workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
> + echo replace e by a
> + echo done
> done
> + sed s_e_a_g
> sed: couldn't flush stdout: Broken pipe
> Finished: SUCCESS
>
>
>
> best regards,
> Matthias
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fad799a7-7693-46dd-8efb-4e0fbf6789d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: shell execution produces couldn't flush stdout error

2013-09-09 Thread John Russell
Try adding a noop command after the pipeline. When I run that locally, done
is printed long before it exits. Its possible sed is still running when
jenkins tries to exit the script.


On Sun, Sep 8, 2013 at 3:32 PM, Matthias matthias.w...@gmail.com wrote:

 Hello,

 thank you for the suggestion - but I already tried that but it didn't
 change the behaviour.



 On Thursday, September 5, 2013 8:52:54 PM UTC+2, John Russell wrote:

 I find I have much better luck in Execute shell build steps if I put

 #!/bin/bash at the top.

 It tends to make the behavior much more consistent. YMMV

 On Wednesday, September 4, 2013 4:30:04 AM UTC-4, Matthias wrote:

 Hello,

 when using pipes in shell scripts I often get the error mentioned in the
 subject line.

 To reproduce the issue add an execute shell build step to a new job
 and run the following:

 echo replace e by a | sed 's_e_a_g' | echo done

 This might not make much sense - but it generates the error couldn't
 flush stdout while this does not happen when executing the same in a
 terminal.


 The jenkins console output produces:


 [EnvInject] - Loading node environment variables.
 Building on master in workspace 
 /home/jenkins/build-server/**jobs/test.sed/workspace
 [workspace] $ /bin/sh -xe /tmp/**hudson7236481234921041257.sh
 + echo replace e by a
 + echo done
 done
 + sed s_e_a_g
 sed: couldn't flush stdout: Broken pipe
 Finished: SUCCESS



 best regards,
 Matthias

  --
 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/niSVMnTTjz8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: shell execution produces couldn't flush stdout error

2013-09-08 Thread Matthias
Hello,

thank you for the suggestion - but I already tried that but it didn't 
change the behaviour.


On Thursday, September 5, 2013 8:52:54 PM UTC+2, John Russell wrote:

 I find I have much better luck in Execute shell build steps if I put

 #!/bin/bash at the top.

 It tends to make the behavior much more consistent. YMMV

 On Wednesday, September 4, 2013 4:30:04 AM UTC-4, Matthias wrote:

 Hello,

 when using pipes in shell scripts I often get the error mentioned in the 
 subject line.

 To reproduce the issue add an execute shell build step to a new job and 
 run the following:

 echo replace e by a | sed 's_e_a_g' | echo done

 This might not make much sense - but it generates the error couldn't 
 flush stdout while this does not happen when executing the same in a 
 terminal.


 The jenkins console output produces:


 [EnvInject] - Loading node environment variables.
 Building on master in workspace 
 /home/jenkins/build-server/jobs/test.sed/workspace
 [workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
 + echo replace e by a
 + echo done
 done
 + sed s_e_a_g
 sed: couldn't flush stdout: Broken pipe
 Finished: SUCCESS



 best regards,
 Matthias



-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: shell execution produces couldn't flush stdout error

2013-09-05 Thread John Russell
I find I have much better luck in Execute shell build steps if I put

#!/bin/bash at the top.

It tends to make the behavior much more consistent. YMMV

On Wednesday, September 4, 2013 4:30:04 AM UTC-4, Matthias wrote:

 Hello,

 when using pipes in shell scripts I often get the error mentioned in the 
 subject line.

 To reproduce the issue add an execute shell build step to a new job and 
 run the following:

 echo replace e by a | sed 's_e_a_g' | echo done

 This might not make much sense - but it generates the error couldn't 
 flush stdout while this does not happen when executing the same in a 
 terminal.


 The jenkins console output produces:


 [EnvInject] - Loading node environment variables.
 Building on master in workspace 
 /home/jenkins/build-server/jobs/test.sed/workspace
 [workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
 + echo replace e by a
 + echo done
 done
 + sed s_e_a_g
 sed: couldn't flush stdout: Broken pipe
 Finished: SUCCESS



 best regards,
 Matthias


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


shell execution produces couldn't flush stdout error

2013-09-04 Thread Matthias
Hello,

when using pipes in shell scripts I often get the error mentioned in the 
subject line.

To reproduce the issue add an execute shell build step to a new job and 
run the following:

echo replace e by a | sed 's_e_a_g' | echo done

This might not make much sense - but it generates the error couldn't flush 
stdout while this does not happen when executing the same in a terminal.


The jenkins console output produces:


[EnvInject] - Loading node environment variables.
Building on master in workspace 
/home/jenkins/build-server/jobs/test.sed/workspace
[workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
+ echo replace e by a
+ echo done
done
+ sed s_e_a_g
sed: couldn't flush stdout: Broken pipe
Finished: SUCCESS



best regards,
Matthias

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.