service name must be A-Za-z0-9 (no space no _ or any funky character)
On 05/04/06, David Rush <[EMAIL PROTECTED]> wrote: > > I've tried following the instructions below, and tried using > service.bat, but either way I always end up with a small pop-up window > with "Application System ..." in the title bar, and it says "NonAlpha 45". > > Any clue what's going on here? > > David > > Nic Daniau wrote: > > OK here we go. What was said above is true but it's not all about the > > service, therefore the service.bat script is not enough to resolve the > > problem. If you read the nsi install script from the source, you can see > > everything that it does, and the setup of the service is just one thing. > The > > tested procedure which I've used live is as follows: > > > > I assume you have installed tomcat under C:\tomcat-x1 with the intention > to > > install C:\tomcat-x2, C:\tomcat-x3, etc.. > > The service names will be called TomcatX1, TomcatX2, TomcatX3, etc. > > The Display Names will be "Apache Tomcat #1", "Apache Tomcat #2", etc. > > And of course the ports will be configurred differently (I use for > shutdown: > > 40051, 40052, etc., for http/1.1: 40801, 40802, etc. for ajp/1.3: 40091, > > 40092, etc.) > > > > First run the following after adapting to your environment: > > > > set TOMCAT_NO=1 > > set JAVA_HOME=C:\jdk1.5.0_03 > > set CATALINA_HOME=C:\tomcat-x1 > > As you can see %TOMCAT_NO% is the iterative number I give to the Tomcat > > install I'm dealing with. > > > > Then you can run > > %CATALINA_HOME%\bin\tomcat5.exe //DS//Tomcat5 > > as the service name is hardcoded "Tomcat5" in the current tomcat dist. > > > > Then you're free to run: > > > > %CATALINA_HOME%\bin\tomcat5.exe //IS//TomcatX%TOMCAT_NO% --DisplayName > > "Apache Tomcat #%TOMCAT_NO%" --Description "v5.5.16" --LogPath > > "D:\logs\tomcat-x%TOMCAT_NO%" --Install > "%CATALINA_HOME%\bin\tomcat5.exe" > > --Jvm "%JAVA_HOME%\jre\bin\server\jvm.dll" --StartPath "%CATALINA_HOME%" > > --StopPath "%CATALINA_HOME%" --Startup auto --Classpath > > "%CATALINA_HOME%\bin\bootstrap.jar" --StartClass > > org.apache.catalina.startup.Bootstrap --StopClass > > org.apache.catalina.startup.Bootstrap --StartParams start --StopParams > stop > > --StartMode jvm --StopMode jvm --JvmOptions "- > > > Dcatalina.home=%CATALINA_HOME%#-Dcatalina.base=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Djava.io.tmpdir=%CATALINA_HOME%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties > " > > --StdOutput auto --StdError auto > > > > (my logs go to a specially created folder on another drive > > D:/logs/tomcat-x1) > > > > This was inspired by the .nsi script, which to my mind is more reliable > than > > the service.bat one. > > > > But that's not all. You need to edit the registry: > > > > "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5" > > -> rename it to "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software > > Foundation\Tomcat\#1" > > > > > "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache > > Tomcat 5.5" > > -> rename it to > > > "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache > > Tomcat #1" > > and change DisplayName value to "Apache Tomcat #1 (remove only)" > > > > "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" > > -> remove entry "ApacheTomcatMonitor" (yes: DELETE, you can always > access > > the monitor with the menu, it's not needed in the tray esp. if you have > many > > tomcats) > > > > And lastly, the menu in Program that has been created has also been > > hardcoded, so change > > "Start / All Programs / Apache Tomcat 5.5" menu entry to "Apache > > Tomcat #1"and change the > > targets for Configure and Monitor (replace ..//Tomcat5 by ..//TomcatX1). > > Thar's where you can start the monitor for each tomcat if you really > want to > > (IMHO you wont) > > > > That's it and it works like a charm! Don't take my word for it have a > look > > into the .nsi script and you will see for yourself there is nothing > else. > > > > Just a note if you need to unsistall, do a regular uninstallation > followed > > by: > > > > - delete registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software > > Foundation\Tomcat\#1" > > - delete registry key > > > "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache > > Tomcat #1" > > - remove "Start / All Programs / Apache Tomcat #1" menu entry > > > > HTH > > > > Nic > > > > On 22/03/06, Jim the Standing Bear <[EMAIL PROTECTED]> wrote: > > > >> Thanks, Chuck. I will take a closer look at RUNNING.txt. However, i > >> still > >> think there is something else causing our problems.. We installed two > >> copies of the tomcat code, one running at root, and the other running > as a > >> regular user. Now, even if the ports were conflicting, it would > prevent > >> one > >> instance from being launched, instead of killing another instance, > would > >> it? At one time when i was playing with it on a testing platform (also > >> linux), the launching of the 2nd instance of tomcat 5.5 even killed a > >> running tomcat 4.1.31! It was incredible :P > >> > >> -- Jim > >> > >> > >> > >> On 3/22/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > >> > >>>> From: Jim the Standing Bear [mailto:[EMAIL PROTECTED] > >>>> Subject: Re: running two instances of tomcat > >>>> > >>>> Is there anything special we need to configure to > >>>> allow the co-existence (other than the port numbers)? > >>>> > >>> That should be it, just make sure yout get _all_ the ports. By > default, > >>> there are three for each Tomcat, one more if you enable SSL. Also, > you > >>> might want to look at RUNNING.txt in the distribution for hints about > >>> running multiple Tomcats with only one copy of the code installed. > >>> > >>> - Chuck > >>> > >>> > >>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY > >>> MATERIAL and is thus for use only by the intended recipient. If you > >>> received this in error, please contact the sender and delete the > e-mail > >>> and its attachments from all computers. > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> -- > >> -------------------------------------- > >> Standing Bear Has Spoken > >> -------------------------------------- > >> > >> > >> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >