Suse 11 : Java remote debug can't connect properly

I know this is bit of a Java question, but I feel its more of a network issue.

I have a Suse 11 server that I'd put a simple java program on, I start it up with debug options. Just like I do on any other XP/Win7/Ubuntu machine.

With this Suse11 on VM hardware, I can't get the socket to connect. Some times is does connect, but then its like I never receive any packets.

I'm stumped as to why, there is another Suse11 VM that I can connect to and its fine. I can't see any differences between them (Expect they are on different subnets, although I've been assured by the Network dept that this makes no difference)

Can anyone give me some advice, or things that I can check.

Thanks Jeff


It appears that Websphere 7 / JDK 1.6 requires the port to be set to "0.0.0.0:7777" not just "7777". This allows the port to be open outside the current machine.

This has now solved my problem.

Thanks for all the help.

Jeff Porter


By default Sles Linux does not expose a port outside the box.

So by setting the debug port in WS to 7777 via the webpage(IBM/console) only exposes the port internally to the box. To expose it you need to enter “0.0.0.0:7777”, but the web page does not allow this as a value.

So to change it by hand go to this file on the box...

/opt/IBM/WebSphere/AppServer/profiles/WRSProfile/config/cells/WRSNodeCell/nodes/WRSNode/servers/server1/server.xml

Then replace 7777 with 0.0.0.0:7777 in the file. (there are 3 places to change this in the file)

 <services xmi:type="debugservice:DebugService" 
 xmi:id="DebugService_1331818723840" enable="true" 
 jvmDebugPort="0.0.0.0:7777" 
 jvmDebugArgs="-agentlib:jdwp=transport=dt_socket,
 server=y,suspend=n,
 address=0.0.0.0:7777" 
 BSFDebugPort="4444" BSFLoggingLevel="0"/>
...
 <jvmEntries xmi:id="JavaVirtualMachine_1183122130078" 
 verboseModeClass="false" verboseModeGarbageCollection="false" 
 verboseModeJNI="false" maximumHeapSize="1024" runHProf="false" 
 hprofArguments="" debugMode="true" 
 debugArgs="-agentlib:jdwp=transport=dt_socket,
 server=y,suspend=n,
 address=0.0.0.0:7777" 
 genericJvmArguments="">

Then stop and start the server.

/opt/IBM/WebSphere/AppServer/bin # ./stopServer.sh server1

..

/opt/IBM/WebSphere/AppServer/bin # ./startServer.sh server1

You can now connect a debugger to the machine!