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

五迷三道 提交于 2019-12-06 03:44:18

问题


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".

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

even its details tab:

What can i do?


回答1:


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

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:

Java Classpath setting was still required as explained above.




回答2:


Set JavaHome in the ....\bin\catalina.bat config file Open the file with text editor e.g Notepad++

Example: set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144

Follow the link for more information

http://www.tech-recipes.com/rx/38517/how-to-set-the-java_home-enviroment-variable-in-tomcat/



来源:https://stackoverflow.com/questions/45842730/apache-tomcat-8-5-error-service-terminated-with-service-specific-error-incorr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!