Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 7 remote debugging on EC2

I have a tomcat 7 instance running on EC2. The port that tomcat is running on is its default, 8080.

I wanna start tomcat in debug mode, so I started tomcat with the following command :

sudo service tomcat7 start -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

I have 8000 port opened in my security group. But when I try to remote debug using eclipse, it gives me a Connection refused error. Any clue what I am doing wrong ?

Thanks..

like image 406
sharath Avatar asked Apr 02 '26 00:04

sharath


1 Answers

I don't think that you can put the debug options as arguments to the service command.

Assuming you installed the standard tomcat7 package using yum, edit the file /etc/tomcat7/tomcat7.conf and add this line in it:

JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Then restart the Tomcat service.

like image 188
David Levesque Avatar answered Apr 08 '26 18:04

David Levesque



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!