You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sp...@gmx.eu on 2013/02/01 12:51:31 UTC

Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001

Hi,

I want to monitor my tomcat 7 via JMX remotely. The problem is, as soon as I
add -Dcom.sun.management.jmxremote.port=9001 to my setenv.sh tomcat does not
start anymore. No error message, no log, nothing...

The system is a ubuntu which uses start-stop-demon to execute catalina.sh.

What could be the problem?

Thank you.


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


Re: Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

To whom it may concern,

On 2/1/13 8:08 AM, spring@gmx.eu wrote:
>> there must be a log message somewhere.
> 
> But I do not find it...

Where did you look?

>> The problem is probably that under Ubuntu, the startup script 
>> redirects the STDERR log somewhere, where you are not looking
>> (via SYSLOG to /var/log/daemon.log e.g.).
> 
> There is a syslog file, but it has no error messages.
> 
>> This is a switch for the Java JVM, and it probably bumps out 
>> before Tomcat is even started inside the JVM.
> 
> Yep.

So... how did you set the switch? Perhaps providing the contents of
your setenv.sh script would help?

>> As to the basic error cause, do a "netstat -an" and look at what
>> else may be using port 9001 already.
> 
> Port is free

You can always start Tomcat like this:

$ bin/catalina.sh run

... and stdout will not be redirected: you'll get any error messages
right on the console. If that works without any errors, it's time to
start looking at how Ubuntu actually launches your Tomcat using its
service scripts. Debian-derived systems usually have additional
configuration files found under /etc/default/ -- you might start
looking there.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEMFoUACgkQ9CaO5/Lv0PBR7gCfa9IZH1pCNN7S3NbvkAz9sQBN
4EkAoIz0v7WckSjJpmllyZij0QAirbUI
=+BR1
-----END PGP SIGNATURE-----

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


RE: Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001

Posted by sp...@gmx.eu.
> there must be a log message somewhere.

But I do not find it...

> The problem is probably that under Ubuntu, the startup script 
> redirects the STDERR log 
> somewhere, where you are not looking (via SYSLOG to 
> /var/log/daemon.log e.g.).

There is a syslog file, but it has no error messages. 

> This is a switch for the Java JVM, and it probably bumps out 
> before Tomcat is even started 
> inside the JVM.

Yep.

> As to the basic error cause, do a "netstat -an" and look at 
> what else may be using port 
> 9001 already.

Port is free


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


Re: Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001

Posted by André Warnier <aw...@ice-sa.com>.
spring@gmx.eu wrote:
> Hi,
> 
> I want to monitor my tomcat 7 via JMX remotely. The problem is, as soon as I
> add -Dcom.sun.management.jmxremote.port=9001 to my setenv.sh tomcat does not
> start anymore. No error message, no log, nothing...
> 
> The system is a ubuntu which uses start-stop-demon to execute catalina.sh.
> 
> What could be the problem?
> 

there must be a log message somewhere.
The problem is probably that under Ubuntu, the startup script redirects the STDERR log 
somewhere, where you are not looking (via SYSLOG to /var/log/daemon.log e.g.).
This is a switch for the Java JVM, and it probably bumps out before Tomcat is even started 
inside the JVM.
As to the basic error cause, do a "netstat -an" and look at what else may be using port 
9001 already.


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