aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused" Watch "Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused" New topic
Author

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

Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
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

Joined: Jun 19, 2004
Posts: 144
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Jitesh,
Are you able to access Tomcat through a web browser?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Jitesh,
My only thought is that port 8000 might be blocked or used for something else.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused
 
Similar Threads
Remote Debugging with Eclipse
Remote Debugging in Eclipse
Remote debugging problem in eclipse
problem with port for debugging with eclipse/tomcat
Problem in starting Tomcat in debug mode