• Unable to create Windows Tomcat Service

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #21568  by mariot
 
I have successfully installed openKM on Windows 7 using the wizard. At the moment to startup/shutdown openKM I use the shortcuts created on the desktop. My preference is to create a windows service but am unable to get this working. Has anyone succeeded in creating a windows service to start/stop openKM on Windows?
 #21591  by jllort
 
You can take a look here : http://wiki.openkm.com/index.php/Config ... at_service we propose install tomcat installer which will configure as service and then overwrite with openkm tomcat files ( it's the most easies way for get it ). Other more elegant solution is here http://tomcat.apache.org/tomcat-7.0-doc ... howto.html
 #21615  by mariot
 
Thank you for your response.

I would like to get the Tomcat service configured using your first recommendation as it 'appears' to be quite straight forward. Navigating to the link you mentioned (http://wiki.openkm.com/index.php/Config ... at_service) it actually states that you should not over write the tomcat bundle with the tomcat windows service installer. To confirm this I ran the installer and specified the existing directories for the jre and tomcat (ie. C:\openkm-6.2.2-community\java\jre and C:\openkm-6.2.2-community\tomcat). I then ran the bat file C:\openkm-6.2.2-community\tomcat\bin\startup.bat to startup OpenKM. This resulted in java errors being displayed in numerous log files. I then navigated to http://localhost:8080/OpenKM and the error 'HTTP Status 404 - /OpenKM' was displayed. I also attempted to startup the Tomcat 7 service but this failed. A check of the event log showed the following errors:

The Apache Tomcat Tomcat7 service terminated with service-specific error The operation completed successfully..

- EventData
param1 Apache Tomcat Tomcat7
param2 %%0


Can you please suggest which directories I should specified when running the apache-tomcat-7.0.27.exe Windows Service Installer?

NOTE: I initially ran openkm-6.2.2-community-windows-installer.exe to successfully install OpenKM and was then able to login into http://localhost:8080/OpenKM
 #21623  by jllort
 
The description in wiki is a fast way to configure tomcat, in your case I think the idea should be:
1- intall openkm at -> c:\openkm -> which will contains folder tomcat
2- rename c:\openkm\tomcat to tomcat_old
3- use tomcat installer and install to c:\openkm\tomcat
4- test start / stop service
5- ( with tomcat service stopped ) copy all contents into c:\openkm\tomcat_old to c:\openkm\tomcat

As you can see it's not a very clean and professional way to get tomcat installed as service, but is the easiest I can suggest now. The other way is described in tomcat website page where's indicated how register tomcat using command line tool ( more complex and needs understanding where's java path etc... )
 #50179  by sammy
 
OpenKM Service Failure To Start with an Error message

Good morning Members,

I really do need help at this time?
Kindly go through my explanation below and provide me with assistance to best way in resolving the OpneKM service failure issue i encounter

OpenKM & Tomcat was installed successful, but Open KM service failed to start as shown below.
Code: Select all
SUCCESS: Specified value was saved.
- Configure service
Installing the service 'OpenKM' ...
Using CATALINA_HOME:    "C:\tomcat-8.5.34"
Using CATALINA_BASE:    "C:\tomcat-8.5.34"
Using JAVA_HOME:        "C:\Program Files\Java\jdk1.8.0_231"
Using JRE_HOME:         "C:\Program Files\Java\jdk1.8.0_231\jre"
Using JVM:              "C:\Program Files\Java\jdk1.8.0_231\jre\bin\server\jvm.dll"
Failed installing 'OpenKM' service
Following several other advice from different forums, some of the forums are shown in the link below.

1. See the link below and its steps

https://docs.openkm.com/kcenter/view/ok ... asaservice

https://support.eset.com/en/kb5550-apac ... sue-era-6x

https://stackoverflow.com/questions/458 ... ror-incorr


2. After battling with this for such a long time, i then repeated one of the step again which is;
In the java tab of the "openkmw" config file i changed the drop down option in "Mode" section from jvm to Java

I then restarted the service from service management console and it did restarted, like two hours later when I checked i then discovered that the service had gone down again.

The error message displayed when i tried to restart the service is ;

For Error Code 1

""Windows could not start the OpenKM 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 the service-specific error code 1.""

In Event Viewer the code 1 error shows this in System Event log/Viewer;

The OpenKM service terminated with the following service-specific error:
Incorrect function.

All this happens when Java mode is selected in Startup Tab & when Use Default is selected in the Java Tab
________________________
For Error Code 4

""Windows could not start the OpenKM 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 the service-specific error code 4.""

In Event Viewer the code 4 error shows this in System Event log/Viewer;

The OpenKM service terminated with the following service-specific error:
The system cannot open the file.

All this happens when jvm mode is selected in Startup/Shutdown Tab & when Use Default is selected in the Java Tab

Regards
 #50187  by jllort
 
1- Did you installed the application with Administrator user? because it is mandatory to registering services.
2- Did you have a previous Tomcat or OpenKM service, you should remove it before trying to install newer.

My suggestion is revert all the service changes:
1- Ensure your JAVA_HOME point to JDK either JRE ( check your environment variables , you should have one named JAVA_HOME )
2- Open a terminal with administrator
3- go into TomcatXXX/bin folder and execute the command line
service.bat delete ( I do not remember if it is delete or remove, install etc... if you execute service.bat alone you will see the available parameters )
4- execute the command line "service.bat install" to register the service
5- execute the next command lines to register JVM in the service
Code: Select all
openkm //US//OpenKM ++JvmOptions="XX:+UseG1GC"
openkm //US//OpenKM ++JvmOptions="-Djava.awt.headless=true"
openkm //US//OpenKM ++JvmOptions="-Djava.net.preferIPv4Stack=true"
openkm //US//OpenKM ++JvmOptions="-Dfile.encoding=utf-8"
openkm //US//OpenKM ++JvmOptions="-Dsun.jnu.encoding=UTF-8"
openkm //US//OpenKM ++JvmOptions="-Dmail.mime.ignoreunknownencoding=true"

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.