- This topic has 7 replies, 2 voices, and was last updated 19 years, 9 months ago by
Riyad Kalla.
-
AuthorPosts
-
mclaughkMemberI’m having problems getting the remote debugging to work on my system. I’m running Tomcat 5.5 as a service on a different machine (Windows 2000). I’ve stopped Tomcat, pulled up the properties window (from the Services window), set the startup parameters as “-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n” and restarted the service.
I set up the application via the “MyEclipse Externally Launched Server” as a standard connection type, the host name is the name of the server, and the port is 8000. “Allow termination of remote VM’ is unchecked.
Eclipse version is 3.0.2
MyEclipse version is 3.8.4When I try to ‘debug’ the application, I get the following message from the “Errors Running Operations” window:
“Launching(Error: Failed to connect to remote VM. Connection refused.)”
When I click on this, I get this detail:
Failed to connect to remote VM. Connection refused.
java.net.ConnectException: Connection refused: connect
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(Unknown Source)
java.net.PlainSocketImpl.connectToAddress(Unknown Source)
java.net.PlainSocketImpl.connect(Unknown Source)
java.net.SocksSocketImpl.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
java.net.Socket.<init>(Unknown Source)
java.net.Socket.<init>(Unknown Source)
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)I’ve just recently starting looking into JSP’s, JSP containers, etc., so I’ll admit I’m rather ignorant in the ways these systems interact. At this point, I just don’t know where to go next to troubleshoot this problem.
Did I start the service with the correct parameters for debugging?
Did I setup the application for debugging correctly with MyEclipse?
Riyad KallaMemberI bet that you have a firewall running on the remote machine that is blocking the connection, see if that is the problem. Also make sure that there isn’t a hardware firewall between the two machines.
mclaughkMemberI am on a network, but I’m not aware of a firewall between my machine and the Tomcat server. I can check with the network admins. Could a firewall be an issue if the application runs OK when NOT trying to debug it? I’m able to access the application from inside MyEclipse as well as from an external browser and it seems to run just fine. The problem only occurs when I try to debug.
Riyad KallaMemberWell I’m wondering about either a hardware OR software firewall blocking port 8000 from incomming connections on your server, so the debugger says “knock knock let me connect” to the server and the firewall says “no dice buddy, move along” And the server is never aware that an incomming connection was attempted.
mclaughkMemberI just discovered something else. From within MyEclipse, I stopped the Tomcat server with the ‘Stop Tomcat’ button. When the hourglass goes away, I try to run my application, and it still comes up! I checked the ‘Tomcat’ test page, and it still comes up. Supposedly, at this point, the server should be down. Is it because it’s running as a service on the other machine that MyEclipse is not really gaining control of the server?
In the Application Server/Tomcat 5 preferences I have the following:
Tomcat home directory:\\rslv2kwaves6\c$\Program Files\Apache Software Foundation\Tomcat 5.5
Tomcat Base directory: \\rslv2kwaves6\c$\Program Files\Apache Software Foundation\Tomcat 5.5
Tomcat Temp directory: \\rslv2kwaves6\c$\Program Files\Apache Software Foundation\Tomcat 5.5\temp
Are these parameters expecting something else?
Riyad KallaMemberYour settings look ok, have you logged onto the rslv2kwaves6 machine and made sure that you don’t have two instances of tomcat running? Have you tried shutting tomcat off on the server, then using MyEclipse to remotely start it? What about stopping it?
mclaughkMemberOK, I’ve done a little more investigating.
1) I went to the remote server (rslv2kwaves6) and stopped the Tomcat service.
2) I tried running the application on the http://rslv2kwaves6:8080/EDQTAdmin/ URL and I receive the expected ‘The page cannot be displayed’ message.
3) For the heck of it, I also ran it on my own system: http://rslv2kwaves2:8080/EDQTAdmin/, and as expected, I also receive the ‘The page cannot be displayed’ message.
4) From MyEclipse, I start the Tomcat server.
5) I attempt to Debug, and get the message “Failed to connect to remove VM”. By the way, this is a little different from the original message, but basically says the same thing.
6) I try the http://rslv2kwaves6:8080/EDQTAdmin/ URL again, and I still receive receive the ‘The page cannot be displayed message’.
7) So, I try my local machine http://rslv2kwaves2:8080/EDQTAdmin/ and I get a “HTTP Status 500” error:
org.apache.jasper.JasperException: Unable to compile class for JSP – I don’t have Tomcat installed on my machine! Also, when I watch the Task Manager, another instance of javaw.exe is running.
So it appears the Tomcat server is being started on the correct (remote) machine???, but the actual service is running on the local machine??? Is this normal, so as to facilitate the debugging functionality? Or is the javaw.exe supposed to be running on the remote machine? If this is the case, is there something I can look at in the xml files?
Do I need to just re-install everything from scratch?
Riyad KallaMemberYou need to start/stop the remote server from the remote machine, byt setting up the server on a local share as you have done and then using MyEclipse to start/stop it, all you are doing is running Tomcat on your local machine, it is not launching on the remote machine. There is no magic here… if you opened up a remotely mounted drive in Windows and tried to run an executable off of it, the executable is run on your local machine, not the remote machine; same applies to Tomcat in this case.
So you won’t be able to use the connectors, but you should be able to use the remote debugging facility, and I still feel that is not working likely do to the Windows firewall.
-
AuthorPosts