JavaSheriff
JavaSheriff

Reputation: 7665

The specified service does not exist as an installed service

I am getting this error from tomcat:

The specified service does not exist as an installed service.
Unable to open the service “tomcat8”

Then application will not start at all,

So I opened command line and installed the service:

    tomcat8.exe //IS//tomcat_8_ServiceName    

But still facing the same issue
Assuming i have multiple tomcats on the same box,
Where is the exe file tomcat8w.exe getting the service name from?

Print Screen:

Upvotes: 5

Views: 29997

Answers (2)

hello_earth
hello_earth

Reputation: 1562

note that it is easier to install Tomcat as a service using service.bat script, situated in bin directory (the JVM parameters etc. are added automatically, which is not done using tomcat7.exe //IS//xx). if you use it, at least for Tomcat 7, as was my case, you use the command

service.bat install myService

the service that gets created is named "Apache Tomcat myService", which then can be edited with tomcat7w like this:

tomcat7w.exe //ES//myService

i.e. the following WILL NOT work and produce the above error:

tomcat7w.exe //ES//"Apache Tomcat myService"

Upvotes: 5

JavaSheriff
JavaSheriff

Reputation: 7665

After a few hours of struggle I installed new tomcat using the Service installer just to see what is it doing, apparently the installer changes the name of the executable .exe file to match the service name.

so if you run

 tomcat8w.exe  

It will look for service name: tomcat8

So I went back to my old tomcat directory and after installing the service using the command:

 tomcat8.exe //IS//tomcat_8_ServiceName  

I renamed the executable file from tomcat8w.exe to tomcat_8_ServiceNamew.exe

Now its working like a charm!

Upvotes: 12

Related Questions