Remote Sever Debugging.


General J2EE: Remote Sever Debugging.

  1. Remote Sever Debugging. (3 messages)

    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.
  2. I am not a TOMCAT guru however...[ Go to top ]

    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" 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.
  3. Remote Debugging with Eclipse and Tomcat/BlazeDS

    Edit Catalina.bat
    set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m
    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.

    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.

  4. firewall[ Go to top ]

    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.