Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Tomcat 8.5 . Error: Service terminated with service specific error incorrect function

i have installed apache tomcat 8.5 one month ago with java 1.8 on Windows Server 2008 and it works ok. now the service is stopped and i'm not able to restart it from apache configuration or Windows Services . It is always stopped. i got the following error: "service terminated with service specific error incorrect function".

error description

ther error in Windows Event viewer does not saying nothing more:

event viewer

even its details tab:

event details

What can i do?

like image 629
improc Avatar asked Aug 23 '17 14:08

improc


2 Answers

Currently I have a Windows Server 2012 R2 Datacenter running Tomcat 9 & had the same problem. This happened after I ran Windows updates & restarted the Server.

Error messages below. (The blanked out text is my private data.)

Error showed when attempting to start the service.

Error in System Event Log

The following steps fixed the issue...

  1. Navigate to your tomcat9w.exe Location: \Tomcat9\bin\
  2. Right click your tomcat9w.exe and select Run as administrator.
  3. Select the Java tab. Select Use default, Apply, & OK
  4. Start your service.

Note: I unchecked the "Use default" box after I was able to get the service running correctly. Because I wanted to retain my existing configuration. Going forward the service has continued to work correctly.

Hope this helps!

like image 25
networkgold Avatar answered Sep 28 '22 02:09

networkgold


I was trying to install Apache Tomcat/8.5.31 as Windows service and i was also facing the same error.

For me what finally worked was following these steps. Go to Tomcat installation directory's bin folder. You will see two EXEs (tomcat8.exe and tomcat8w.exe). tomcat8w.exe is a GUI application for monitoring and configuring Tomcat services. Double-click it and then go to Java tab
1) Enable the check box for Use default
2) In Java Classpath: section, specify the path to bootstrap.jar and tomcat-juli.jar. These should be present in your tomcat installation's bin directory itself:

<path_to_tomcat_installation>\bin\bootstrap.jar;<path_to_tomcat_installation>\bin\tomcat-juli.jar

enter image description here

To get more help, you may check the log at the following location provided you installed your Tomcat as Windows service using default LogPath option as described in the documentation: %SystemRoot%\System32\LogFiles\Apache

UPDATE: In another recent installation, i noticed that despite having configuration settings exactly similar to another working setup, i was still getting Incorrect function error under System log in Event Viewer. This time, i had to uncheck the Use default option and had to explicitly provide path to jvm.dll as shown below:

enter image description here

Java Classpath setting was still required as explained above.

like image 89
Technext Avatar answered Sep 28 '22 00:09

Technext