I have installed Tomcat v8.5.73 as a windows service using the following command:
CATALINA_HOME/bin> tomcat8 //IS//Tomcat8 --DisplayName="MyService"
But when I try to start the service from windows services app (As administrator) it shows the following error
Windows could not start the MyService on local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1
I also tried stating the service the following way:
CATALINA_HOME/bin> startup
This worked but I had to allow access to private/public networks (Don't remember which one).
Here is some additional information:
What could be the reason for this error?
The recommended way to install Tomcat8.5 as a service is to open a command prompt as administrator, then cd %TOMCAT_HOME%\bin
, and run service.bat install
. This script provides many more parameters. (In a cmd bat script, ^ before newline continues a command on the next line.)