1 Reply Latest reply on Jul 17, 2007 6:42 PM by unitedfuture

    CommunicationException when stopping jboss

    ckeilitz

      I am receiving the following error when trying to stop the jboss server. I am running Fedora 4 with jboss 4.0.2 and using the default, very basic init.d script found at this link http://wiki.jboss.org/wiki/Wiki.jsp...OnBootWithLinux

      /etc/init.d/jboss stop
      Stopping jboss...
      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is 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.SocketException: Invalid argument or cannot assign requested address]]]
      at org.jnp.interfaces.NamingContext.checkRef(NamingCo ntext.java:1385)
      at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:579)
      at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext. java:347)
      at org.jboss.Shutdown.main(Shutdown.java:202)
      Caused by: 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.SocketException: Invalid argument or cannot assign requested address]]
      at org.jnp.interfaces.NamingContext.getServer(NamingC ontext.java:254)
      at org.jnp.interfaces.NamingContext.checkRef(NamingCo ntext.java:1370)
      ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Invalid argument or cannot assign requested address]
      at org.jnp.interfaces.NamingContext.getServer(NamingC ontext.java:228)
      ... 5 more
      Caused by: java.net.SocketException: Invalid argument or cannot assign requested address
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:158)
      at java.net.Socket.connect(Socket.java:452)
      at java.net.Socket.connect(Socket.java:402)
      at java.net.Socket.(Socket.java:309)
      at java.net.Socket.(Socket.java:211)
      at org.jnp.interfaces.TimedSocketFactory.createSocket (TimedSocketFactory.java:69)
      at org.jnp.interfaces.TimedSocketFactory.createSocket (TimedSocketFactory.java:62)
      at org.jnp.interfaces.NamingContext.getServer(NamingC ontext.java:224)
      ... 5 more

      It appears that the JNDI server is up and running/listing on port 1099.

      netstat -an |grep 1099
      tcp 0 0 :::1099 :::* LISTEN


      Does anyone have any idea what I am doing wrong? Could it be something with my Fedora hostname setup? I have to kill the processes each time I want to shutdown/restart which isn't optimal. Not being able to fix the problem is bugging me probably more than the inconvenience...

        • 1. Re: CommunicationException when stopping jboss
          unitedfuture

          My first post... I know this is an old thread but I ran into the same problem starting out and I wanted to post this possible solution for any others in the same shoes.

          I recommend using the appropriate init.d script that come with JBoss and can be found in the $JBOSS_HOME/bin directory. The startup command in the script binds to address 0.0.0.0 (which is all addresses) and should eliminate the localhost error.

          I could be wrong but that is what worked for me and it's worth a shot.

          --Kevin Duane