Debugging a remote java process

Hi,

From IntelliJ IDEA Ultimate 9.0.3 running on Windows 7 I am trying to remotely connect and debug a very simple JDK 1.6 program I am running in a JVM on a remote Linux server (it's a virtual machine)

In Intellij I add the Run > Edit Config :
I put in the server name (fully qualified or just hostname or IP Address) and it shows the following config
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

On the server (a Linux virtual machine), I run the following command
  java -cp . -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 com.mycompany.test.App
And it says Listening for transport dt_socket at address: 5005

Then when I try to run Debug in intellij I get:
Error running myserver: Unable to open debugger port : java.net.ConnectException "Connection timed out: connect"

When I query the server's 5005 port from the windows machine (on which I am running IntelliJ) I get:
c:\> portqry -n myserver -p both -e 5005
Querying target system called:
  myserver
Attempting to resolve name to IP address...
Name resolved to 10.1.58.58
TCP port 5005 (unknown service): FILTERED
UDP port 5005 (unknown service): LISTENING or FILTERED

Is there more I need to do to remotely debug a simple java process? Or does this look more like a network configuration issue? If it is a network / VM config issue, how could I troubleshoot that?

Thanks very much.

2 comments

For me, this has almost always meant that a firewall was blocking access...

0

Thank you. Yes it was just a matter of opening some ports on the remote host.

0

Please sign in to leave a comment.