7 Replies Latest reply on Aug 11, 2003 7:07 AM by mikesu

    jboss behind a firewall

    taiwuco

      I tried to move jboss 3.1 to be behind a CheckPoint firewall. I use 192.168.0.4 for the server and NAT to transfer IP. I opened ports 1099, 12999, and 4444. However, when I did JNDI lookup, I got the following error messages:

      Got initial context: javax.naming.InitialContext@1a897a9
      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.4; nested exception is:
      java.net.ConnectException: Connection timed out]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.javException in getJAASHome: null
      a:486)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:352)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)


      I can do ssh to the server behind the firewall. I also have SQL port open to the server only. No other port do I use.

      Do I need to use RMIProxy/JndiProxy? Or, what should I modify jboss configuration?

      Best Regards,

      Brian

        • 1. Re: jboss behind a firewall
          frito

          Since JNDI and the standard bean invoker are using RMI and RMI is not the protocol of your choice behind a firewall (needs many open ports because uses one port dynamically in a certain range) you should use the HttpNamingContextFactory for doing JNDI lookup over HTTP and use another invoker for beancalls (HTTP or SSL). There are examples in the jboss testsuite.

          Greetings,
          Frito

          • 2. Re: jboss behind a firewall
            taiwuco

            Thanks for the reply. I will consult the test suite.

            Best Regards,

            Brian

            • 3. Re: jboss behind a firewall
              taiwuco

              Greetings,

              I tried to find the testsuite for the JNDI over HTTP but found nothing. Can you kindly show me where it is?

              I modify jndi.propeties:

              java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
              java.naming.provider.url=http://<external server>:80/invoker/JNDIFactory
              java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

              And run the appliction. The error was

              ClassNotFoundException: org.jboss.naming.HttpNamingContextFactory

              I am using jboss 3.1. Did I miss a jar file?

              Best Regards,

              Brian

              • 4. Re: jboss behind a firewall
                mikesu

                 

                use another invoker for beancalls


                How should client be configured to use HTTPInvoker???

                • 5. Re: jboss behind a firewall
                  mikesu

                  2taiwuco2

                  Yes you've missed jar

                  • 6. Re: jboss behind a firewall
                    taiwuco

                    to mikesu,

                    which jar file? I look over all jboss related jar file on jboss 3.1.



                    I changed to 3.2.2 RC2. The configurations are so different. Look like I need to buy document again although it was setup and run successfully. The ClassNotFoundException was gone. I found HttpNamingContextInvoker on jboss 3.2.2. I still wanted to know where it is on 3.1.

                    In your previous reply, were you asking a question or telling me an answer? Sorry, I don't get it. BTW, I almost solved my problem.

                    Best Regards,

                    Brian

                    • 7. Re: jboss behind a firewall
                      mikesu

                      HttpNamingContextFactory class is in (at least for jboss 3.2.1):

                      <jboss-dir>client/jboss-client.jar