This content has been marked as final. Show 6 replies
Use "suspend=y" option. This option suspends the running java process until it is connected by a debugger.
If this does not work let us know.
Thanks - I tried this previously and it didn't seem to make a difference. Also, even if suspend=n, shouldn't the port stay open as long as the app is running?
True. If app running port should be open.
Try different port number.
Check the stack trace of debugger thread. Use -m option with jstack to see the stack trace of debugger thread.
I tried again this morning and using suspend=y does help somewhat. The port stays open and I'm able to connect to it, but only for an instant. Once I do, my debugger immediately says "terminated", but netstat shows that there was a connection (TIME_WAIT instead of LISTENING). Any way I can find out why its disconnecting?
Did you try changing the port number? There might be another app trying to write to the port you are using it. Just a wild guess.
What platform you are running it on? (windows/solaris/linux)?
I suspect network issue. If you are using solaris os then you can use truss command and trace system call. This might give
some hint what is happening. Also I suggested to take a look at the stack trace of the thread which is listening on port.
Thanks for the help. This turned out to be stupid command line procesing on my part, but I appreciate it anyway.