Discussion:
Adding remote debugging to tomcat7
(too old to reply)
David Demelier
2013-01-22 06:49:50 UTC
Permalink
Hello there,

Sorry for cross posting, I'm not on the freebsd-java list.

I would like to enable remote debugging to tomcat, as seen here
http://wiki.apache.org/tomcat/FAQ/Developing#Q1 it is said to add the
following options to the JVM :

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

So I have added to the rc.conf

tomcat7_enable="YES"
tomcat7_java_opts="-XX:MaxPermSize=512m -Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Note that the first option is only to prevent a PermGen out of space
error. With that setup, tomcat fails to starts with:

/usr/local/etc/rc.d/tomcat7: WARNING: failed to start tomcat7

And in the tomcat logs:

NPT ERROR: Cannot open library
Service exit with a return value of 1

I am using tomcat-7.0.34 on FreeBSD 9-STABLE amd64.

Cheers,
Ronald Klop
2013-01-22 15:03:11 UTC
Permalink
On Tue, 22 Jan 2013 07:49:50 +0100, David Demelier
Post by David Demelier
Hello there,
Sorry for cross posting, I'm not on the freebsd-java list.
I would like to enable remote debugging to tomcat, as seen here
http://wiki.apache.org/tomcat/FAQ/Developing#Q1 it is said to add the
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
So I have added to the rc.conf
tomcat7_enable="YES"
tomcat7_java_opts="-XX:MaxPermSize=512m -Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
Note that the first option is only to prevent a PermGen out of space
/usr/local/etc/rc.d/tomcat7: WARNING: failed to start tomcat7
NPT ERROR: Cannot open library
Service exit with a return value of 1
I am using tomcat-7.0.34 on FreeBSD 9-STABLE amd64.
Cheers,
What java version are you using?

Ronald.
Valentin Popov
2013-01-22 15:06:23 UTC
Permalink
ln -s /usr/local/openjdk7/jre/lib/amd64/libnpt.so /usr/local/lib/libnpt.so

http://forums.freebsd.org/showthread.php?t=32248
Post by Ronald Klop
Post by David Demelier
Hello there,
Sorry for cross posting, I'm not on the freebsd-java list.
I would like to enable remote debugging to tomcat, as seen here
http://wiki.apache.org/tomcat/FAQ/Developing#Q1 it is said to add the
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
So I have added to the rc.conf
tomcat7_enable="YES"
tomcat7_java_opts="-XX:MaxPermSize=512m -Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
Note that the first option is only to prevent a PermGen out of space
/usr/local/etc/rc.d/tomcat7: WARNING: failed to start tomcat7
NPT ERROR: Cannot open library
Service exit with a return value of 1
I am using tomcat-7.0.34 on FreeBSD 9-STABLE amd64.
Cheers,
What java version are you using?
Ronald.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-java
С Уважением,
Валентин Попов

Loading...