2 Replies Latest reply on Jul 9, 2009 11:01 PM by Ron Sigal

    clientConnectAddress not working

    mazz Master

      I am using JBoss/Remoting 2.2.2-SP8 and trying to see how it can be used with NAT involved (where a server binds to one address but my clients need to access it over a different IP).

      So, here's a simple test I performed to see if clientConnectAddress works.

      I have a remoting client that tries to connect to my server using this invoker URL:


      My clients must go over the IP to reach my server because I bound the server to is a bogus IP but it shouldn't matter, because the client should use the clientConnectAddress for the IP it uses to connect to the server. Right?

      But using that InvokerLocator above, it fails. But if I use this:


      or this


      it works fine.

      I tried stepping through the code in a debugger but I can't see where "clientConnectAddress" is even referenced. Where is that looked up and used?

      I assume I'm doing something stupid - I'm hoping someone can straighten me out.

        • 1. Re: clientConnectAddress not working
          mazz Master

          I'm trying other things - specifically using "serverBindAddress" and that seems to work better.

          Did something happen to the Jboss/Remoting client such that it no longer uses or refers to "clientConnectAddress"?? No matter what I do, I can't get the client to behave any differently, specifying clientConnectAddress or not - as if it isn't supported on the client anymore.

          • 2. Re: clientConnectAddress not working
            Ron Sigal Master

            Hi John,

            The fact is that "clientConnectAddress" is used only on the server side by org.jboss.remoting.transport.transport.Connector to generate an InvokerLocator from a declarative XML configuration (e.g., an MBean). So, for example,

            <mbean code="org.jboss.remoting.transport.Connector"
             display-name="Socket transport Connector">
             <attribute name="Configuration">
             <invoker transport="socket">
             <attribute name="serverBindAddress"></attribute>
             <attribute name="clientConnectAddress"></attribute>

            will cause the server to bind to but will lead to the InvokerLocator

            socket:// ...

            It is thus that the value of "clientConnectAddress" is communicated to the client, which looks only at the address in the InvokerLocator.

            The discussion in Remoting Guide must be lacking, so I've created JIRA-1142 "Clarify use of "clientConnectAddress" in RemotingGuide" to remind me to extend it.