title: java remote debugging Tomcat app: Why does the JVM not listen?
body: <p>I want to remote debug an application running in Tomcat 7. Tomcat is running as a service on a Win2008 server.
  I added the following to the Java options in the Java Configuration Panel of Tomcat:
  <code>-Xdebug -Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n</code> and opened the firewall on my workstation and the server for this port.
  But when I try debugging from IntelliJ 9 on my workstation, I get an error message <code>Unable to open debugger port : java.net.ConnectException "Connection timed out: connect"</code>. The jvm is the standatd Sun/Oracle 64 bit JVM version 1.6.0_27.</p>
  
  <p>I verified that the command line parameters are in use by accessing <code>ManagementFactory.getRuntimeMXBean().getInputArguments()</code> within the application deployed to Tomcat and logging the result to the log file.
  I verified via Wireshark on my workstation and on the server that the TCP request on port 4711 is sent from my pc and arriving on the server, but there is is no answer. Running <code>netstat -a</code> on the server does not show a process listening on this port. So I assume somehow Tomcat/JVM does not start the remote debugging.</p>