3 Replies Latest reply on Jul 20, 2009 9:30 AM by Dok Tora

    Remote JNDI lookup return local host IP

    Dok Tora Newbie

      Hi,

      I have tomcat running on an external server (not on the same subnet) from JBoss 4.2.1 :

      Tomcat <--> [ExternalIP] FW <--> [InternalIP] JBoss

      JBoss is started with -b InternalIP

      Tomcat is configured with java.naming.provider.url=jnp://ExternalIP:1099

      What happens is that Tomcat connects to JBoss on 1099, then tries to get to InternalIP:1098, which is not visible from the Tomcat server (I assume JBoss tells it to connect to the IP on which it's listening - InternalIP).

      Eventually Tomcat gives up with:

      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: <InternalIP>; nested exception is:
       java.net.ConnectException: Connection timed out]



      Any thoughts on how to configure this setup properly?
      Thanks
      dok