4 Replies Latest reply on Jun 10, 2003 2:43 AM by vgotte

    CommunicationException: Receive timed out

    vgotte Newbie

      I am new to JBoss 3.2.1 on Windows2K

      I have try to run the little application found at http://central.sytes.net/jboss/EclipseTutorial.htm

      It works fine , but when I want to start the client , I have an exception :
      javax.naming.CommunicationException: Receive timed out. Root exception is java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at org.jboss.docs.interest.InterestClient.main(InterestClient.java:51)

      What's wrong ?

        • 1. Re: CommunicationException: Receive timed out
          Jon Barnett Master

          Looks like the client can't connect to the JBoss JNDI port for some reason.

          Have you tried telneting to the port first to ensure that you can connect? If you can, but your client still gets timeouts, you might want to try the following JNDI settings as well:
          jndiProps.setProperty("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
          jndiProps.setProperty("jnp.timeout", "0");
          jndiProps.setProperty("jnp.sotimeout", "0");

          I'm not sure that they are still applicable. We used them sometime during 2.4.x when we found what I think was a similar problem. It's all a bit vague now. I think we were connecting a HAHT app server to some JBoss EJB components - don't even ask.

          Anway, hope it helps.

          • 3. Re: CommunicationException: Receive timed out
            Jon Barnett Master

            Oops. Forgot to ask the obvious. Did you set the JNDI properties for the client?

            Either in jndi.properties

            Or programmatically:
            Properties jndiProps = new Properties();

            InitialContext ctx = new InitialContext(jndiProps);

            etc ...

            • 4. Re: CommunicationException: Receive timed out
              vgotte Newbie

              Yes, all these properties was setted as you say.
              Thanks again.