Reputation: 5192
i have already installed tomcat service with old tomcat path..
Now i want to configure it with latest tomcat and install new service instead of old one..
problem is that i have deleted old tomcat version and services.msc have tomcat's old path.
as D:\Tomcat_5_5_27\bin\tomcat5.exe //RS//Tomcat5
above one is deleted from machine.
now i m going to install latest version service as
D:\tomcat6\bin> service.bat install
it gives error like
Installing the service 'Tomcat6' ...
Using CATALINA_HOME: D:\apache-tomcat-6.0.14
Using CATALINA_BASE: D:\apache-tomcat-6.0.14
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_13
Using JVM: C:\Program Files\Java\jdk1.6.0_13\jre\bin\server\jvm.dll
Failed installing 'Tomcat6' service
any suggestion ?
Upvotes: 5
Views: 8894
Reputation: 301
The Problem is with Windows. You don't write which version you have - but i guess its 2008.
You must run the Command Prompt as Administrator.
In the Start Menu, right click the Command Prompt and choose "Run as Administrator".
If you now start "service.bat install" it works!
Another way to see that you dont have administrator rights is this:
tomcat6.exe //IS//Tomcat6
[2014-02-04 11:16:44] [error] Unable to open the Service Manager
[2014-02-04 11:16:44] [error] Access is denied.
[2014-02-04 11:16:44] [error] Commons Daemon procrun failed with exit value: 7 (Failed to )
[2014-02-04 11:16:44] [error] Access is denied.
Again run as Administrator, and it works!
Cheers Per
Upvotes: 0
Reputation: 7257
learn the usage of sc command
sc query state= all
should list all services on command prompt
then find the short name, eg tomcat5
sc delete tomcat5 should get rid of it
Upvotes: 1
Reputation: 2032
My thoughts would be to first try running the service.bat remove
script to try and remove the service using the Tomcat6 files.
Failing that try downloading a fresh copy of Tomcat5 and removing the service. I have done this with multiple downloads of Tomcat6 successfully.
Upvotes: 3