Dashboard > GridGain User Guide > Table Of Contents > GridGain Node as Linux or Windows Service
GridGain Node as Linux or Windows Service
Added by dozer, last edited by morpheus on May 16, 2009  (view change)
Labels: 
(None)


Configuration

  1. Install GridGain
  2. Download Java Service Wrapper for your OS from http://wrapper.tanukisoftware.org
  3. Unpack it to some folder, i.e. SERVICE_WRAPPER
  4. Copy SERVICE_WRAPPER/bin/wrapper.exe (or wrapper for Linux) to the GRIDGAIN_HOME/bin
  5. Copy SERVICE_WRAPPER/lib/wrapper.jar to the GRIDGAIN_HOME/libs
  6. Copy SERVICE_WRAPPER/lib/wrapper.dll (or libwrapper.so) to the GRIDGAIN_HOME/libs
  7. For Linux, copy SERVICE_WRAPPER/src/bin/sh.script.in to the GRIDGAIN_HOME/bin and rename to gridgain_daemon.sh

Starting from GridGain 2.1.0 we will ship wrapper configuration (see GRIDGAIN_HOME/config/wrapper.conf). If you use older version you can find configuration template here wrapper.conf. Do not forget to update list of JAR files for the old GridGain version in this template.

  1. Edit wrapper configuration JVM parameters if you need. Change the "wrapper.app.parameter.2" parameter to use non default Grid configuration.
    Note: You should not miss numbers when count any parameters in wrapper.conf configuration file. All of them should go one by another in proper order (incremented by 1). For example, you can not write "parameter.2" without "parameter.1". Numbers should start from 1.
wrapper.conf

Note, GridGain 2.1.1 release has a wrong reference to jboss-serialization JAR file in GRIDGAIN_HOME/config/wrapper.conf file. Please change this JAR name from jboss-serialization-1.0.2.GA.jar to jboss-serialization-1.0.3.GA.jar.

libs/ext folder

The folder GRIDGAIN_HOME/libs/ext will not be picked up automatically when starting GridGain as a service. Make sure to add all additional jars in wrapper.conf file under wrapper.java.classpath.# properties.

Running Windows Service

  1. For Windows you need to install GridGain service before start it. Use that command to install service:
    %GRIDGAIN_HOME%/bin/wrapper.exe -i %GRIDGAIN_HOME%/config/wrapper.conf
  2. You can start service in the Control Panel -> Administration -> Services or use that command:
    %GRIDGAIN_HOME%/bin/wrapper.exe -t %GRIDGAIN_HOME%/config/wrapper.conf
  3. Use Control Panel or that command for stop GridGain service:
    %GRIDGAIN_HOME%/bin/wrapper.exe -p %GRIDGAIN_HOME%/config/wrapper.conf
  4. For uninstall GridGain service use this command:
    %GRIDGAIN_HOME%/bin/wrapper.exe -r %GRIDGAIN_HOME%/config/wrapper.conf

Running Linux Service

  1. You need to edit GRIDGAIN_HOME/gridgain_daemon.sh before run GridGain as daemon. Edit the following lines:
    APP_NAME="GridGain-2.0.3"
    APP_LONG_NAME="GridGain Node"
    WRAPPER_CONF="../config/wrapper.conf"
    RUN_AS_USER=[specify user (not root)]
  2. Now you can use "GRIDGAIN_HOME/gridgain_daemon.sh { console | start | stop | restart | status | dump}" command for start and stop GridGain daemon.

Wrapper Version

GridGain has been tested with Java Service Wrapper 3.2.3 version.

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators