1 Reply Latest reply on Mar 3, 2015 5:11 PM by Scott Bass

    Installing jboss-as-7.1.1.Final as a Windows Service using Apache Commons Daemon (prunsrv.exe)

    Scott Bass Newbie

      Hi,

       

      I've see various threads on this issue - I think I've read them all.  This one was particularly useful:  Re: Running jboss EAP 6.1 as service in Windows.  However, none of the threads I've seen are specific to jboss-as-7.1.1.Final.  I'm not a JBoss expert, so some of the configuration options, such as StartClass and StartMethod, are lost on me.  I think there are changes in JBoss 7 that make previous posts incorrect in their advice.

       

      Standalone.bat runs fine, and here is an excerpt from boot.log:

       

      15:03:56,706 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      15:03:57,692 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      15:03:57,908 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      15:03:57,916 DEBUG [org.jboss.as.config] Configured system properties:

        awt.toolkit = sun.awt.windows.WToolkit

        file.encoding = Cp1252

        file.encoding.pkg = sun.io

        file.separator = \

        java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment

        java.awt.printerjob = sun.awt.windows.WPrinterJob

        java.class.path = C:\Temp\jboss-as-7.1.1.Final\jboss-modules.jar

        java.class.version = 51.0

        java.endorsed.dirs = D:\Program Files\Java\jdk1.7.0_72\jre\lib\endorsed

        java.ext.dirs = D:\Program Files\Java\jdk1.7.0_72\jre\lib\ext;C:\Windows\Sun\Java\lib\ext

        java.home = D:\Program Files\Java\jdk1.7.0_72\jre

        java.io.tmpdir = C:\Users\joebloggs\AppData\Local\Temp\2\

        java.library.path = D:\Program Files\Java\jdk1.7.0_72\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Network Monitor 3\;D:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;D:\Program Files\Microsoft SQL Server\120\Tools\Binn\;D:\Program Files\Microsoft SQL Server\120\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;D:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;D:\Program Files (x86)\sysinternals;.

        java.net.preferIPv4Stack = true

        java.runtime.name = Java(TM) SE Runtime Environment

        java.runtime.version = 1.7.0_72-b14

        java.specification.name = Java Platform API Specification

        java.specification.vendor = Oracle Corporation

        java.specification.version = 1.7

        java.util.logging.manager = org.jboss.logmanager.LogManager

        java.vendor = Oracle Corporation

        java.vendor.url = http://java.oracle.com/

        java.vendor.url.bug = http://bugreport.sun.com/bugreport/

        java.version = 1.7.0_72

        java.vm.info = mixed mode

        java.vm.name = Java HotSpot(TM) 64-Bit Server VM

        java.vm.specification.name = Java Virtual Machine Specification

        java.vm.specification.vendor = Oracle Corporation

        java.vm.specification.version = 1.7

        java.vm.vendor = Oracle Corporation

        java.vm.version = 24.72-b04

        javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder

        javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory

        javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory

        javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory

        javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory

        javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory

        javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory

        javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory

        javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory

        javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory

        jboss.home.dir = C:\Temp\jboss-as-7.1.1.Final

        jboss.host.name = abc123

        jboss.modules.dir = C:\Temp\jboss-as-7.1.1.Final\modules

        jboss.modules.system.pkgs = org.jboss.byteman

        jboss.node.name = abc123

        jboss.qualified.host.name = abc123

        jboss.server.base.dir = C:\Temp\jboss-as-7.1.1.Final\standalone

        jboss.server.config.dir = C:\Temp\jboss-as-7.1.1.Final\standalone\configuration

        jboss.server.data.dir = C:\Temp\jboss-as-7.1.1.Final\standalone\data

        jboss.server.default.config = standalone.xml

        jboss.server.deploy.dir = C:\Temp\jboss-as-7.1.1.Final\standalone\data\content

        jboss.server.log.dir = C:\Temp\jboss-as-7.1.1.Final\standalone\log

        jboss.server.name = abc123

        jboss.server.temp.dir = C:\Temp\jboss-as-7.1.1.Final\standalone\tmp

        line.separator =

       

       

        logging.configuration = file:C:\Temp\jboss-as-7.1.1.Final\standalone/configuration/logging.properties

        module.path = C:\Temp\jboss-as-7.1.1.Final\modules

        org.jboss.boot.log.file = C:\Temp\jboss-as-7.1.1.Final\standalone\log\boot.log

        org.jboss.resolver.warning = true

        org.xml.sax.driver = __redirected.__XMLReaderFactory

        os.arch = amd64

        os.name = Windows Server 2012 R2

        os.version = 6.3

        path.separator = ;

        program.name = standalone.bat

        sun.arch.data.model = 64

        sun.boot.class.path = D:\Program Files\Java\jdk1.7.0_72\jre\lib\resources.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\rt.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\sunrsasign.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\jce.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.7.0_72\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.7.0_72\jre\classes

        sun.boot.library.path = D:\Program Files\Java\jdk1.7.0_72\jre\bin

        sun.cpu.endian = little

        sun.cpu.isalist = amd64

        sun.desktop = windows

        sun.io.unicode.encoding = UnicodeLittle

        sun.java.command = C:\Temp\jboss-as-7.1.1.Final\jboss-modules.jar -mp C:\Temp\jboss-as-7.1.1.Final\modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=C:\Temp\jboss-as-7.1.1.Final

        sun.java.launcher = SUN_STANDARD

        sun.jnu.encoding = Cp1252

        sun.management.compiler = HotSpot 64-Bit Tiered Compilers

        sun.os.patch.level =

        sun.rmi.dgc.client.gcInterval = 3600000

        sun.rmi.dgc.server.gcInterval = 3600000

        user.country = AU

        user.dir = C:\Temp\jboss-as-7.1.1.Final\bin

        user.home = C:\Users\joebloggs

        user.language = en

        user.name = joebloggs

        user.script =

        user.timezone = Australia/Sydney

        user.variant =

      15:03:58,072 DEBUG [org.jboss.as.config] VM Arguments: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml -Dorg.jboss.boot.log.file=C:\Temp\jboss-as-7.1.1.Final\standalone\log\boot.log -Dlogging.configuration=file:C:\Temp\jboss-as-7.1.1.Final\standalone/configuration/logging.properties

      15:04:01,629 INFO  [org.xnio] XNIO Version 3.0.3.GA

      15:04:01,666 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      15:04:01,691 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      15:04:01,705 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      15:04:01,837 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      15:04:01,852 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.

       

      Can you advise the correct settings to get jboss-as-7.1.1.Final configured as a Windows Service, using Apache Commons Daemon 1.0.15 (http://commons.apache.org/proper/commons-daemon/procrun.html), running in-process (jvm mode)?  Note:  I'm aware of the other approaches, such as JBoss Web Native Containers.  Unless there are overwhelming reasons why another approach is better (please enlighten me), I'd like to get this working using ACD.

       

      I assume that the prunsrv.exe command line options all translate to settings in the prunmgr.exe GUI?  See screenshots:

       

      prunmgr_java.png

      prunmgr_startup.png

      prunmgr_shutdown.png

       

      Thanks,

      Scott