Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start Tomcat as Windows Service

I am using Tomcat6 on Windows 8. I am able to start Tomcat via startup.bat without error. I've copied Tomcat6.exe, Tomcat6w.exe and service.bat under tomcat/bin directory and set the .exe files to run as administrator.

I open command line with administrator rights and execute "service.bat install" which ran without error. In Windows Services, I can see Apache Tomcat 6 which I want to run automatically.

But both running from Windows Services using "Start" button and on start up of Windows I got the same error.

"Windows could not start the Apache Tomcat 6 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 0.

When I check Windows Event Log, I see the following bizarre error.

"Apache Tomcat 6 service terminated with the following service-specific error: The operation completed successfully."

I tried copying msvcr71.dll under tomcat/bin directory, but nothing changed. What else can I do?

Update:

I am using a different port than 8080. And I saw the error below in the log file /logs/jakarta_service.log:

%1 is not a valid Win32 application.

like image 417
melo Avatar asked Jul 09 '14 06:07

melo


People also ask

Why isn't my Tomcat server is not starting?

Most common issue with Tomcat note starting is that Java is not configured properly, user trying to start Tomcat does not have permissions to do so, or another program is using port 8080 on that server.


1 Answers

Go to Start > Configure Tomcat >

  • Startup > Mode = Java
  • Shutdown > Mode = Java

This worked for me!

like image 132
Prashant Avatar answered Oct 07 '22 17:10

Prashant