5 Replies Latest reply on May 5, 2007 1:53 AM by kuvera

    CommunicationException

    kuvera

      Until now I tested my EJB's from localhost, but as soon as I change localhost to a remote address I get this:

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.1.2: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 192.168.1.2:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.1.2:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]

      The address can be a local IP, internet IP or "no-ip" address, it won't work, only localhost works.

      Here's what I did:
      - allowed TCP ports 1098,1099,4444 in firewall software
      - allowed the same ports in router port forwarding
      - modified jndi.properties:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://192.168.1.2:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      

      What's wrong?