3 Replies Latest reply on Jan 24, 2003 3:39 AM by Michael Saringer

    JBoss, Firewall Problems

    Brad Rippe Newbie

      Can anyone give some advise on a problem I'm having with a client app connect through a firewall to JBoss. The app works fine internally, but externally I get a

      javax.naming.CommunicationException [Root exception is java.rmi.ConnectionException: Connection refused to host: (internal address of the server);

      I have port 1099, 1098, and 4444 opened on the firewall. Seems strange the client is outputting the internal address of the server. I have also configured to use 1098 with:


      1099
      1098


      Am I missing anything? Any help would be greatly appreciated. Thanks!

        • 1. Re: JBoss, Firewall Problems
          Brad Rippe Newbie

          Ok Brad,

          Since you had some problems, have been looking at http tunneling and pulling your hair out... and we've all been letting you sweat since the problem is much easier than you think.

          You've opened up the ports on the firewall right 4444, 1099, and 1099. Set the Rmi port in the jboss.jcml
          <!-- JNDI -->
          1098

          and you're still getting an inside ip back from the client?

          What you need to do is set the

          java.rmi.server.hostname=[outside address of the server]

          property in the jboss.properties file. This is where your client is getting the internal address from. I assume if you don't set this property, jboss uses the local ip which is an internal address.

          (Since no one answered, I thought I'd have some fun!)
          Thanks I've got it all fixed now!

          Brad

          • 2. Re: JBoss, Firewall Problems
            Brendan Lawlor Newbie

            Hi Brad,
            I'm glad you DID answer yourself because I'm having the same trouble. Do you happen to know the configuration setting change required in 3.0? I don't see a jboss.properties file anywhere in my installation.

            TIA

            • 3. Re: JBoss, Firewall Problems
              Michael Saringer Newbie

              you can do it this way in run.sh / run.cmd (thangs to mikestephen)

              JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME
              -Djava.rmi.server.hostname=aaa.bbb.ccc
              -Djava.rmi.server.useLocalHostname=false"

              michael