Connection Manager As Windows Service

Would it be possible to add the ability to register the Connection Manager software as a Windows Service?

Hey Caleb,

Right now we are not using any tool to create installers or run CMs as a service. We may include them in a future release. Meanwhile you can check out the Java Service Wrapper.

Regards,

– Gato

Anyone have a working wrapper.conf file to get this set up? I’‘ve been struggling with it for the last hour and can’‘t seem to figure out the main class of the ConnectionManager that should be getting loaded. I’'m getting messages similar to this:

jvm 1 | WrapperSimpleApp: Unable to locate the class org.jivesoftware.wildfire.ConnectionManager: java.lang.ClassNotFoundException: org.jivesoftware.wildfire.ConnectionManager

The pertinent area of the config looks like this:

wrapper.java.command=C:\Program Files\Java\jre1.5.0_08\bin\java.exe

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.app.parameter.1=org.jivesoftware.wildfire.ConnectionManager

wrapper.java.classpath.1=…/lib/wrapper.jar

wrapper.java.classpath.2=…/lib/startup.jar

wrapper.java.classpath.3=…/lib/cmanager.jar

Regards,

Matt

Hey Matt,

The starting class is

org.jivesoftware.multiplexer.starter.ServerStarter. You can check how

bin/cmanager.bat and lib/startup.jar work. The startup.jar file includes

a MANIFEST file that indicates Java the class to use to start up the

application.

Regards,

– Gato

Thanks again, Gato – huge help!

In case it helps anyone out, here is the process which I took to get this working:

  1. Download the latest Windows binary release of the Java Service Wrapper from http://wrapper.tanukisoftware.org/doc/english/introduction.html

  2. Extract the files to a temporary location.

  3. Copy the following files to the ?connection_manager\bin? directory:

InstallTestWrapper-NT.bat

TestWrapper.bat

UninstallTestWrapper-NT.bat

Wrapper.exe

  1. Rename all instances of ?TestWrapper? to ?Cmanager? (i.e. Cmanager.bat)

  2. Copy the following files to the ?connection_manager\lib? directory:

wrapper.jar

wrapper.dll

  1. Create the text file ?connection_manager\conf\wrapper.conf?. I filled in mine as follows, you will probably want to change your path to java.exe:

wrapper.java.command=C:\Program Files\Java\jre1.5.0_08\bin\java.exe

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.app.parameter.1=org.jivesoftware.multiplexer.starter.ServerStarter

wrapper.java.classpath.1=…/lib/wrapper.jar

wrapper.java.classpath.2=…/lib/startup.jar

wrapper.java.classpath.3=…/lib/cmanager.jar

wrapper.java.library.path.1=…/lib

  1. Initial Java Heap Size (in MB)

#wrapper.java.initmemory=3

  1. Maximum Java Heap Size (in MB)

#wrapper.java.maxmemory=64

wrapper.console.format=PM

wrapper.console.loglevel=INFO

wrapper.logfile=…/wrapper.log

wrapper.logfile.format=LPTM

wrapper.logfile.loglevel=INFO

wrapper.logfile.maxsize=0

wrapper.logfile.maxfiles=0

wrapper.syslog.loglevel=NONE

wrapper.console.title=Wildfire Connection Manager

wrapper.ntservice.name=WildfireCM

wrapper.ntservice.displayname=Wildfire Connection Manager

wrapper.ntservice.description=Wildfire Connection Manager

wrapper.ntservice.dependency.1=

wrapper.ntservice.starttype=AUTO_START

wrapper.ntservice.interactive=false

  1. Run ?connection_manager\bin\InstallCmanager-NT.bat?. You should now be able to run ?net start WildfireCM? to start the service. WildfireCM is the name of the service as defined above in wrapper.conf.

Regards,

Matt

This worked great for me, right up to the point when I tried to fire up the service. I get an error: 1067 with no real details. I am running in a Windows 2K3 enviroment.

I think that means you are going to want to double-check the line:

wrapper.java.command=C:\Program Files\Java\jre1.5.0_08\bin\java.exe

to ensure that it points at whatever version of Java you are running. Probably a point difference in the version.

Regards,

Matt