• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused

 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set JPDA_ADDRESS in environment variable as 8000.

As soon as I press enter on the command line it shows following lines :

Using CATALINA_BASE: value of TOMCAT_HOME
Using CATALINA_HOME: value of TOMCAT_HOME
Using CATALINA_TMPDIR: value of TOMCAT_HOME\temp
Using JAVA_HOME: value of JAVA_HOME

Also , I have already set other options as well like :
1.)editing catalina.bat and adding the lines :
set JPDA_TRANSPORT=dt_socket
...
set JPDA_ADDRESS=8000
AND
2.)Editing startup.bat
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
Tomcat starts up without any problem.

when I try to debug from eclipse I get following message:

Failed to connect to VM.connection refused.

Does anyone have any idea why that would come?
Noticed that it does not matter whether server is started or not,i get the same error.So can it happen that tomcat itself is not starting port 8000?
how do you check for that?
[ February 15, 2005: Message edited by: Jitesh Sinha ]
 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the detailed error:

Failed to connect to remote VM. Connection refused.
java.net.ConnectException: Connection refused: connect
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
java.net.Socket.connect(Socket.java:452)
java.net.Socket.connect(Socket.java:402)
java.net.Socket.<init>(Socket.java:309)
java.net.Socket.<init>(Socket.java:124)
org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:47)
org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:103)
org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:131)
org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:75)
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788)
org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jitesh,
Are you able to access Tomcat through a web browser?
 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am able to access tomcat port 8080 through browser...accessing 8000(the debugging port) gives the error "The Page cannot be displayed".
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jitesh,
My only thought is that port 8000 might be blocked or used for something else.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic