2 Replies Latest reply on Oct 22, 2012 11:54 AM by jbertram

    Error while connecting JMS queue from remote host

    anilkonduru

      Hi,

       

      I have an issue while i am trying to access JBoss JMS queue from a remote host (using JBoss server's external IP) where my JBoss server is started with internal IP(accessible on VLAN). I have configured acceptor (in hornetq-configuration.xml) as below, but no luck.. any help?

       

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: {external IP}:9099 and discovery failed with error: javax.naming.CommunicationException: Failed to retrieve stub from server /{JMS Client IP}:1100 [Root exception is java.io.StreamCorruptedException: unexpected block data] [Root exception is javax.naming.CommunicationException: Failed to connect to server /{external IP}:9099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /{external IP}:9099 [Root exception is java.net.ConnectException: Connection refused]]]

       

      hornetq-configuration.xml:

       

      <acceptors>

            <!-- In VM acceptor -->

            <acceptor name="in-vm">

               <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>

              <param key="host"  value="10.11.123.145 (external IP)"/>

               <param key="port" value="5445"/>

      </acceptor>

       

      JBoss startup command:

       

      run.sh -b {internal IP}

        • 1. Re: Error while connecting JMS queue from remote host
          clebert.suconic

          You should define the connector using the proper IP / port.

           

          BTW: I will move your discussion to the user's forum. this is the dev forum and we use it for design... this is not a design question.

          • 2. Re: Error while connecting JMS queue from remote host
            jbertram

            Actually there look to be a few issues here.

             

            1. The error you're receiving is a javax.naming.CommunicationException which means your JNDI look-up is failing.  In other words, you aren't even getting to HornetQ.
            2. You've defined an org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory with a host and port which is not a valid configuration.  You should use org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory instead.
            1 of 1 people found this helpful