Starting Wisemapping as a service On Windows

358 views
Skip to first unread message

daniels...@gmail.com

unread,
Jul 10, 2013, 11:01:35 AM7/10/13
to wisemappi...@googlegroups.com
I did some research and came up with a way to start jetty as a service in windows but I'm still having issues getting Wisemapping to start.

I ran through the directions here:
http://stackoverflow.com/questions/2094429/running-jetty-7-as-windows-service
And I set my Java_Home environment variable to:
C:\Progra~1\Java\jre7 which is correct for 64 bit windows.

The service starts and then exits.

Here is one of the logs:

[2013-07-10 07:54:41] [debug] ( prunsrv.c:1679) [ 1364] Commons Daemon procrun log initialized
[2013-07-10 07:54:41] [info] ( prunsrv.c:1683) [ 1364] Commons Daemon procrun (1.0.15.0 32-bit) started
[2013-07-10 07:54:41] [info] ( prunsrv.c:1596) [ 1364] Running 'JettyService' Service...
[2013-07-10 07:54:41] [debug] ( prunsrv.c:1374) [ 912] Inside ServiceMain...
[2013-07-10 07:54:41] [debug] ( prunsrv.c:844 ) [ 912] reportServiceStatusE: 2, 0, 3000, 0
[2013-07-10 07:54:41] [info] ( prunsrv.c:1127) [ 912] Starting service...
[2013-07-10 07:54:41] [info] ( prunsrv.c:1284) [ 912] Service started in 0 ms.
[2013-07-10 07:54:41] [debug] ( prunsrv.c:844 ) [ 912] reportServiceStatusE: 4, 0, 0, 0
[2013-07-10 07:54:41] [debug] ( prunsrv.c:1528) [ 912] Waiting for worker to finish...
[2013-07-10 07:54:49] [debug] ( prunsrv.c:844 ) [ 1364] reportServiceStatusE: 4, 0, 0, 0
[2013-07-10 07:55:25] [debug] (rprocess.c:122 ) [ 3524] Child process exit code -2
[2013-07-10 07:55:25] [debug] ( prunsrv.c:1533) [ 912] Worker finished.
[2013-07-10 07:55:25] [debug] ( prunsrv.c:1559) [ 912] Waiting for all threads to exit
[2013-07-10 07:55:25] [debug] ( prunsrv.c:844 ) [ 912] reportServiceStatusE: 3, 0, 0, 0
[2013-07-10 07:55:25] [debug] ( prunsrv.c:1563) [ 912] JVM destroyed.
[2013-07-10 07:55:25] [debug] ( prunsrv.c:844 ) [ 912] reportServiceStatusE: 1, 1066, 0, -2
[2013-07-10 07:55:25] [info] ( prunsrv.c:1598) [ 1364] Run service finished.
[2013-07-10 07:55:25] [info] ( prunsrv.c:1764) [ 1364] Commons Daemon procrun finished

Here's my STDERR log.

2013-07-10 07:54:41 Commons Daemon procrun stderr initialized
2013-07-10 07:54:42.180:INFO:oejs.Server:oejs.Server#doStart(Server.java:268):jetty-8.1.8.v20121106
2013-07-10 07:54:42.196:INFO:oejdp.ScanningAppProvider:oejdp.ScanningAppProvider#doStart(ScanningAppProvider.java:113):Deployment monitor C:\Java\wisemapping-v3.0.1.GA\webapps at interval 1
2013-07-10 07:54:42.212:INFO:oejdp.ScanningAppProvider:oejdp.ScanningAppProvider#doStart(ScanningAppProvider.java:113):Deployment monitor C:\Java\wisemapping-v3.0.1.GA\contexts at interval 1
2013-07-10 07:54:42.212:INFO:oejd.DeploymentManager:oejd.DeploymentManager#addApp(DeploymentManager.java:132):Deployable added: C:\Java\wisemapping-v3.0.1.GA\contexts\wisemapping.xml
Null identity service, trying login service: org.eclipse.jetty.security.DefaultIdentityService@125e96c2
Finding identity service: org.eclipse.jetty.security.DefaultIdentityService@125e96c2
LoginService=HashLoginService[Test Realm] identityService=org.eclipse.jetty.security.DefaultIdentityService@125e96c2
2013-07-10 07:54:48.889:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):No Spring WebApplicationInitializer types detected on classpath
2013-07-10 07:54:49.232:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:54:49.232:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:54:49.232:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:54:49.232:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:54:49.295:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring root WebApplicationContext
2013-07-10 07:54:52.134:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:54:52.228:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring FrameworkServlet 'mvc-rest'
2013-07-10 07:54:53.210:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring FrameworkServlet 'mvc-servlet'
2013-07-10 07:54:53.569:INFO:oejdp.ScanningAppProvider:oejdp.ScanningAppProvider#doStart(ScanningAppProvider.java:113):Deployment monitor C:\Java\wisemapping-v3.0.1.GA\webapps at interval 1
2013-07-10 07:54:53.569:INFO:oejdp.ScanningAppProvider:oejdp.ScanningAppProvider#doStart(ScanningAppProvider.java:113):Deployment monitor C:\Java\wisemapping-v3.0.1.GA\contexts at interval 1
2013-07-10 07:54:53.569:INFO:oejd.DeploymentManager:oejd.DeploymentManager#addApp(DeploymentManager.java:132):Deployable added: C:\Java\wisemapping-v3.0.1.GA\contexts\wisemapping.xml
Null identity service, trying login service: org.eclipse.jetty.security.DefaultIdentityService@3470e98e
Finding identity service: org.eclipse.jetty.security.DefaultIdentityService@3470e98e
LoginService=HashLoginService[Test Realm] identityService=org.eclipse.jetty.security.DefaultIdentityService@3470e98e
2013-07-10 07:55:00.590:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):No Spring WebApplicationInitializer types detected on classpath
2013-07-10 07:55:00.730:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:55:00.730:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:55:00.730:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:55:00.730:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:55:00.777:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring root WebApplicationContext
2013-07-10 07:55:24.179:INFO:oejsh.ContextHandler:oejsh.ContextHandler#callContextInitialized(ContextHandler.java:772):started o.e.j.w.WebAppContext{/wisemapping,file:/C:/Java/wisemapping-v3.0.1.GA/webapps/wisemapping/}
2013-07-10 07:55:24.242:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring FrameworkServlet 'mvc-rest'
2013-07-10 07:55:25.006:INFO:/wisemapping:oejsh.ContextHandler$Context#log(ContextHandler.java:1990):Initializing Spring FrameworkServlet 'mvc-servlet'
2013-07-10 07:55:25.303:INFO:oejs.AbstractConnector:oejs.AbstractConnector#doStart(AbstractConnector.java:338):Started SelectChann...@0.0.0.0:80
2013-07-10 07:55:25.303:WARN:oejuc.AbstractLifeCycle:oejuc.AbstractLifeCycle#setFailed(AbstractLifeCycle.java:204):FAILED SelectChann...@0.0.0.0:80: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:288)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:472)
at org.eclipse.jetty.start.Main.start(Main.java:620)
at org.eclipse.jetty.start.Main.main(Main.java:95)
2013-07-10 07:55:25.303:WARN:oejuc.AbstractLifeCycle:oejuc.AbstractLifeCycle#setFailed(AbstractLifeCycle.java:204):FAILED org.eclipse.jetty.server.Server@2fd8e84: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:288)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:472)
at org.eclipse.jetty.start.Main.start(Main.java:620)
at org.eclipse.jetty.start.Main.main(Main.java:95)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:472)
at org.eclipse.jetty.start.Main.start(Main.java:620)
at org.eclipse.jetty.start.Main.main(Main.java:95)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:288)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189)
... 7 more

jdta...@gmail.com

unread,
Nov 19, 2013, 7:01:59 PM11/19/13
to wisemappi...@googlegroups.com
I am seeing exactly the same issue but only with Java 7. In fact, I have been using procrun for Jetty with Java 6 for months. We decided to upgrade to Java 7 but that doesn't work. I had to switch back to Java 6 to get Jetty running again.

--johnt

Reply all
Reply to author
Forward
0 new messages