1 Reply Latest reply on Nov 10, 2007 6:23 PM by flios

    JBoss behind a NAT

    flios

      Good evening Community !

      I'm trying to connect a client application to my JBoss, who is running inside a virtual machine (VMWare). The link between the virtual machine and its host is a NAT. We've got :

      * PC_Client : real machine that has the "IP1" ip address in the subnet1 (the real one)
      * PC_Server_Host : real machine that has the "IP2" ip address in the subnet1 (the real one), and "IP3" ine the NAT VMWare subnet
      * Server_Virtual : virtual machine, Linux RedHat, running into "PC_Server_Host" ; il has "IP4" in the NAT VMWare subnet

      I have forwarded the ports 1098, 1099, 4444, 4445, 8080 and 8083 from PC_Server_Host to Server_Virtual.

      I've read this article from the wiki : http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingJBossBehindAFirewall

      And I tried, as il was suggested to add :
      "-Djava.rmi.server.hostname=IP2 -Djava.rmi.server.useLocalHostname=true "
      to my JBoss startup script run.sh.

      I launch JBoss on Server_Virtual then, and then I launch the client on PC_Client ; the client falls into a "Connection timed out" error.

      With wireshark (ethereal), I found that the discussion starts well between the PC_Client and the PC_Server_Host on port 1098, but the client tries then to connect on "IP4", which is not visible to him...

      I've been looking on the web, and I found that the option should be "-Djava.rmi.server.useLocalHostname=false" instead of true, but it doesn't change anything to me.

      Did I forget something ? I've also read that there may be a problem with the /etc/hosts file from the system where JBoss is running...

      Even if the problem seems complicated to explain, I think that it's a very common one, but when I follow the tips, it doesn't work...

      Any idea ?

      Thanks you (at least to have read my post !!!)

        • 1. Re: JBoss behind a NAT
          flios

          I forgot to tell that I use JBoss AS 4.0.5... and everything I find over the web seems to tell that It was a known problem for this version.

          Maybe the problem doesn't exist with the version 4.2.x ? I'll try (if I ever make my .ear start with JBoss 4.2.2... )