Go to new doc!

+49 228 5552576-0


info@predic8.com

Deploying Membrane Router as a Windows Service

Using the free Java Service Wrapper from Tanuki Software, setting up Membrane Router as a service requires the following steps:

1. Download Tanuki's Java Service Wrapper

For this example the Java Service Wrapper is required. Download the Community Version 3.5.7 and extract the archive to a directory of your choice e.g. C:\java\wrapper-windows-x86-32-3.5.7.

2. Set up the MEMBRANE_HOME System Variable

First of all a new environment variable must be set for the system, to know where the Membrane Router is installed.
Therefore open the System application in the Control Panel, go to Advanced and click on Environment Variables. Add a new system variable. Call it MEMBRANE_HOME and set its value to point the directory where Membrane Router is installed, e.g. C:\java\membrane-router-2.0.0.

3. Copy some Files

In this step some files have to be copied to the Membrane directory. To make things easier, Membrane comes with an Ant script that does the copying for us. If you are not familiar with Apache Ant you can also copy the required files manually (see below).

To run the Ant script open the command line and navigate to your MEMBRANE_HOME directory.
Type ant -file build-install-wrapper.xml and press enter. Please address your Service Wrapper directory after you'de be prompted to. Done!

4. (Un)-Registering the service

Now you are done with the configurations. Go to %MEMBRANE_HOME%\bin and run InstallMembrane-NT.bat to register the Membrane Router as a service.
Using other batch files you can unregister the service or start the service manually.

Congratulations: Membrane Router is now set up as a Service and will be started along with Windows. Use msconfig to adjust this behaviour.
To manually start/stop the memrouter service, open a command line and type:

  net start memrouter
  net stop memrouter
    
Attention: Remember to stop and unregister the service before making changes to the configuration.

5. Troubleshooting

If Membrane Router do not start up or the service doesn't register, check your environment variables. MEMBRANE_HOME must point to the directory where you installed Membrane Router. MEMBRANE_HOME must also be a system variable, user environment is not read when a program is started as service.

To make the wrapper more verbose, set wrapper.debug to true in conf/wrapper.conf.

(Alternative) 2. Copy the Files manually

If you want to avoid running the Ant script just copy and rename the files as follows:

From: To:
%WRAPPER_HOME%\bin\wrapper.exe %MEMBRANE_HOME%\bin\wrapper.exe
%WRAPPER_HOME%\src\bin\App.bat.in %MEMBRANE_HOME%\bin\Membrane.bat
%WRAPPER_HOME%\src\bin\InstallApp-NT.bat.in %MEMBRANE_HOME%\bin\InstallMembrane-NT.bat
%WRAPPER_HOME%\src\bin\UninstallApp-NT.bat.in %MEMBRANE_HOME%\bin\UninstallMembrane-NT.bat
%WRAPPER_HOME%\lib\wrapper.dll %MEMBRANE_HOME%\lib\wrapper.dll
%WRAPPER_HOME%\lib\wrapper.jar %MEMBRANE_HOME%\lib\wrapper.jar