You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Luca Merolla <lu...@gmail.com> on 2012/09/20 10:06:55 UTC

Remote debug

Hi,

I have configured the remote debug for TomEE by adding the following line
at the beginning of catalina.sh. Thanks to this I'm able to connect
remotely with Eclipse debugger.

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

Is it the correct way to do it? I'm asking because since then, when I try
to shutdown the server, I get the following output.

ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
[../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Aborted (core dumped)

I don't know maybe it is related to the other issue I'm having with
Infinispan that prevents to stop the server, but before this JAVA_OPTS I
was not getting this error.

Luca

Re: Remote debug

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

maybe the port is already used (i had it in such a case)

we commonly use it with the maven plugin. Using <debug>true</debug> or
-Dtomee-plugin.debug=true does the same (on port 5005 by default)

BTW with catalina.sh/bat script you can export JPDA_ADDRESS=<port> and
JPDA_SUSPEND=y to debug remotely

*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/9/20 Luca Merolla <lu...@gmail.com>

> Hi,
>
> I have configured the remote debug for TomEE by adding the following line
> at the beginning of catalina.sh. Thanks to this I'm able to connect
> remotely with Eclipse debugger.
>
> JAVA_OPTS="-Xdebug
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"
>
> Is it the correct way to do it? I'm asking because since then, when I try
> to shutdown the server, I get the following output.
>
> ERROR: transport error 202: bind failed: Address already in use
> ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
> JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
> [../../../src/share/back/debugInit.c:690]
> FATAL ERROR in native method: JDWP No transports initialized,
> jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
> Aborted (core dumped)
>
> I don't know maybe it is related to the other issue I'm having with
> Infinispan that prevents to stop the server, but before this JAVA_OPTS I
> was not getting this error.
>
> Luca
>

Re: Remote debug

Posted by almos <al...@ukr.net>.
We also used manual specification port and other options, however found that
if we specify as you did - "JAVA_OPTS="-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787" " we have
some strange Tomcat crashes on shutdown.
We found that adding "jpda" startup option works much better

$TOMEE_HOME/bin/startup.sh:

substitute last line

exec "$PRGDIR"/"$EXECUTABLE" start "$@
with
exec "$PRGDIR"/"$EXECUTABLE" *jpda* start "$@

Regards,
Alex



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-debug-tp4657541p4657543.html
Sent from the OpenEJB User mailing list archive at Nabble.com.