2 Replies Latest reply on Aug 22, 2007 6:30 PM by ron_sigal

    BisocketServerInvoker with server behind NAT

    maihde

      I'm trying to run a JBoss server 4.2 (using JBoss messaging) on a NAT machine where there will be clients connecting from both inside and outside the NAT. With JBossMQ I could set the clientConnectAddress to the hostname (in the UIL configuration) and everything would work correctly.

      With JBoss messaging I tried to do the same with the bisocket connector, however the external client always fails when trying to connect to the secondary server as the IP address given is the internal one instead of the hostname.

      This seems like a similar problem to JBREM-749 which I think was fixed in release 2.2.2, so perhaps I'm not configuring something correctly. I am able to get things to work correctly if I use the standard socket connector, but JBoss Messaging states that only http and bisocket are supported.

      What are my options to get this setup to work?

      Thanks,
      Michael

        • 1. Re: BisocketServerInvoker with server behind NAT
          ron_sigal

          Hi Michael,

          You've certainly done your homework. I just need to point out that Remoting 2.2.2 has not been released yet. I'm hoping it will be available by next week.

          -Ron

          • 2. Re: BisocketServerInvoker with server behind NAT
            ron_sigal

            I've just uploaded a jboss-remoting.jar with an implementation for JBREM-749 "BisocketServerInvoker: Make configurable the address and port of secondary server socket". The address to which the secondary ServerSocket is bound is the same as that to which the "primary" ServerSocket is bound. The address sent to the client to use in connecting to the secondary ServerSocket is taken from the server's InvokerLocator. It follows that if you set the "clientConnectAddress" property, it will be used for the secondary ServerSocket. I.e., something like

             <mbean code="org.jboss.remoting.transport.Connector"
             name="jboss.messaging:service=Connector,transport=bisocket"
             display-name="Bisocket Transport Connector">
             <attribute name="Configuration">
             <config>
             <invoker transport="bisocket">
             <attribute name="clientConnectAddress" isParam="true">org.jboss.bluemonkeydiamond</attribute>
            


            Also, there are two new configurable parameters in the class org.jboss.remoting.transport.bisocket.Bisocket specific to the bisocket transport:

             public static final String SECONDARY_BIND_PORT = "secondaryBindPort";
             public static final String SECONDARY_CONNECT_PORT = "secondaryConnectPort";
            


            SECONDARY_BIND_PORT determines which port the secondary ServerSocket binds to, and SECONDARY_CONNECT_PORT determines which port is sent to the client to use in connecting to the secondary ServerSocket.

            You can download the jar from http://anonsvn.jboss.org/repos/repository.jboss.org/jboss/remoting/2.2.2.Beta.