Hi Mark, You wrote:
1. You see the error you are see because you are using Java mode. Switch to jvm mode and all should be well. >> I'm already using 'C:\Program Files\Java\jdk1.7.0_80\jre\bin\server\jvm.dll' >> in my Java Virtual Machine tab. I assume that means I'm already in JVM >> Mode. I think I recall when setting up Tomcat last year it wouldn't start >> any other way. 2. Finally 7.0.54 is very old. I strongly recommend an upgrade at least to the latest 7.0.x release is not 8.5.x/9.0.x >> I'm going to try that today (or tomorrow depending on how busy it is at >> work). The issue that I might run into is the application that is running >> on Tomcat is not my application and I might run into a restriction on how >> high of a version I can go to but I will deal with that later if it does >> work. Thank you to all for the continued assistance. I have a thick skin. : ) - Louis -----Original Message----- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, August 09, 2018 5:10 AM To: users@tomcat.apache.org Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54 - - - external message, proceed with caution - - - On 09/08/18 01:06, Daniel Savard wrote: > Louis, > > I believe you need to understand a bit more how things are working with > Java and the JVM. Actually Daniel, it is you who needs to understand things better. Louis, Clearly, when Tomcat is started a new JVM instance is created and it listens on the configured JMX ports. The problem is that when Tomcat is stopped another JVM instance is created (to send the stop message to the first) and that uses the same configuration. Hence it tries to open the same JMX port and fails because it is already bound. If you were running from the command line, the fix would be easy. Put the JMX options in CATALINA_OPTS and they'd only be used on start but not stop. (JAVA_OPTS are used on both start and stop). There is also a simple fix if running as a Windows Service. The Windows Service wrapper is simply a renamed version Apache Common Daemon. When running a Java program as a Windows service there are three ways it can be integrated. 1. jvm. The Windows service wrapper starts and embedded JVM using the provided parameters and then calls the start method on the appropriate class. To stop, it calls the stop method on the appropriate class in the embedded jvm. 2. Java. The Windows service wrapper starts a separate Java process with the provided parameters. On stop, a second Java process is started using the same parameters which is expected to communicate with the first process and stop it. 3. exe. Same as 2 but any executable can be used rather than java.exe. You see the error you are see because you are using Java mode. Switch to jvm mode and all should be well. Finally 7.0.54 is very old. I strongly recommend an upgrade at least to the latest 7.0.x release is not 8.5.x/9.0.x Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------- CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may contain information that is confidential, proprietary or exempt from disclosure. If you are not the intended recipient, please contact the sender immediately. Unauthorized use or distribution is prohibited and may be unlawful. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org