0 Replies Latest reply: May 25, 2011 10:26 AM by 864300 RSS

    Eclipse doesn't connect to the remote debug

    864300
      Hi to everyone, we have a problem debugging our java application remotely from Eclipse (3.6.1). Sometimes Eclipse can't connect to the remote application for debug, not always. We get an
      ------------------------------------------------------------------------------
      Failed to connect to remote VM. Connection refused.
      Connection refused: connect
      ------------------------------------------------------------------------------
      error, and then, if I check on the remote machine with netstat, it say the connection is ESTABLISHED, even if we was unable to connect. To get it back on the LISTEN status, we have to kill the process and run again (or reboot Eclipse). I have a dump of the handshake between the local Eclipse installation and the remote machine.

      If we run a dummy application using the same debug configuration parameters, we can correctly connect with Eclipse. Perhaps there is some "parameter conflit" that doesn't allow us to connect? Is something related to our application?
      ------------------------------------------------------------------------------
      Here the debug parameters used:

      -server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=41419,server=y,suspend=n -Xms512m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
      ------------------------------------------------------------------------------

      ------------------------------------------------------------------------------
      And here a dump of the successful attempt to connect to the dummy application, followed by the failed attemp

      # TCP flow of the success attempt
      JDWP-HandshakeJDWP-Handshake.......U............@d.....Z...................U..............................V................V..............T..........T.......

      00000000 4a 44 57 50 2d 48 61 6e 64 73 68 61 6b 65 JDWP-Han dshake
      00000000 4a 44 57 50 2d 48 61 6e 64 73 68 61 6b 65 JDWP-Han dshake
      0000000E 00 00 00 0b 00 00 04 55 00 01 07 .......U ...
      0000000E 00 00 00 1d 00 00 00 00 00 40 64 02 00 00 00 01 ........ .@d.....
      0000001E 5a 00 00 00 00 00 00 00 00 00 00 00 01 Z....... .....
      0000002B 00 00 00 1f 00 00 04 55 80 00 00 00 00 00 04 00 .......U ........
      0000003B 00 00 04 00 00 00 08 00 00 00 08 00 00 00 08 ........ .......
      00000019 00 00 00 11 00 00 04 56 00 0f 01 09 00 00 00 00 .......V ........
      00000029 00 .
      0000004A 00 00 00 0f 00 00 04 56 80 00 00 00 00 00 02 .......V .......
      0000002A 00 00 00 0b 00 00 04 54 00 01 01 .......T ...
      00000059 00 00 00 de 00 00 04 54 80 00 00 00 00 00 9d 4a .......T .......J
      00000069 61 76 61 20 44 65 62 75 67 20 57 69 72 65 20 50 ava Debu g Wire P
      00000079 72 6f 74 6f 63 6f 6c 20 28 52 65 66 65 72 65 6e rotocol (Referen
      00000089 63 65 20 49 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ce Imple mentatio
      00000099 6e 29 20 76 65 72 73 69 6f 6e 20 31 2e 35 0a 4a n) versi on 1.5.J
      000000A9 56 4d 20 44 65 62 75 67 20 49 6e 74 65 72 66 61 VM Debug Interfa
      000000B9 63 65 20 76 65 72 73 69 6f 6e 20 31 2e 30 0a 4a ce versi on 1.0.J
      000000C9 56 4d 20 76 65 72 73 69 6f 6e 20 31 2e 35 2e 30 VM versi on 1.5.0
      000000D9 5f 31 34 20 28 4a 61 76 61 20 48 6f 74 53 70 6f _14 (Jav a HotSpo
      000000E9 74 28 54 4d 29 20 53 65 72 76 65 72 20 56 4d 2c t(TM) Se rver VM,
      000000F9 20 6d 69 78 65 64 20 6d 6f 64 65 29 00 00 00 01 mixed m ode)

      # TCP flow of the failed attempt
      JDWP-HandshakeJDWP-Handshake....................................................................................................

      00000000 4a 44 57 50 2d 48 61 6e 64 73 68 61 6b 65 JDWP-Han dshake
      00000000 4a 44 57 50 2d 48 61 6e 64 73 68 61 6b 65 JDWP-Han dshake
      0000000E 00 00 00 0b 00 00 02 ad 00 01 07 ........ ...
      0000000E 00 00 00 1f 00 00 02 ad 80 00 00 00 00 00 04 00 ........ ........
      0000001E 00 00 04 00 00 00 08 00 00 00 08 00 00 00 08 ........ .......
      00000019 00 00 00 11 00 00 02 ae 00 0f 01 09 00 00 00 00 ........ ........
      00000029 00 .
      0000002D 00 00 00 0f 00 00 02 ae 80 00 00 00 00 00 02 ........ .......
      0000002A 00 00 00 0b 00 00 02 ac 00 01 01 ........ ...
      0000003C 00 00 00 de 00 00 02 ac 80 00 00 00 00 00 9d 4a ........ .......J
      0000004C 61 76 61 20 44 65 62 75 67 20 57 69 72 65 20 50 ava Debu g Wire P
      0000005C 72 6f 74 6f 63 6f 6c 20 28 52 65 66 65 72 65 6e rotocol (Referen
      0000006C 63 65 20 49 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ce Imple mentatio
      0000007C 6e 29 20 76 65 72 73 69 6f 6e 20 31 2e 35 0a 4a n) versi on 1.5.J
      0000008C 56 4d 20 44 65 62 75 67 20 49 6e 74 65 72 66 61 VM Debug Interfa
      0000009C 63 65 20 76 65 72 73 69 6f 6e 20 31 2e 30 0a 4a ce versi on 1.0.J
      000000AC 56 4d 20 76 65 72 73 69 6f 6e 20 31 2e 35 2e 30 VM versi on 1.5.0
      000000BC 5f 31 34 20 28 4a 61 76 61 20 48 6f 74 53 70 6f _14 (Jav a HotSpo
      000000CC 74 28 54 4d 29 20 53 65 72 76 65 72 20 56 4d 2c t(TM) Se rver VM,
      000000DC 20 6d 69 78 65 64 20 6d 6f 64 65 29 00 00 00 01 mixed m ode)

      Thank you in advance
      Marco Z

      Edited by: 861297 on 25-mag-2011 8.23

      Edited by: 861297 on 25-mag-2011 8.24

      Edited by: 861297 on 25-mag-2011 8.25