4 Replies Latest reply on Aug 18, 2004 12:42 PM by gratcliffe

    Run JBoss as a Windows Service

    fabinhu

      Hey guys!

      I had download the wrapper application to put JBoss as a windows service. So, i follow this link:

      http://www.jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows

      ...And i run the script to test wrapper with JBoss ... that's OK!

      But, when i install de service, i can't start de service on the Service Manager, and i got the wrapper.log:

      STATUS | wrapper | 2004/06/04 15:28:42 | Launching a JVM...
      FATAL | wrapper | 2004/06/04 15:28:42 | Unable to execute Java command. The system cannot find the file specified. (0x2)
      FATAL | wrapper | 2004/06/04 15:28:42 | "%JAVA_HOME%\bin\java" -Djava.library.path="%JBOSS_HOME%\lib" -classpath "%JBOSS_HOME%\lib\wrapper.jar;%JAVA_HOME%\lib\tools.jar;%JBOSS_HOME%\bin\run.jar" -Dwrapper.key="gJC8wBUZByFqgUxj" -Dwrapper.port=32000 -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.0" -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.jboss.Main -c xplan
      FATAL | wrapper | 2004/06/04 15:28:42 | Critical error: wait for JVM process failed

      CAN ANYBODY HERE HELP ME????

      []'s

        • 1. Re: Run JBoss as a Windows Service
          jptaylor

          From what I've read, using the Alexandria Software Consultants Open Source tool "JavaService" is the way to go. However, their web site appears to be down (http://www.alexandriasc.com/software/JavaService/index.html).

          Does anyone know of another location to download the application "JavaService"? Any idea why their site is down (i.e. out of business or new location)?

          Thanks,
          -Justin

          • 2. Re: Run JBoss as a Windows Service

            I have tried the Wrapper for Java and couldn't get it to work, then tried the JavaService by Alexandria and it worked great every time I depolyed a new server... however...

            It appers that the Aliandria web site, that distributes the JBossService, is down along with others linking to it.... I found an alternate link that gave a brief reason to the server being down -

            It is with regret that Multiplan has had to disable downloads of the JavaService files from this web site. This is due to excessive hits on this web site from a particular source, resulting in network bandwidth limits being reached on our server

            Im sure someone else has it for download but I unfortunately cannot find any for you at this time... sry

            --ShadowDog.

            • 3. Re: Run JBoss as a Windows Service
              p_saville

              Could someone please let us know if a new download link is available yet?

              Thanks,
              Philip

              • 4. Re: Run JBoss as a Windows Service

                We use the Java Wrapper tool for JBoss and some other things without any problems. It works fine.

                Looking at your log file I think you will find your JAVA_HOME and JBOSS_HOME environment variables have been defined in Control Panel as 'user' rather than system. The 'user' variables only exist when a user that created them is logged on. The default service will be running on the LocalSystem user. So move your variables to System rather than User.

                Below is the wrapper.conf we are using. Please note I've editted this a bit
                before posting to remove some company specific stuff.

                Hope this helps.

                When you get wrapper working this is also an MBean you can use which is useful.


                Gary

                wrapper.java.command=%JAVA_HOME%/bin/java
                
                # Java Main class
                wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
                
                # Java Classpath (include wrapper.jar) Add class path elements as
                # needed starting from 1
                wrapper.java.classpath.1=../../lib/wrapper.jar
                wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
                wrapper.java.classpath.3=../../bin/run.jar
                
                # Java Library Path (location of Wrapper.DLL or libwrapper.so) plus syste mpath as per normal JVM
                wrapper.java.library.path.1=../../lib
                
                # Java Additional Parameters
                wrapper.java.additional.1=-Dprogram.name=Wrapper
                wrapper.java.additional.2=-Dsun.java2d.d3d=false
                wrapper.java.additional.3=-Dsun.java2d.noddraw=true
                
                # Initial Java Heap Size (in MB)
                wrapper.java.initmemory=64
                
                # Maximum Java Heap Size (in MB)
                wrapper.java.maxmemory=256
                
                # Application parameters. Add parameters as needed starting from 1
                wrapper.app.parameter.1=org.jboss.Main
                wrapper.app.parameter.2=-c
                wrapper.app.parameter.3=default
                
                # Port which the native wrapper code will attempt to connect to
                wrapper.port=1777
                
                #********************************************************************
                # Wrapper Logging Properties
                #********************************************************************
                # Format of output for the console. (See docs for formats)
                wrapper.console.format=PM
                
                # Log Level for console output. (See docs for log levels)
                wrapper.console.loglevel=INFO
                
                # Log file to use for wrapper output logging.
                wrapper.logfile=../../server/reims/log/wrapper.log
                
                # Format of output for the log file. (See docs for formats)
                wrapper.logfile.format=LPTM
                
                # Log Level for log file output. (See docs for log levels)
                wrapper.logfile.loglevel=INFO
                
                # Maximum size that the log file will be allowed to grow to before
                # the log is rolled. Size is specified in bytes. The default value
                # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
                # 'm' (mb) suffix. For example: 10m = 10 megabytes.
                wrapper.logfile.maxsize=256k
                
                # Maximum number of rolled log files which will be allowed before old
                # files are deleted. The default value of 0 implies no limit.
                wrapper.logfile.maxfiles=5
                
                # Log Level for sys/event log output. (See docs for log levels)
                wrapper.syslog.loglevel=ERROR
                
                #********************************************************************
                # Wrapper NT Service Properties
                #********************************************************************
                # WARNING - Do not modify any of these properties when an application
                # using this configuration file has been installed as a service.
                # Please uninstall the service before modifying this section. The
                # service can then be reinstalled.
                
                # Name of the service
                wrapper.ntservice.name=JBoss
                
                # Display name of the service
                wrapper.ntservice.displayname=JBoss
                
                # Description of the service
                wrapper.ntservice.description=JBoss Service
                
                # Service dependencies. Add dependencies as needed starting from 1
                #wrapper.ntservice.dependency.1=
                
                # Mode in which the service is installed. AUTO_START or DEMAND_START
                wrapper.ntservice.starttype=AUTO_START
                
                # Allow the service to interact with the desktop.
                wrapper.ntservice.interactive=false
                
                ## Allow upto 2 minutes to shutdown
                wrapper.shutdown.timeout=120
                wrapper.jvm_exit.timeout=120