-
Notifications
You must be signed in to change notification settings - Fork 136
nailgun client exits 227 (NAILGUN_CONNECTION_BROKEN) after successful exit #23
Comments
It looks as though the server thinks the client has disconnected. Try running it as |
I don't see a timeout in that case:
However, the |
Can you run the client in a debugger and see what the stack trace is when it calls |
I'm not super familiar with C debugging, so let me know if I did something wrong. I set a breakpoint at
|
gdb trace (from my Linux box, same issue), for the heck of it:
Seems to be a bit more informative. |
I am also facing the same issue, but with google closure compiler. --- a/nailgun-examples/src/main/java/com/martiansoftware/nailgun/examples/Exit.java +++ b/nailgun-examples/src/main/java/com/martiansoftware/nailgun/examples/Exit.java @@ -27,7 +27,10 @@ public class Exit { exitCode = Integer.parseInt(args[0]); } catch (Exception e) {} } + System.out.close(); System.exit(exitCode); } It seems that closing either the stdout or stderr results in communication lost to the ng client (in ng.c recv returns either 0, or -1 with errno = 104 (connection reset by peer). I was able to run google closure compiler and the modified test with this change: |
I think it's a fix. Does it work for you @mistydemeo ? |
From a quick test it seems FITS is also closing stdout. With this vhristov@36733dd: $ ~/test/nailgun/ng edu.harvard.hul.ois.fits.Fits -i ~/test/fits-0.8.0/fits.sh ... (some xml output) $ echo $? 0 Without: $ ~/test/nailgun/ng edu.harvard.hul.ois.fits.Fits -i ~/test/fits-0.8.0/fits.sh ... $ echo $? 227 Tested on Ubuntu 12.04 with Oracle Java 7 (1.7.0_51) |
I'm trying to run the Java CLI program FITS via its
fits-ngserver.sh
nailgun server launcher. On any successful invocation, theng
nailgun client always exits 227, e.g.NAILGUN_CONNECTION_BROKEN
, even though the nailgun server log reports the command exiting 0. Running it directly viajava
exits 0 as expected.When testing from the latest 0.9.2 commit, I noticed the same command shows up in the server log twice, which might provide some useful information:
I've tested with 0.7.1, 0.9.1, and the latest commit from the master branch, on Ubuntu and Mac OS X.
The text was updated successfully, but these errors were encountered: