3 Replies Latest reply on Jul 16, 2003 6:21 PM by johnsutter

    JBossMQ and clients on other networks

    jonbr

      I am unable to make my DurableSubscription work when the client is on an other network than the server. Both the client and the server has an internal IP address (192...) not reachable from the Internet.

      When I try UIL and OIL ConnectionFactory the client can't even reach the server - using a packetsniffer I see that the client is trying to connect to the servers internal address.

      When I use RMIConnectionFactory the client can access the server - but no messages are sent from the server. In the serverlog I see that the server is trying to send messages to the client's internal address.

      I have been searching this forum for similar problems and did find some, but none had any solutions I could use...

      Thanks,
      Jon

        • 1. Re: JBossMQ and clients on other networks
          jonbr

          After I found a JBoss book I figured out that UIL is what I must use... But I still haven't found a solution to my question. It seems that my problem is that the server only has an "internal" IP address (the external address is mapped in the firewall). When the server passes it's ServerIL object to the client, this object only contains the internal IP address and this is the one the client uses to connect.

          I've been wondering if I must implement a new ClientSocketFactory or something that knows the servers real address, but this seems rather overkill for such a problem. Hopefully some of you have solved this problem more elegantly...?

          Thanks,
          Jon

          • 2. Re: JBossMQ and clients on other networks
            hezekiel

            Have you tried to use UIL2? That is a new experimental layer in 3.0.7.

            From the docs:
            The Unified version 2 Invocation Layer (UIL2) is a new variation of the UIL protocol that also uses a single socket between the client and server. However, unlike both the UIL and OIL protocols which use a blocking round-trip message at the socket level, the UIL2 protocol uses a true asynchrounous send and receive messaging at the transport level. This provides for improved throughput and utilization and as such it is the preferred socket invocation layer.

            • 3. Re: JBossMQ and clients on other networks
              johnsutter

              We're stuck running 2.4.10 and have a similar problem.

              I have one machine behind a security appliance where it
              has non-routable ip addresses. All ports are open and
              mapped 1-1 for all ip addresses.

              A lookup of ConnectionFactory or UILConnectionFactory
              would return the OILServerIL/UILServerIL which would
              have the non-routable IP address in the InetAddress
              object addr.

              My solutions is to add the following line to createConnection before creating the new socket:
              addr = InetAddress.getByName (addr.getHostName());
              in each of:
              UILServerIL
              OILServerIL
              OILClientIL

              On the machine behind the security device
              I also had to add a property at startup time:
              -Djava.rmi.server.hostname=foo.bar.com
              where foo.bar.com is the name that resolves
              properly for all places.

              -- John