-----Original Message-----
Sent: Wednesday, February 27, 2013 8:20 AM
To: Tomcat Users List
Subject: Re: Tomcat 7 doesn't start on Windows
Post by Rune StillingIs there some registry key I could check related to the installation
process?
Call up the Registry Editor, and search for "tomcat7".
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat7
(under this one, you will find the parameters which Windows needs to
know about the service (such as, how to start it) ("it" being
"tomcat7.exe")
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\....
(under this one, you will find the parameters which "tomcat7.exe" (the
"service wrapper") needs to know (such as, which JVM to start and with
which parameters)
(and remember, tomcat7.exe is a renamed "prunsrv.exe", which is one of
the 2 modules that are part of "procrun").
------------------
Let's step back a bit.
1) you install Tomcat on the machine, using the "Windows installer"
package from tomcat.apache.org.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat7\ImagePath
= "C:\apache-tomcat-xxxx\bin\tomcat7.exe //RS//Tomcat7"
(or similar)
This Registry value is the one that will be used by the Windows Service
Manager, to know which program to launch when you click on "Services..
Tomcat7...start".
3) when you login as a user onto the machine, open a command window,
and run the above command ("C:\apache-tomcat-xxxx\bin\tomcat7.exe
//RS//Tomcat7"), the tomcat7.exe program runs, and starts a JVM which
starts Tomcat, as a Service.
And that works fine, tomcat logs are produced etc.
4) when instead, you open the Windows Service Manager dialog, and ask
Windows to start the Tomcat service, nothing happens.
(Tomcat does not start, tomcat7.exe does not run, no logs are produced etc.)
- there is nothing wrong with Tomcat per se. Otherwise, it would not
run, no matter how it is started. There is also nothing wrong with the
JVM, for the same reasons.
- there is nothing wrong with the Registry parameters of "tomcat7.exe"
(the ones found under "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software
Foundation"). Otherwise, in case (3) above, tomcat7.exe would not be
able to start the JVM etc..
So there must be something wrong with the parameters used by the
Windows Service Manager when it tries to start the Tomcat service. (The
ones under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat7\)
What that would be, I couldn't say, and certainly not without access to your Registry.
1) de-install Tomcat again (do not delete the installer.exe file that
you downloaded, you'll need it again)
2) using the Registry Editor (carefully), go to the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat7\, and
delete it (and everything under it).
3) reboot Windows, and with the Registry Editor, verify that the key is
still deleted (I am saying that because who knows what MS will have
invented yet to re-instate things that you deleted..)
4) re-install the Tomcat service by re-running the installer
5) try again to start Tomcat
and tell us what happens.
---------------------------------------------------------------------
You might also want to download process monitor (not process explorer) from live.sysinternals.com, and have that running when you try and start the service. Filter out unrelated processes (explorer, iexplorer, csrss, etc.) and look for results that are not success (although if you actually filter on result is not success, you will probably see some false indicators, for example, Windows looks in the local directory and the Path for system DLLs, and will report a failure finding them until it does find them in the %windir%\system32 folder). Generally, the fatal errors occur towards the end of the run history of the applicable process.
Have you looked in Event Viewer for any additional error messages in the System or Application logs? Increased Tomcat logging to try and identify the source of the problem? I know you have used the command line, but if you start the Tomcat monitor (tomcatw.exe) and start the service from the monitor in the system tray, does that work?
Finally, do you have any unusual restrictions on your server? Are any other services failing to start? Based on your last posting, I would guess that it is a permissions issue. Does the system account have full permissions on the Tomcat directory?
This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments.