2 Replies Latest reply on May 13, 2003 3:12 AM by Jon Barnett

    local client does not connect to JNDI in JBoss 3.2.1

    vsouriko Newbie

      Hello,

      I'm trying to upgrade from 3.0.6 to 3.2.1. The server starts and the tests I can perform with my MBeans are sucessful. But the client, running on the same mashine, fails to connect to "jnp://localhost:1099".

      The exception is

      WARN NamingContext:warn(): 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)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:426)
      at java.net.Socket.connect(Socket.java:376)
      at java.net.Socket.(Socket.java:291)
      at java.net.Socket.(Socket.java:199)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:179)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1092)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:470)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      ...

      And this same client works on 3.0.6. Please could you tell me, what has changed in the new version and what can I do about it?

      regards,
      Vitaly

        • 1. Re: local client does not connect to JNDI in JBoss 3.2.1
          vsouriko Newbie

          I believe the problem is also reported in the post below:

          http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= post was also left unanswered, though....

          I've tried to play with JNDI settings: started server with "-Djava.rmi.server.hostname=localhost", set "java.naming.provider.url=localhost:1099" in "jndi.properties", but no success.

          Unfortunately, our client is supposed to be running on the same machine with the server (according to the other report it is when this problem pops up) in many cases. We could run the system on 3.0, though.

          Please, anybody knowing, tell me is it a bug in the new JBoss, or I maybe doing something wrong (e.g. didn't set up something on the server)?

          regards,
          Vitaly

          • 2. Re: local client does not connect to JNDI in JBoss 3.2.1
            Jon Barnett Master

            Are you running on a Windows machine? If so, is your Java instance installed in a directory path that has a space in it (JAVA_HOME)?

            At various times, JNDI and RMI on Windows can be upset by this. Always ensure that you install your JDKs in a directory path that contains no spaces.

            This is usually where I have seen these type of jnp connection problems on Windows machines - since about 2.2 (maybe 2.0 but that was a long time ago ...).