Installing Nuxeo as a windows service using yajsw

I have successfully installed Nuxeo 5.6 as a windows service using yajsw 11.0.3 and following documentation :

http://doc.nuxeo.com/display/ADMINDOC/Installing+the+Nuxeo+Platform+as+a+Windows+service

When I started the service, tomcat started but Nuxeo application did not get loaded in it. wrapper.log in yajsw showed the following logs:

WARNING|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|YAJSW: yajsw-stable-11.03
WARNING|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|OS   : Windows 2003/5.2/x86
WARNING|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|JVM  : Sun Microsystems Inc./1.6.0_17
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|ahessian jmx service bound to port 15002
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|Win service: before service init
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|+ ServiceMain callback
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|reporting status 0
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|reporting status 0
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|onstart
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|set state IDLE->STARTING
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|Controller State: UNKNOWN -> WAITING
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|working dir D:\SysAppl\nuxeo
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:19|create script: scripts/trayMessage.gv
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:20|found script scripts/trayMessage.gv
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:20|started process with pid 5236
INFO|wrapper|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:20|set state STARTING->RUNNING
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:21|[INFO] StandardFileSystemManager - Using "D:\log\nuxeo\vfs_cache" as temporary files store.
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|platform null
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|Controller State: WAITING -> ESTABLISHED
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|Controller State: ESTABLISHED -> LOGGED_ON
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|Oct 22, 2012 11:25:22 AM org.apache.catalina.startup.Embedded initDirs
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|SEVERE: Cannot find specified temporary folder at D://log//nuxeo//
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|Oct 22, 2012 11:25:22 AM org.apache.catalina.core.AprLifecycleListener init
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:22|INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\APPL\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\opt\java1.4\bin;D:\APPL\Oracle\product\10.2.0\client_1\BIN;C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;\bin;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;D:\SysAppl\Mobius\DocumentDirect\ddrint\WEB-INF\lib
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|Oct 22, 2012 11:25:23 AM org.apache.coyote.http11.Http11Protocol init
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|INFO: Initializing Coyote HTTP/1.1 on http-8080
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|Oct 22, 2012 11:25:23 AM org.apache.catalina.startup.Catalina load
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|INFO: Initialization processed in 854 ms
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|Oct 22, 2012 11:25:23 AM org.apache.catalina.core.StandardService start
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|INFO: Starting service Catalina
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|Oct 22, 2012 11:25:23 AM org.apache.catalina.core.StandardEngine start
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|Oct 22, 2012 11:25:23 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:23|INFO: Deploying configuration descriptor host-manager.xml
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: Deploying configuration descriptor manager.xml
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: Deploying web application directory ROOT
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.coyote.http11.Http11Protocol start
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: Starting Coyote HTTP/1.1 on http-8080
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.jk.common.ChannelSocket init
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: JK: ajp13 listening on /0.0.0.0:8009
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.jk.server.JkMain start
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: Jk running ID=0 time=0/31  config=null
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|Oct 22, 2012 11:25:23 AM org.apache.catalina.startup.Catalina start
INFO|5236/0|Service d:\Appl\jre6\bin\java.exe|12-10-22 11:25:24|INFO: Server startup in 827 ms

I then started Nuxeo by executing Start Nuxeo.bat, then I stopped Nuxeo using Stop Nuxeo.bat, and then again I tried to start the installed service and the service started running perfectly fine.

There is something Start Nuxeo.bat is doing that when I start Nuxeo via installed service get missed; or maybe yajsw missed some property to generate in wrapper.conf.

I want to get rid of this 'start Nuxeo via Start Nuxeo.bat' step. Any kind of help will be appreciated :) Thanks.

0 votes

1 answers

1718 views

ANSWER

Hi,

Please use code/pre-formatted text for the logs, they are not readable like this. Or use a service such as pastebin.com.

10/22/2012



I got the the reason of this issue.

Application main class defined in wrapper.conf generated by yajsw is :
wrapper.java.app.mainclass=org.apache.catalina.startup.Bootstrap

So on start up the service will start tomcat, but as there is no application (nuxeo) in tomcat so tomcat starts, but nuxeo does not. To have nuxeo started at the time of service start up we can do either of the two following things:

  1. First start nuxeo via control panal or Start Nuxeo.bat. This will expand nuxeo bundles and create the structure of application for tomcat. Stop Nuxeo. Next time we will start installed service we will have nuxeo up and running as the bundles are expanded.

  2. Comment out wrapper.java.app.mainclass property and specify value nuxeo-launcher.jar for wrapper.java.app.jar in wrapper.conf. Also add wrapper.java.classpath.4 = .\bin\nuxeo-launcher.jar. After specifying these changes, install service and start it. Nuxeo will be up and runing at the time of service start up. The issue with this fix is that now if we stop the service, Nuxeo will still be running as we have changed service startup action.

1 votes