2 Replies Latest reply on Apr 23, 2003 10:35 AM by Bill

    Runnning JBoss as service using JavaService.exe

    wasifakbar Newbie

      I am doing some testing where I want to modify the HTTP and Naming Service ports in JBoss to avoid known conflicts with other applications that we currently run.

      I modify the ports. When I run JBoss on these different ports from a command prompt: run -c [server name], the application comes up fine.

      When I modify the ports and then use JavaService to start JBoss as a service, I get the error below. File is also attached. Any ideas how to fix this?

      14:35:48,745 WARN [NamingContext] Failed to connect to localhost:1099
      javax.naming.CommunicationException: Failed to connect to server localhost:1099. Root exception is
      javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099. Root exception is
      java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)

        • 1. Re: Runnning JBoss as service using JavaService.exe
          Bill Newbie

          Here's what I got to work:

          -params -c[config name]

          Use the params keyword to send the startup option to javaservice.exe. That's right: no space between the -c and the name of the config directory. I'm using the standard .BAT file to call javaservice.exe, so I just inserted the -params keyword after the "-start org.jboss.Main" and before the "-stop org.jboss.Main"

          After the service has been created, you can confirm the startup option in the registry at HKLM\SYSTEM\CurrentControlSet\Service\[service_name]\Parameters by looking at the "Start Parm Number 0" value, where you should see -c[config_name], e.g., -ccustom.

          I hope this helps.

          • 2. Re: Runnning JBoss as service using JavaService.exe
            Bill Newbie

            Here's what I got to work:

            -params -c[config name]

            Use the params keyword to send the startup option to javaservice.exe. That's right: no space between the -c and the name of the config directory. I'm using the standard .BAT file to call javaservice.exe, so I just inserted the -params keyword after the "-start org.jboss.Main" and before the "-stop org.jboss.Main"

            After the service has been created, you can confirm the startup option in the registry at HKLM\SYSTEM\CurrentControlSet\Service\[service_name]\Parameters by looking at the "Start Parm Number 0" value, where you should see -c[config_name], e.g., -ccustom.

            I hope this helps.