Hello folks. I'm attempting to create/start a service (Windows 2008 R2) using the yajsw-stable-11.11 product, for our LiveCycle gemfire locator services.
However, when I attempt to start the service, it restarts several times and then ends.
Running the locator as a process works just fine, but not as a service.
Any help you can provide would be appreciated. Thank you.
The instructions I am following are from the URL:
http://blogs.adobe.com/livecycle/2012/06/windows-service-for-tcp-locator.html
Here is the service command:
C:\Program Files\Java\jre7\bin\java.exe -classpath E:\AdobeMisc\yajsw-stable-11.11\wrapper.jar -Xrs -Dwrapper.service=true -Dwrapper.working.dir=E:\AdobeMisc\caching -Djava.net.preferIPv4Stack=true -Dwrapper_home=E:\AdobeMisc\yajsw-stable-11.11\bat\/.. -Djna_tmpdir=E:\AdobeMisc\yajsw-stable-11.11\bat\/../tmp -Dwrapper.config=E:\AdobeMisc\yajsw-stable-11.11\conf\wrapper.conf -Dwrapper.additional.1x=-Xrs -Djna_tmpdir=E:\AdobeMisc\yajsw-stable-11.11\bat..\tmp org.rzo.yajsw.boot.WrapperServiceBooter
Here is the wrapper.log output.
WARNING|wrapper|yajsw|14-02-28 09:31:59|YAJSW: yajsw-stable-11.11
WARNING|wrapper|yajsw|14-02-28 09:31:59|OS : Windows Server 2008 R2/6.1/amd64
WARNING|wrapper|yajsw|14-02-28 09:31:59|JVM : Oracle Corporation/1.7.0_45/C:\Program Files\Java\jre7/64
INFO|wrapper|yajsw|14-02-28 09:31:59|ahessian jmx service bound to port 15002
INFO|wrapper|yajsw|14-02-28 09:32:00|spawned system tray icon process with pid 10224
INFO|wrapper|yajsw|14-02-28 09:32:00|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:00|started process with pid 6700
WARNING|wrapper|yajsw|14-02-28 09:32:01|[id: 0xba34008f, /127.0.0.1:53523 => /127.0.0.1:15002] connected
INFO|6700/0|yajsw|14-02-28 09:32:01|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|6700/0|yajsw|14-02-28 09:32:01|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|6700/0|yajsw|14-02-28 09:32:02|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|6700/0|yajsw|14-02-28 09:32:02|A zero-length address will bind to localhost
INFO|6700/0|yajsw|14-02-28 09:32:02|A zero-length gemfire-properties-file will mean use the default search path
INFO|6700/0|yajsw|14-02-28 09:32:02|peerLocator and serverLocator both default to true
INFO|6700/0|yajsw|14-02-28 09:32:02|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:02|restart process due to default exit code rule
INFO|wrapper|yajsw|14-02-28 09:32:02|restart internal RUNNING
INFO|wrapper|yajsw|14-02-28 09:32:02|stopping process with pid/timeout 6700 45000
INFO|wrapper|yajsw|14-02-28 09:32:03|process exit code: 1
INFO|wrapper|yajsw|14-02-28 09:32:08|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:08|started process with pid 7052
INFO|7052/1|yajsw|14-02-28 09:32:09|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|7052/1|yajsw|14-02-28 09:32:09|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|7052/1|yajsw|14-02-28 09:32:09|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|7052/1|yajsw|14-02-28 09:32:09|A zero-length address will bind to localhost
INFO|7052/1|yajsw|14-02-28 09:32:09|A zero-length gemfire-properties-file will mean use the default search path
INFO|7052/1|yajsw|14-02-28 09:32:09|peerLocator and serverLocator both default to true
INFO|7052/1|yajsw|14-02-28 09:32:09|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:10|restart process due to default exit code rule
INFO|wrapper|yajsw|14-02-28 09:32:10|restart internal RUNNING
INFO|wrapper|yajsw|14-02-28 09:32:10|stopping process with pid/timeout 7052 45000
INFO|wrapper|yajsw|14-02-28 09:32:11|process exit code: 1
INFO|wrapper|yajsw|14-02-28 09:32:16|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:16|started process with pid 5172
INFO|5172/2|yajsw|14-02-28 09:32:17|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|5172/2|yajsw|14-02-28 09:32:17|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|5172/2|yajsw|14-02-28 09:32:17|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|5172/2|yajsw|14-02-28 09:32:17|A zero-length address will bind to localhost
INFO|5172/2|yajsw|14-02-28 09:32:17|A zero-length gemfire-properties-file will mean use the default search path
INFO|5172/2|yajsw|14-02-28 09:32:17|peerLocator and serverLocator both default to true
INFO|5172/2|yajsw|14-02-28 09:32:17|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:18|restart process due to default exit code rule
INFO|wrapper|yajsw|14-02-28 09:32:18|restart internal RUNNING
INFO|wrapper|yajsw|14-02-28 09:32:18|stopping process with pid/timeout 5172 45000
INFO|wrapper|yajsw|14-02-28 09:32:18|process exit code: 1
INFO|wrapper|yajsw|14-02-28 09:32:24|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:24|started process with pid 7184
INFO|7184/3|yajsw|14-02-28 09:32:24|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|7184/3|yajsw|14-02-28 09:32:24|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|7184/3|yajsw|14-02-28 09:32:25|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|7184/3|yajsw|14-02-28 09:32:25|A zero-length address will bind to localhost
INFO|7184/3|yajsw|14-02-28 09:32:25|A zero-length gemfire-properties-file will mean use the default search path
INFO|7184/3|yajsw|14-02-28 09:32:25|peerLocator and serverLocator both default to true
INFO|7184/3|yajsw|14-02-28 09:32:25|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:25|restart process due to default exit code rule
INFO|wrapper|yajsw|14-02-28 09:32:25|restart internal RUNNING
INFO|wrapper|yajsw|14-02-28 09:32:25|stopping process with pid/timeout 7184 45000
INFO|wrapper|yajsw|14-02-28 09:32:26|process exit code: 1
INFO|wrapper|yajsw|14-02-28 09:32:31|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:31|started process with pid 728
INFO|728/4|yajsw|14-02-28 09:32:32|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|728/4|yajsw|14-02-28 09:32:32|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|728/4|yajsw|14-02-28 09:32:32|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length address will bind to localhost
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length gemfire-properties-file will mean use the default search path
INFO|728/4|yajsw|14-02-28 09:32:32|peerLocator and serverLocator both default to true
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:33|restart process due to default exit code rule
INFO|wrapper|yajsw|14-02-28 09:32:33|restart internal RUNNING
INFO|wrapper|yajsw|14-02-28 09:32:33|stopping process with pid/timeout 728 45000
INFO|wrapper|yajsw|14-02-28 09:32:33|process exit code: 1
INFO|wrapper|yajsw|14-02-28 09:32:38|working dir E:\AdobeMisc\caching
INFO|wrapper|yajsw|14-02-28 09:32:38|started process with pid 8576
INFO|8576/5|yajsw|14-02-28 09:32:39|[INFO] StandardFileSystemManager - Using "C:\Users\hajohn_a\AppData\Local\Temp\2\vfs_cache" as temporary files store.
INFO|8576/5|yajsw|14-02-28 09:32:40|!! WARNING !! Windows JDK7 should set -Djava.net.preferIPv4Stack=true (see java bug 7179799 )
INFO|8576/5|yajsw|14-02-28 09:32:40|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|8576/5|yajsw|14-02-28 09:32:40|A zero-length address will bind to localhost
INFO|8576/5|yajsw|14-02-28 09:32:40|A zero-length gemfire-properties-file will mean use the default search path
INFO|8576/5|yajsw|14-02-28 09:32:40|peerLocator and serverLocator both default to true
INFO|8576/5|yajsw|14-02-28 09:32:40|A zero-length hostname-for-clients will default to bind-address
INFO|wrapper|yajsw|14-02-28 09:32:40|too many restarts
INFO|wrapper|yajsw|14-02-28 09:32:40|process not in state RUNNING -> Delaying stop
INFO|wrapper|yajsw|14-02-28 09:32:40|Shutting down Wrapper
WARNING|wrapper|yajsw|14-02-28 09:32:40|[id: 0xba34008f, /127.0.0.1:53523 => /127.0.0.1:15002] exception java.io.IOException: An existing connection was forcibly closed by the remote host
You aren't configuring the wrapped app correctly. When YAJSW Tries to start it, it's spitting out:
INFO|728/4|yajsw|14-02-28 09:32:32|Usage: port [bind-address] [peerLocator] [serverLocator] [hostname-for-clients]
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length address will bind to localhost
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length gemfire-properties-file will mean use the default search path
INFO|728/4|yajsw|14-02-28 09:32:32|peerLocator and serverLocator both default to true
INFO|728/4|yajsw|14-02-28 09:32:32|A zero-length hostname-for-clients will default to bind-address
Your problem is somewhere in your wrapper.config.
can you be more specific please? I followed the instructions, which generates the wrapper.conf from the process, then I modify as follows:
10.Open conf/wrapper.conf with a text editor and make the following changes. ◾wrapper.ntservice.name=TCPLocatorServiceForLiveCycle
◾wrapper.ntservice.displayname=TCP Locator Service For LiveCycle
◾wrapper.ntservice.description=Starts TCP Locator
What other parts of the wrapper.conf do I need to adjust? None of that is mentioned in the instructions.
edit: inline code deleted - file attached
thnx
Last edit: Harry 2014-03-01
edit: sry for the huge font size - it defaulted to that when I pasted in the file.
It's easier if you just attach the file
Here's the file, thnx
You really need to provide the syntax on what you would use to start it up without the wrapper. The parts you need are at the end of the conf file.
I suspect you need something nearer to this:
wrapper.java.command = C:\Program Files\Java\jre7\bin\java.exe
wrapper.java.classpath.1 = E:\AdobeMisc\caching\gemfire.jar
wrapper.java.additional.1 = -Djava.io.tmpdir=e:\AdobeStorage\jvm
wrapper.java.additional.2 = -Dgemfire.log-file=GFLocator.log
wrapper.java.additional.3 = -Dgemfire.license-file=gemfireLicense.zip
wrapper.java.additional.4 = -server
wrapper.app.parameter.1 = 22345
wrapper.app.parameter.2 = APU
wrapper.app.parameter.3 = true
wrapper.app.parameter.4 = true
But, you'll need to play around. The auto generator isn't astoundingly good. It's a lot easier to hack the conf up yourself.
Last edit: abest.tandemradiology 2014-03-01
I tried various incarnations of the code above, but I keep getting the following: (either as service or as runconsole)
Also, it's important that the double backwards slashes are maintained, or the command is truncated with no slashes at all.
eg: wrapper.java.command = C:\Program Files\Java\jre7\bin\java.exe
INFO|1988/5|Service yajsw|14-03-03 15:51:40|[severe 2014/03/03 15:51:40.190 PST <main> tid=0x1] Could not start locator
INFO|1988/5|Service yajsw|14-03-03 15:51:40|com.gemstone.gemfire.SystemIsRunningException: Locator "E:\AdobeMisc\caching" is already running.
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at com.gemstone.gemfire.internal.ManagerInfo.setLocatorStarting(ManagerInfo.java:68)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at com.gemstone.gemfire.internal.DistributionLocator.main(DistributionLocator.java:138)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at java.lang.reflect.Method.invoke(Unknown Source)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:53)
INFO|1988/5|Service yajsw|14-03-03 15:51:40| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:36)
INFO|1988/5|Service yajsw|14-03-03 15:51:40|
INFO|1988/5|Service yajsw|14-03-03 15:51:40|[info 2014/03/03 15:51:40.205 PST <Thread-1> tid=0x11] Locator stopped
OK, I found out what the problem was - after I applied your changes (from abest.tandemr), I had to remove the temporary caching files that were previously generated in the e:\adobemisc\caching folder before the service would start up.
So, it appears to be working now just fine!
Thank you to all for your help!
hello,
as abest.tandemradiology stated, the log file shows that your app starts up correctly but terminates for some unkonwn reason.
before installing as service, one should try to get the correct configuration and run it using runConsole.bat
is the application running ok with runConsole.bat ?
if yes, but it is not running as service, this could be a rights or environment var issue.
try setting:
to the account you are logged to when running runConsole.bat.
note to stop/uninstall the service when doing changes to the configuration. then reinstall.
if it does not run with runConsole.bat, then you should consider checking the configuration.
looking at the configuration file you posted i see:
did genConfig.bat generate this ?
if so, could you pls redo the configuration generation and post the command line of the process, which is printed to the console of genConfig.bat, this will help to figure out the configuration you need and to resolve the bug in genConfig.
i suppose you will need to set:
-- Ron
@rzo. IN answer to your questions:
- no, runconsole also had the same errors.
- I had tried adding the accouint/pw, but that didn't solve it.
- the #wrapper.java.app.mainclass=-Dgemfire.license-type=production line was added by genconfig.bat, but generated a completely different error. I had to replace the line with the other one above to get it to work.
thanks for your help.
Hello Harry,
could you pls provide the command line of your process which was used in genConfig.
there is a bug parsing this command line and it would be great if i can reproduce it.
thanks,
-- Ron