9 Replies Latest reply on Sep 29, 2003 1:44 PM by stephanenicoll

    JMS and MDB on 3.0.6

    johnurban

      I have downloaded and deployed the MDB example:

      http://www.jboss.org/servlet/JiveServlet/download/48-34795-3786739-1816/testmdb.zip

      on linuxboxA. I also installed the client on my windows desktop, running jboss 3.0.6. I set the jndi.properties to point to linuxboxA. It worked great.

      I then installed the example on linuxboxB running jboss 3.0.6. I modified the jndi.properties to point to linuxboxB. I ran my client and I get the following error:

      C:\Software\mdb3>ant run
      Buildfile: build.xml

      run:
      [echo] client.classpath : ${client.classpath}
      [java] Looking up connection
      [java] javax.naming.CommunicationException. Root exception is java.rmi.ConnectException: Connection refused to hos
      t: 127.0.0.1; nested exception is:
      [java] java.net.ConnectException: Connection refused: connect
      [java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      [java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
      [java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:484)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at test.client.Client.main(Client.java:21)
      [java] Caused by: java.net.ConnectException: Connection refused: connect
      [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
      [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      [java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      [java] at java.net.Socket.connect(Socket.java:426)
      [java] at java.net.Socket.connect(Socket.java:376)
      [java] at java.net.Socket.(Socket.java:291)
      [java] at java.net.Socket.(Socket.java:119)
      [java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
      [java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
      [java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
      [java] ... 8 more
      [java] Exception in thread "main"
      [java] Java Result: 1

      ===================

      the /etc/hosts file for linuxboxB is:

      # Do not remove the following line, or various programs
      # that require network functionality will fail.
      127.0.0.1 linuxboxB localhost.localdomain localhost
      172.18.126.107 linuxboxb linuxboxb.lab.net

      I also was able to run the client on linuxboxB and connect to the jboss server successfully on linuxboxA.

      I just cant connect to linuxboxB from linuxboxA or from my desktop/windows box.



        • 1. Re: JMS and MDB on 3.0.6

          why linuxboxB has the loopback interface as IP? If you want to access it remotely, you should provide a valid IP in your network to the machine.

          Don't use linuxboxB as IP, just use

          linuxboxb (this seems confusing to me all those name).

          Anyway, this is a network problem, change linuxboxB by 172.18.126.107 and it will work fine

          Regards,

          Stephane

          • 2. Re: JMS and MDB on 3.0.6
            johnurban

            Sorry... I certainly confused the issue..

            I really should have just provided the actual names. I edited the names.

            gosling is the box that works fine. aurora is the box that doesn't work.

            I can connect to gosling from my pc. I can connect from aurora to gosling. I CANNOT connect to aurora from gosling OR my PC(I get the above connection refused error).

            Here is an exact cut and paste from the etc/hosts file for:

            gosling:
            [jurban@gosling hpcController]$ more /etc/hosts
            # Do not remove the following line, or various programs
            # that require network functionality will fail.
            127.0.0.1 localhost.localdomain localhost
            172.18.78.15 gosling gosling


            aurora:
            [matlab@aurora matlab]$ more /etc/hosts
            # Do not remove the following line, or various programs
            # that require network functionality will fail.
            127.0.0.1 aurora localhost.localdomain localhost
            172.18.126.107 aurora aurora.willab.net

            So, you are saying that the aurora etc/hosts file is incorrect and that I should change it to be similar to gosling... correct?

            Thanks.

            • 3. Re: JMS and MDB on 3.0.6

              No I was only relying on the information you provided. Have you tried to use the IP instead of the host name in the JNDI properties?

              Regards,

              Stephane

              • 4. Re: JMS and MDB on 3.0.6
                johnurban

                Yes. I have tried both in the jndi.properties. I can even telnet aurora 1099 and get "connected" (I don't get a timeout).

                I'll have my admin double check the access to this port. Thanks for you help.

                • 5. Re: JMS and MDB on 3.0.6
                  johnurban

                  One other thing... I can run the client from aurora, connecting to aurora jboss 1099 server and everything works fine. Could this have something to do with a different sub net?

                  My PC IP: 172.18.79.63
                  aurora IP: 172.18.126.107

                  • 6. Re: JMS and MDB on 3.0.6

                    if the traffic is open from My Pc to aurora, no. Now if you have a firewall between the subnets ...

                    Regards,

                    Stephane

                    PS : anyway, do you still get this stack trace (connection refused to 127.0.0.1)

                    • 7. Re: JMS and MDB on 3.0.6

                      BTW, opening 1099 is not enoguh. The actual communication takes place with RMI. And that one uses other ports.

                      Regards,

                      Stephane

                      • 8. Re: JMS and MDB on 3.0.6
                        johnurban

                        Dark_Lord... it was as you said, a network issue. My network guys figured it out. We changed /etc/hosts to:

                        # Do not remove the following line, or various programs
                        # that require network functionality will fail.
                        127.0.0.1 localhost.localdomain localhost
                        172.18.126.107 aurora aurora.willab.net

                        and that fixed it.

                        Thanks for the help. We are up and running now with MDB's.

                        • 9. Re: JMS and MDB on 3.0.6

                          Pleased to see this.

                          Good luck!

                          Regards,

                          Stephane