Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tomcat jpda start not waiting

After running tomcat using:

bin\catalina.bat jpda start

The problem is it doesnt seem to wait! it just goes ahead with starting up tomcat. I was expecting it to wait for me to connect to it using a remote debugger (in my case eclipse). I remember it working awhile back but no idea what happened all of a sudden.

Any ideas? Could there be another process trying to connect to that port? I even trying closing eclipse, and changing the JPDA_PORT but same problem.

like image 604
noi.m Avatar asked Jan 13 '14 04:01

noi.m


People also ask

How do I start TomEE in debug mode?

Run TomEE+ in debug mode If you simply run catalina.sh jpda run in the bin folder of tomee deployment, the server starts in the debug mode but it will quckly pass your breakpoint before you attach your IDE to the server process.

What is Jpda Tomcat?

A JPDA Transport is a method of communication between a debugger and the virtual machine that is being debugged (hereafter the target VM). The communication is connection oriented - one side acts as a server, listening for a connection. The other side acts as a client and connects to the server.

How do I know if Tomcat is running in debug mode?

A simple way to see if Tomcat is running is to check if there is a service listening on TCP port 8080 with the netstat command. This will, of course, only work if you are running Tomcat on the port you specify (its default port of 8080, for example) and not running any other service on that port.


1 Answers

There is a parameter called JPDA_SUSPEND ((Optional) Java runtime options used when the "jpda start" command is executed. Specifies whether JVM should suspend execution immediately after startup. Default is "n".) in catalina.bat. I just set JPDA_SUSPEND to 'y'

set JPDA_SUSPEND=y

It works as expected now (i.e. waits).

like image 129
noi.m Avatar answered Sep 21 '22 11:09

noi.m