Le mer. 8 août 2018 à 12:08, Louis Zipes <louis.zi...@gmcr.com> a écrit :

>
> Hi Calder,
> I can successfully start up as a Windows service and get JMX working BUT
> my problem is that Service doesn't stop cleanly (just repeating that
> problem in case it wasn't made clear).  It says the PORT is already in use
> which led me to try to use Catalina_Opts as per the suggestions on the
> internet.
>
> Port already in use: 8008; nested exception is:
>                java.net.BindException: Address already in use: JVM_Bind
>
> If you were able to get JMX working and you can start AND stop the Tomcat
> service cleanly, do you mind sharing me your 'scrubbed'  Java tab contents
> as I can seem to get the right combination to get it to Start and Stop the
> service.
>
> Thanks, Louis
>
>
>
Louis,

I believe you need to understand a bit more how things are working with
Java and the JVM. The -D options are pretty straight forward for anyone
knowing how you define properties to the JVM on the command line. I already
told you everything you need to know to setup properly your Tomcat. Since
you were the one talking about CATALINA_OPTS I assumed you did know where
and how to setup the variable for your installation. Otherwise, just go in
the setup utility for Tomcat on Windows and put the
-Dcom.sun.management.conf.file=${catalina.base}/conf/abc.def entry there
without the CATALINA_OPTS= stanza since this one's intent is to set an
environment variable for the process to pick while the former is passing
directly the property to the JVM from the Tomcat Windows Setup dialog.
There is many ways to do things. Bottom line, you need to tell the JVM
where is the configuration file for JMX and put your properties in there as
any other properties file. This is standard stuff.

The effect is the JVM now knows your port is a JMX port and it will stop to
try to use it when it is already in use and free it cleanly.

Regards,

-----------------
Daniel Savard


>
>

Reply via email to