Comments (8)
It looks as though the server thinks the client has disconnected. Try running it as com.martiansoftware.nailgun.NGServer address:port timeout
with a timeout of 100000 (100 seconds) and make sure you're using the latest nailgun client as well as the server as old clients won't send heartbeats and so will cause timeouts.
from nailgun.
I don't see a timeout in that case:
NGServer 0.9.2-SNAPSHOT started on 127.0.0.1, port 2113.
NGSession 1: 127.0.0.1: edu.harvard.hul.ois.fits.Fits exited with status 0
However, the ng
client still exits 227. Both client and server are up to date.
from nailgun.
Can you run the client in a debugger and see what the stack trace is when it calls handleSocketClose
?
from nailgun.
I'm not super familiar with C debugging, so let me know if I did something wrong.
I set a breakpoint at handleSocketClose
in lldb and printed a stack trace, with this result:
* thread #1: tid = 0x169ac4, 0x0000000100001820 ng`handleSocketClose, queue = 'com.apple.main-thread, stop reason = breakpoint 2.1
frame #0: 0x0000000100001820 ng`handleSocketClose
ng`handleSocketClose:
-> 0x100001820: pushq %rbp
0x100001821: movq %rsp, %rbp
0x100001824: movl $227, %edi
0x100001829: callq 0x1000015a0 ; cleanUpAndExit
* thread #1: tid = 0x169ac4, 0x0000000100001820 ng`handleSocketClose, queue = 'com.apple.main-thread, stop reason = breakpoint 2.1
frame #0: 0x0000000100001820 ng`handleSocketClose
frame #1: 0x0000000100001d74 ng`processnailgunstream + 484
frame #2: 0x00000001000025d5 ng`main + 1349
frame #3: 0x00007fff89e665fd libdyld.dylib`start + 1
from nailgun.
gdb trace (from my Linux box, same issue), for the heck of it:
Breakpoint 1, handleSocketClose () at nailgun-client/ng.c:284
284 void handleSocketClose() {
#0 handleSocketClose () at nailgun-client/ng.c:284
#1 0x00000000004018d5 in recvToBuffer (len=5) at nailgun-client/ng.c:336
#2 processnailgunstream () at nailgun-client/ng.c:525
#3 0x00000000004010f7 in main (argc=4, argv=<optimized out>, env=0x7fffffffe270) at nailgun-client/ng.c:801
Seems to be a bit more informative.
from nailgun.
I am also facing the same issue, but with google closure compiler.
I was also able to reproduce the issue with this change in the example.Exit:
--- 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:
vhristov@71981b7
which I am not sure if it is a fix or a hack.
from nailgun.
I think it's a fix. Does it work for you @mistydemeo ?
from nailgun.
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)
from nailgun.
Related Issues (20)
- How to properly terminate the nail? HOT 2
- Overhead of SecurityManager HOT 17
- Publish nailgun to maven central HOT 2
- ng.py crashes in a cygwin environment when trying to reference Kernel32 dll
- Problem with nested connections to a unix domain socket HOT 2
- Publish 0.9.3 artifacts to a public repository HOT 2
- Nailgun server crashes HOT 8
- NGServer or ng client changes path delimiters on output HOT 2
- Documentation is lacking HOT 2
- Running `mvn package` fails with JavaDoc errors HOT 1
- Support Java versions greater than 8?
- Run nailgun without classpath as code comes on the fly HOT 1
- JDK 11/12 Support HOT 2
- Remove / tone down the scary 'NOT MAINTAINED' header
- Server's sockets are not shut down in an orderly fashion; sending heartbeats can occasionally fail HOT 1
- Release? HOT 1
- Unused value
- Make error HOT 1
- still mantained? HOT 2
- Mirroring policy breaks repositories HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nailgun.