You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by maven apache <ap...@gmail.com> on 2009/11/04 11:55:23 UTC

remote debug

Hi:
I have a project and want to use the remote debug manner,my web
container is tomcat of version of 5.5,I have seen the faq in wiki of
tomcat.
I follow the instruction:
----------

%CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6

Select the Java tab in the properties dialog box,
Add the following two lines to the Java Options text box:

-Xdebug
-Xrunjdwp:transport=dt_socket,address=192.168.2.10:1044,server=y,suspend=n
--------------------------------
after the configuration I restart the tomcat.

then in my eclipse EE I open the debug configuration dialog,create a
new "remote java application",in the connection properties I set :
host:192.168.2.10
port:1044
Then I click applay--debug.However a error dialog comes out which tell me:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

I wonder why?

I have tried to  Set environment variables JPDA_ADDRESS=1044 and
JPDA_TRANSPORT=dt_socket,but it does not work also.

Anyone can give me some advise?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: remote debug

Posted by maven apache <ap...@gmail.com>.
Hi:
I have changed to tomcat 6.0.20(zip),.
And I follow the running.txt under its install directory,use the startup.bat
to start the tomcat,it works.
Then I shutdown the tomcat and want to config the remote debug in the
eclipse EE.
1> I set the environment variable
     JPDA_ADDRESS=1044
     JPDA_TRANSPORT=dt_socket
2> I start the tomcat with debug "catalina.bat jpda start", and a new
command window startup and it shows
     "Listening for transport dt_socket at address:1044"
      ...................................
     "Server startup in 448 ms",
 I think it start successfully.

3> In my eclipse EE,I create a new debug configuration and try to connect
the tomcat,however it show the same error:
"Failed to connect to remote VM. Connection refused."

Is there something wrong in my configuration ?

BTW, does the remote debug means I can debug my web app in computer A with
tomcat installed at computer B?

2009/11/5 Caldarale, Charles R <Ch...@unisys.com>

> > From: maven apache [mailto:apachemaven0@gmail.com]
> > Subject: Re: remote debug manner by use
> >
> > I used 5.5 rather than 6.0 because I heard that 6.0 is much different
> > with 5.5 in configuration(such as the port and ect..)
>
> Wherever you heard that is wrong.  There were significant config
> differences between 4.1, 5.0 (no longer supported), and 5.5, but very few
> config changes between 5.5 and 6.0 (other than clustering).  What changes
> there were is documented here:
> http://tomcat.apache.org/migration.html
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: remote debug

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: maven apache [mailto:apachemaven0@gmail.com]
> Subject: Re: remote debug
> 
> I used 5.5 rather than 6.0 because I heard that 6.0 is much different
> with 5.5 in configuration(such as the port and ect..)

Wherever you heard that is wrong.  There were significant config differences between 4.1, 5.0 (no longer supported), and 5.5, but very few config changes between 5.5 and 6.0 (other than clustering).  What changes there were is documented here:
http://tomcat.apache.org/migration.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: remote debug

Posted by maven apache <ap...@gmail.com>.
2009/11/5 Caldarale, Charles R <Ch...@unisys.com>

> > From: maven apache [mailto:apachemaven0@gmail.com]
> > Subject: Re: remote debug
> >
> > In a word,I have two choice:
> > 1 use the tomcat.zip of version 5.5  or 6.x.
> > 2 use the tomcat.exe of version 6.x?
>
> The version of Tomcat doesn't matter, although unless you have a compelling
> reason to use an older level, I would go with the current 6.0.20 zip file.
>
> Generally, things are easier to debug when starting Tomcat via the .bat
> scripts rather than as a service, partly since you get to see in a command
> window if there are any startup errors.  Create a setenv.bat script in
> Tomcat's bin directory to hold any command-line parameters you want to set.
>
> Once you're ready to try Tomcat as a service, install it with the
> service.bat script, and use the tomcat6w.exe program to set additional
> options and start/stop the service.  No point in trying to use the
> tomcat6.exe program directly - it's too hard.
>
Thanks for your reply.
I used 5.5 rather than 6.0 because I heard that 6.0 is much different with
5.5 in configuration(such as the port and ect..),I will have a try with the
6.0.zip.Thank you again :).

>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: remote debug

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: maven apache [mailto:apachemaven0@gmail.com]
> Subject: Re: remote debug
> 
> In a word,I have two choice:
> 1 use the tomcat.zip of version 5.5  or 6.x.
> 2 use the tomcat.exe of version 6.x?

The version of Tomcat doesn't matter, although unless you have a compelling reason to use an older level, I would go with the current 6.0.20 zip file.

Generally, things are easier to debug when starting Tomcat via the .bat scripts rather than as a service, partly since you get to see in a command window if there are any startup errors.  Create a setenv.bat script in Tomcat's bin directory to hold any command-line parameters you want to set.

Once you're ready to try Tomcat as a service, install it with the service.bat script, and use the tomcat6w.exe program to set additional options and start/stop the service.  No point in trying to use the tomcat6.exe program directly - it's too hard.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: remote debug

Posted by maven apache <ap...@gmail.com>.
2009/11/5 Caldarale, Charles R <Ch...@unisys.com>

> > From: maven apache [mailto:apachemaven0@gmail.com]
> > Subject: Re: remote debug
> >
> > > > %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6
> > >
> > > One of the above two statements is wrong.  Which version
> > > of Tomcat are you really using?\
> >
> > I am using apache-tomcat-5.5.27(.
>
> Then how it is possible you're fiddling with tomcat6w.exe, which is part of
> Tomcat 6.0, not 5.5?
>
I post wrong. the  command I use in command line is :
 %CATALINA_HOME%\bin\tomcat5w.exe //ES//tomcat5

>
> > That's to say if I want to use the remote debug ,I should use the
> > tomcat.zip? Should I uninstall the tomcat I am using?
>
> I would uninstall the .exe version.  You can create the service with the
> service.bat script from the .zip download.
>

In a word,I have two choice:
1 use the tomcat.zip of version 5.5  or 6.x.
2 use the tomcat.exe of version 6.x?
 isn't it?

>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: remote debug

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: maven apache [mailto:apachemaven0@gmail.com]
> Subject: Re: remote debug
> 
> > > %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6
> >
> > One of the above two statements is wrong.  Which version 
> > of Tomcat are you really using?\
> 
> I am using apache-tomcat-5.5.27(.

Then how it is possible you're fiddling with tomcat6w.exe, which is part of Tomcat 6.0, not 5.5?

> That's to say if I want to use the remote debug ,I should use the
> tomcat.zip? Should I uninstall the tomcat I am using?

I would uninstall the .exe version.  You can create the service with the service.bat script from the .zip download.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: remote debug

Posted by maven apache <ap...@gmail.com>.
2009/11/4 Caldarale, Charles R <Ch...@unisys.com>

> > From: maven apache [mailto:apachemaven0@gmail.com]
> > Subject: remote debug
> >
> > my web container is tomcat of version of 5.5
> >
> > %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6
>
> One of the above two statements is wrong.  Which version of Tomcat are you
> really using?\
>

I am using apache-tomcat-5.5.27(.

>
> > Failed to connect to remote VM. Connection refused.
> > Connection refused: connect
>
> What version of Windows are you using?  I can get JMX/JPDA working with a
> Tomcat service on XP, but not on Vista (haven't tried it on Win7 yet).
>  JMX/JPDA works with Tomcat started from a command prompt on both XP and
> Vista.  (The .bat scripts are only in the Tomcat .zip download, not the
> .exe, for some inexplicable reason.)
>
Win xp with sp3.
That's to say if I want to use the remote debug ,I should use the
tomcat.zip? Should I uninstall the tomcat I am using?

>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: remote debug

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: maven apache [mailto:apachemaven0@gmail.com]
> Subject: remote debug
> 
> my web container is tomcat of version of 5.5
> 
> %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6

One of the above two statements is wrong.  Which version of Tomcat are you really using?

> Failed to connect to remote VM. Connection refused.
> Connection refused: connect

What version of Windows are you using?  I can get JMX/JPDA working with a Tomcat service on XP, but not on Vista (haven't tried it on Win7 yet).  JMX/JPDA works with Tomcat started from a command prompt on both XP and Vista.  (The .bat scripts are only in the Tomcat .zip download, not the .exe, for some inexplicable reason.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org