2 Replies Latest reply on May 24, 2002 8:29 PM by lingm

    JMS and multi-homed hosts

    rmchan

      Hi,

      I'm trying to use JMS in a publish/subscribe method without using any MDB. (I'm using JBoss-2.4.4_Tomcat-4.0.1) on Linux 2.4.18, IBM JDK 1.3.

      I'm seeing a very strange issue that when I have a topic used in a publish/subscribe setup. When I run jboss on my own development machine, which is single homed (only one nic), everything works as expected. I have a simple standalone subscribe app which connects to the Topic and subscribes for messages. When on my development machine, I can have 3 subscribers on different machines all receive notifications that a message has been sent.

      However, when I run the same application on a multi-homed ( the machine has 6 nics) server (same os - linux, SUN JDK 1.3), only local subscriber processes receive the notification - the remote subscriber processes do not. Or rather, there is some protocol communication (using tcpdump under linux), but onMessage() is never fired. It is only fired on the process which is on the same machine.

      As a side note, the purchased documentation indicates that you can set a bind port and address for the OILILService, which I have done.

      The really strange thing is that I *DO* see some ip communication happening...

      Is this a bug? Has anyone seen anything like this?

        • 1. Re: JMS and multi-homed hosts
          lingm

          Hi,

          Setting the OILService BindAddress solved the problem for my setup, where my server (NT) is on a 2 NIC machine and my clients (NT local & Solaris) were subscribed to a topic. I received events on both clients as expected.

          One other thing you should do is set java.rmi.server.hostname (-Djava.rmi.server.hostname=yourIP) when launching jboss (This is for the Sun JVM, not sure about the IBM one). This lets RMI know which address to direct requests/replies to. If I don't do this, my remote client will hang when looking up the JNDI name and not receive events.

          -Maurice.

          • 2. Re: JMS and multi-homed hosts
            lingm

            I found a problem with OILClientILService on multi-homed clients which I've posted at

            http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/