0 Replies Latest reply on Oct 21, 2011 12:00 PM by Xavier Goupil

    [Resolved] : Problem Startup with service.bat in Jboss 5.1

    Xavier Goupil Newbie

      Hi,

       

      I'm doing clustering and I got a problem while starting my second node.

      I only have one IP per server (actually I only look to do the vertical cluster horizontal will come after, so I'm working on my local machine).

       

      I'm under windows 7 x64 with native librairies for jboss.

       

      Here is my "service.bat" (in fact I have one batch to start each node, I change few variable like name, node numbre, server IP...) :

       

      @echo off

      REM JBoss, the OpenSource webOS

      REM

      REM Distributable under LGPL license.

      REM See terms of license at gnu.org.

      REM

      REM -------------------------------------------------------------------------

      REM JBoss Service Script for Windows

      REM -------------------------------------------------------------------------

       

      set NOM_INST=BETA

      set NUM_INST=2

      set IP_HOST=127.0.0.1

       

      @if not "%ECHO%" == "" echo %ECHO%

      @if "%OS%" == "Windows_NT" setlocal

      set DIRNAME=%CD%

       

      REM

      REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated

      REM during the build with ant filter.

      REM

      set SVCNAME=PCDA_JB5_%NOM_INST%

      set SVCDISP=PCDA_JB5_%NOM_INST%

      set SVCDESC=PCDA_JB5_%NOM_INST%

      set NOPAUSE=Y

       

      REM Suppress killing service on logoff event

      set JAVA_OPTS=-Xrs -Xms256m -Xmx512m -XX:MaxPermSize=256m -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseParallelGC

      set JAVA_OPTS=%JAVA_OPTS% -Djboss.bind.address=%IP_HOST% -Djboss.service.binding.set=ports-01 -Djboss.partition.name=MY_CLUSTER

      set JAVA_OPTS=%JAVA_OPTS% -Djboss.messaging.ServerPeerID=%NUM_INST% -Djboss.jgroups.enable_diagnostics=false -Djboss.jgroups.tcp.tcp_port=7910  -Djboss.partition.udpGroup=230.0.0.4

      set JAVA_OPTS=%JAVA_OPTS% -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=%IP_HOST%[7810],serv2[7810],serv2[7910]

      set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

       

      echo JAVA_OPTS = %JAVA_OPTS%

      REM Figure out the running mode

       

      if /I "%1" == "install"   goto cmdInstall

      if /I "%1" == "uninstall" goto cmdUninstall

      if /I "%1" == "start"     goto cmdStart

      if /I "%1" == "stop"      goto cmdStop

      if /I "%1" == "restart"   goto cmdRestart

      if /I "%1" == "signal"    goto cmdSignal

      echo Usage: service install^|uninstall^|start^|stop^|restart^|signal

      goto cmdEnd

       

      REM jbosssvc retun values

      REM ERR_RET_USAGE           1

      REM ERR_RET_VERSION         2

      REM ERR_RET_INSTALL         3

      REM ERR_RET_REMOVE          4

      REM ERR_RET_PARAMS          5

      REM ERR_RET_MODE            6

       

      :errExplain

      if errorlevel 1 echo Invalid command line parameters

      if errorlevel 2 echo Failed installing %SVCDISP%

      if errorlevel 4 echo Failed removing %SVCDISP%

      if errorlevel 6 echo Unknown service mode for %SVCDISP%

      goto cmdEnd

       

      :cmdInstall

      jbosssvc.exe -imwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service_%NOM_INST%.bat

      if not errorlevel 0 goto errExplain

      echo Service %SVCDISP% installed

      goto cmdEnd

       

      :cmdUninstall

      jbosssvc.exe -u %SVCNAME%

      if not errorlevel 0 goto errExplain

      echo Service %SVCDISP% removed

      goto cmdEnd

       

      :cmdStart

      REM Executed on service start

      del .%NOM_INST%.r.lock 2>&1 | findstr /C:"being used" > nul

      if not errorlevel 1 (

        echo Could not continue. Locking file already in use.

        goto cmdEnd

      )

      echo Y > .%NOM_INST%.r.lock

      jbosssvc.exe -p 1 "Starting %SVCDISP%" > run_%NOM_INST%.log

      call run.bat -c instance%NUM_INST% -b %IP_HOST% < .%NOM_INST%.r.lock >> run_%NOM_INST%.log 2>&1

      jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> run_%NOM_INST%.log

      del .%NOM_INST%.r.lock

      goto cmdEnd

       

      :cmdStop

      REM Executed on service stop

      echo Y > .%NOM_INST%.s.lock

      jbosssvc.exe -p 1 "Shutting down %SVCDISP%" > shutdown_%NOM_INST%.log

      call shutdown -S -s jnp:\\%IP_HOST%:1199< .%NOM_INST%.s.lock >> shutdown_%NOM_INST%.log 2>&1

      jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> shutdown_%NOM_INST%.log

      del .%NOM_INST%.s.lock

      goto cmdEnd

       

      :cmdRestart

      REM Executed manually from command line

      REM Note: We can only stop and start

      echo Y > .%NOM_INST%.s.lock

      jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> shutdown_%NOM_INST%.log

      call shutdown -S -s jnp:\\%IP_HOST%:1199< .%NOM_INST%.s.lock >> shutdown_%NOM_INST%.log 2>&1

      del .%NOM_INST%.s.lock

       

      :waitRun

      REM Delete lock file

      del .r.lock > nul 2>&1

      REM Wait one second if lock file exist

      jbosssvc.exe -s 1

      if exist ".r.lock" goto waitRun

      echo Y > .r.lock

      jbosssvc.exe -p 1 "Restarting %SVCDISP%" >> run_%NOM_INST%.log

      call run.bat -c instance%NUM_INST% -b %IP_HOST% < .%NOM_INST%.r.lock >> run_%NOM_INST%.log 2>&1

      jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> run_%NOM_INST%.log

      del .r.lock

      goto cmdEnd

       

      :cmdSignal

      REM Send signal to the service.

      REM Requires jbosssch.dll to be loaded in JVM

      @if not ""%2"" == """" goto execSignal

      echo Missing signal parameter.

      echo Usage: service signal [0...9]

      goto cmdEnd

      :execSignal

      jbosssvc.exe -k%2 %SVCNAME%

      goto cmdEnd

       

      :cmdEnd

       

      When I launch my service.bat, I got an error during starting up the server :

       

      2011-10-21 15:08:21,522 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss:service=invoker,type=iiop state=Create mode=Manual requiredState=Installed

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

          at javax.naming.InitialContext.lookup(InitialContext.java:351)

          at org.jboss.util.naming.Util.createSubcontext(Util.java:70)

          at org.jboss.util.naming.Util.rebind(Util.java:130)

          at org.jboss.util.naming.Util.rebind(Util.java:117)

          at org.jboss.invocation.iiop.IIOPInvoker.startService(IIOPInvoker.java:228)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

          at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:592)

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

          at org.jboss.Main.boot(Main.java:221)

          at org.jboss.Main$1.run(Main.java:556)

          at java.lang.Thread.run(Thread.java:595)

      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)

          ... 70 more

      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)

          ... 71 more

      Caused by: java.net.ConnectException: Connection refused: connect

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)

          at java.net.Socket.connect(Socket.java:524)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)

          ... 71 more

      2011-10-21 15:08:21,567 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfsfile:/C:/jboss-5.1.0.GA/server/instance2/deploy/iiop-service.xml state=PreReal mode=Manual requiredState=Real

      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=invoker,type=iiop

          at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

          at org.jboss.Main.boot(Main.java:221)

          at org.jboss.Main$1.run(Main.java:556)

          at java.lang.Thread.run(Thread.java:595)

      Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

          at javax.naming.InitialContext.lookup(InitialContext.java:351)

          at org.jboss.util.naming.Util.createSubcontext(Util.java:70)

          at org.jboss.util.naming.Util.rebind(Util.java:130)

          at org.jboss.util.naming.Util.rebind(Util.java:117)

          at org.jboss.invocation.iiop.IIOPInvoker.startService(IIOPInvoker.java:228)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

          at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:592)

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          ... 34 more

      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)

          ... 70 more

      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)

          ... 71 more

      Caused by: java.net.ConnectException: Connection refused: connect

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)

          at java.net.Socket.connect(Socket.java:524)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)

          ... 71 more

      As I use  -Djboss.service.binding.set=ports-01 it should be port 1199. I don't see what's wrong but sure there is something ;-)

      I have other errors after this one :

       

      2011-10-21 15:08:30,099 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.jmx:alias=jmx/rmi/RMIAdaptor state=Create mode=Manual requiredState=Installed

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

          at javax.naming.InitialContext.lookup(InitialContext.java:351)

          at org.jboss.util.naming.Util.createLinkRef(Util.java:275)

          at org.jboss.util.naming.Util.createLinkRef(Util.java:253)

          at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)

          at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

          at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:592)

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

          at org.jboss.Main.boot(Main.java:221)

          at org.jboss.Main$1.run(Main.java:556)

          at java.lang.Thread.run(Thread.java:595)

      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)

          ... 70 more

      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)

          ... 71 more

      Caused by: java.net.ConnectException: Connection refused: connect

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)

          at java.net.Socket.connect(Socket.java:524)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)

          ... 71 more

      2011-10-21 15:08:30,120 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfsfile:/C:/jboss-5.1.0.GA/server/instance2/deploy/jmx-invoker-service.xml state=PreReal mode=Manual requiredState=Real

      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.jmx:alias=jmx/rmi/RMIAdaptor

          at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

          at org.jboss.Main.boot(Main.java:221)

          at org.jboss.Main$1.run(Main.java:556)

          at java.lang.Thread.run(Thread.java:595)

      Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

          at javax.naming.InitialContext.lookup(InitialContext.java:351)

          at org.jboss.util.naming.Util.createLinkRef(Util.java:275)

          at org.jboss.util.naming.Util.createLinkRef(Util.java:253)

          at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)

          at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

          at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:592)

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          ... 34 more

      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)

          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)

          ... 70 more

      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)

          ... 71 more

      Caused by: java.net.ConnectException: Connection refused: connect

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)

          at java.net.Socket.connect(Socket.java:524)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)

          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)

          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)

          ... 71 more

      And some other for each services that launch jboss.

       

      If you have some clues to help me I'll be gratefull.

       

      Xavier

       

      --------------------------------------------------------------------------------------------------------------------

       

      I have found my mistake, I have in my deploy folder an application which have a jndi.properties specifying 1099 port...

      This application should only be on my first node and not in the 2nd.

       

      So we can note that jboss really parse and take in account all properties and xml file before starting application deploiement.

       

      See you.