-
Remote Sever Debugging. (3 messages)
- Posted by: GV Mohan
- Posted on: October 07 2004 07:35 EDT
Hi ,
I am using Tomcat 4.0, Jdk1.3 and eclipse 2.1
I am trying for past 2 days, Remote Server Debugging.
But I can't acheive.Please help in this tough situation.
I have configured Tomcat to run in debug mode by the following steps:
1) In catalina.bat, SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
2) Then I set the JAVA_HOME AND TOMCAT_HOME in the environment mode.
3) Then I clicked the startup.bat in the bin directory.
In Eclipse side , I followed as,
1) Run/Debug/Remote Java Application/New/
In the connect tab, I gave host:localhost and port:8000
2) Then I clicked Launch button.
I didn't use any plugin.
But it producing "Failed to connect to Remote VM.Connection refused."
Please help in this tough situation.Threaded Messages (3)
- I am not a TOMCAT guru however... by GM Molak on October 07 2004 08:54 EDT
- Remote Debugging with Eclipse and Tomcat/BlazeDS, Jetty by Ramkumaran Tamilarasi on June 17 2010 07:46 EDT
- firewall by Thomas Jachmann on October 07 2004 09:51 EDT
-
I am not a TOMCAT guru however...[ Go to top ]
- Posted by: GM Molak
- Posted on: October 07 2004 08:54 EDT
- in response to GV Mohan
Since you are getting connection refused you must see if your connection configuration on your side are matching the service listener on the other side. You are seemingly using 8000 as the Port to connect to the VM on the other side. Is your server running on that Port ?? You can check if your server is indeed listening on this with a "netstat -an |grep -i listen" (and an equivalent command on your O/S). Even if there is one Listener, there is no guarantee that your VM is the one thats listening on that port. You can use "lsof" on unix or "process explorer (from sysinternals.com)" on windows to check if your VM is indeed listening on that port. connection refused is often a message seen when there is no one on the other side of TCP stack waiting to accept your connection. HTH Dexthor. -
Remote Debugging with Eclipse and Tomcat/BlazeDS, Jetty[ Go to top ]
- Posted by: Ramkumaran Tamilarasi
- Posted on: June 17 2010 07:46 EDT
- in response to GM Molak
Remote Debugging with Eclipse and Tomcat/BlazeDS
-------------------------------------------------------------------------------
Edit Catalina.bat
change
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m
to
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
When you start tomcat in console, you can see this message.
Listening for transport dt_socket at address: 8000
Tomcat won't start running further and load web application deployed, until you debug application in eclipse.
Now, you can remotely debug.
Note:
If you use suspend=n, then you can't remotely debug
If you use suspend=y, then you can remotely debug
Remote Debugging with Eclipse and Jetty
-------------------------------------------------------------
For example, jetty installation path is C:\jetty
-> cd C:\Jetty
-> java -Xms256m -Xmx512m -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y -jar start.jar
Now your jetty server listen for port 8000.
You can able to debug with eclipse
If you don't want to do remote debugging, just change suspend=y to suspend=n. -
firewall[ Go to top ]
- Posted by: Thomas Jachmann
- Posted on: October 07 2004 09:51 EDT
- in response to GV Mohan
Also, you should check if there's a firewall on either one of or between the two machines blocking the communication from your computer to port 8000 of the computer running the vm.
HTH,
Thomas