-
1. Re: Infinispan Server as Windows Service
login4imtiaz Nov 5, 2014 5:05 PM (in response to login4imtiaz)Did some research and used open source java service wrapper: http://yajsw.sourceforge.net/
It worked fine and was able to create service running on Windows 2012 R2.
Just for information ...It's a two server development cluster running Infinispan on two VMs in Windows Azure Cloud.
-
2. Re: Infinispan Server as Windows Service
nadirx Nov 6, 2014 2:58 AM (in response to login4imtiaz)If you could be so kind to describe the procedure or, even better, contribute with scripts/etc, that would be great !
-
3. Re: Infinispan Server as Windows Service
login4imtiaz Nov 6, 2014 10:17 AM (in response to nadirx)Installing Infinispan as Windows Service:
Following are the steps to install Inifinispan as a Windows service. Pretty much all the instructions are from the wrapper website with few updates. Kudos to YAJSW team to make this wrapper available for the community.
- Download YAJSW
- Unpack the zip file to a folder <yajsw>.
- Do not remove or copy files from this folder to any another folder. Do not rename any folders within <yajsw>. For this you may have to change the manifest in the jar files.
- Call java -version and make sure that your default java installation is 1.5 or higher
- If this is not the case make sure that java 1.5 or higher is installed and adapt the environment variable java_exe in bat/setenv.bat.
- Start the application you would like to wrap. For example start ./clustered.bat to run Infinispan. Check the process id of your application (look in Task Manager/Process Details). NOTE: we need the pid of the application not the batch file which started the application.
- Goto yajsw/bat folder and execute:
- genConfig.bat <pid>
- This generates the file yajsw/conf/wrapper.conf which is the configuration file for wrapping your application
- Stop your application (infinispan)
- Open conf/wrapper.conf with a text editor and set the password for wrapper.app.password or comment out wrapper.app.account (#).
- Update the values in wrapper.conf file as follow (choose your preferred service name, the auto generated name by wrapper is not going to work)
# Name of the service
wrapper.ntservice.name=infinispan_service
# Display name of the service
wrapper.ntservice.displayname=infinispan_service
# Description of the service
wrapper.ntservice.description=infinispan_service- Execute your wrapped application as console application by calling
- runConsole.bat
- check that your application (infinispan) is running. This will verify wrapper worked correctly.
- To Install the application as service call
- installService.bat
- To start the service: (You can also start/stop from Services panel)
- startService.bat
- To stop the service:
- stopService.bat
- To uninstall the service:
- uninstallService.bat
If you need any help just post on this thread and I will try to help.
-
4. Re: Infinispan Server as Windows Service
stejas7 Feb 16, 2016 12:46 AM (in response to login4imtiaz)I Following ur steps to install Inifinispan as a Windows service. when I am going to execute runConsole.bat.its gives me below error
INFO|15176/4|yajsw|16-02-16 11:08:36|[INFO] StandardFileSystemManager - Using "C
:\Users\CHIRAG~1.ADM\AppData\Local\Temp\vfs_cache" as temporary files store.
INFO|15176/4|yajsw|16-02-16 11:08:36|org.jboss.modules.ModuleNotFoundException:D:\\Java\\jdk1.8.0_51\\bin\\java
INFO|15176/4|yajsw|16-02-16 11:08:36| at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:236)
INFO|15176/4|yajsw|16-02-16 11:08:36| at org.jboss.modules.Main.main(Main.java:384)checkRemainConc scripts/trayMessage.gv 1
INFO|15176/4|yajsw|16-02-16 11:08:36| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|wrapper|yajsw|16-02-16 11:08:36|executed script: scripts/trayMessage.gv 1
INFO|15176/4|yajsw|16-02-16 11:08:36| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|15176/4|yajsw|16-02-16 11:08:36| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|15176/4|yajsw|16-02-16 11:08:36| at java.lang.reflect.Method.invoke(Method.java:497)
INFO|15176/4|yajsw|16-02-16 11:08:36| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|15176/4|yajsw|16-02-16 11:08:36| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|wrapper|yajsw|16-02-16 11:08:37|restart process due to default exit code rule
INFO|wrapper|yajsw|16-02-16 11:08:37|restart internal RUNNING
INFO|wrapper|yajsw|16-02-16 11:08:37|stopping process with pid/timeout 15176 45000
INFO|wrapper|yajsw|16-02-16 11:08:37|process exit code: 1
WARNING|wrapper|yajsw|16-02-16 11:08:43|working directory not foundsystem.env 49
INFO|wrapper|yajsw|16-02-16 11:08:43|started process with pid 15220
INFO|15220/5|yajsw|16-02-16 11:08:43|[INFO] StandardFileSystemManager - Using "C:\Users\CHIRAG~1.ADM\AppData\Local\Temp\vfs_cache" as temporary files store.
INFO|15220/5|yajsw|16-02-16 11:08:43|org.jboss.modules.ModuleNotFoundException:D:\\Java\\jdk1.8.0_51\\bin\\javacheckRemainConc scripts/trayMessage.gv 1
INFO|15220/5|yajsw|16-02-16 11:08:43| at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:236)
INFO|15220/5|yajsw|16-02-16 11:08:43| at org.jboss.modules.Main.main(Main.java:384)
INFO|wrapper|yajsw|16-02-16 11:08:43|executed script: scripts/trayMessage.gv 1
INFO|15220/5|yajsw|16-02-16 11:08:43| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|15220/5|yajsw|16-02-16 11:08:43| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|15220/5|yajsw|16-02-16 11:08:43| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|15220/5|yajsw|16-02-16 11:08:43| at java.lang.reflect.Method.invoke(Method.java:497)
INFO|15220/5|yajsw|16-02-16 11:08:43| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|15220/5|yajsw|16-02-16 11:08:43| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)