6 Replies Latest reply on Apr 26, 2011 12:38 AM by andrew.s

    Remote JMS client hanging on createConnection

    andrew.s

      Hello,

       

      I'm attempting to get a remote JMS client connecting to a JBoss 5.1.0 AS upgraded to HornetQ 2.2.2 for it's messaging.  This client is using the SSL servlet transport.  I was able to get everything working with JBoss running locally to the client.  I have now split them out and am attempting to get the client working connecting remotely.  I have tried it three different ways (all with the same setup I had when it was working locally):

       

      1. Running by just using the run.sh -c default-with-hornetq
      2. Running with -c default-with-hornetq -b 0.0.0.0
      3. Running with -c default-with-hornetq -b <actual server IP address>

       

      In scenario #1, I almost immediately get a connection refused exception.  In scenarios #2 and #3, I am able to do the JNDI lookup successfully for the connection factory (/ServletConnectionFactory), however, that retrieved connection factory hangs on the createConnection() call.  I've let it sit there for several minutes and I don't get an error back, it just blocks.

       

      I can provide configuration files or whatever...Just was not sure what would helpful.

       

      Thanks for any help,

      Andrew

        • 1. Remote JMS client hanging on createConnection
          clebert.suconic

          take a look at your hornetq-configuration.xml acceptors.. I don't think the jboss-bind-address is being used by default. Maybe you have to add the IP manually or change the properties.

           

           

          That's something we changed on the EAP integration, and AS6 integration.. but I'm not sure about the integration with AS 5.

          • 2. Remote JMS client hanging on createConnection
            andrew.s

            I'm basing my connectors and acceptors off of the 2.2.2 ssl-servlet example.  I've pasted them below.

             

               <connectors>

                  <connector name="netty-servlet">

                     <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                     <param key="host" value="localhost"/>

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

                     <param key="use-servlet" value="true"/>

                     <param key="servlet-path" value="/SSD-web/HornetQServlet"/>

                     <param key="ssl-enabled" value="true"/>

                     <param key="key-store-path" value="/SSD/keystore/ssd.keystore"/>

                     <param key="key-store-password" value="ssdkeystore"/>

                  </connector>

               </connectors>

             

               <acceptors>

              

                  <acceptor name="netty-servlet">

                     <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                     <param key="use-invm" value="true"/>

                     <param key="host" value="org.hornetq"/>

                  </acceptor>

             

                  <acceptor name="netty-invm">

                     <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                     <param key="use-invm" value="true"/>

                     <param key="host" value="org.hornetq"/>

                  </acceptor>

                 

               </acceptors>

             

            Should I change the host value?  If I should change it, I'm figuring I should put 0.0.0.0 in there, correct?  Why would this have worked with everything located on the same server (still remote JMS) versus with the AS remotely located?

             

            Thanks again for your help,

            Andrew

            • 3. Remote JMS client hanging on createConnection
              clebert.suconic

              You need to define both these properties on both acceptors and connectors:

               

               

                       <param key="host"  value="${jboss.bind.address:localhost}"/>

                       <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

               

               

              or maybe

               

               

                       <param key="host"  value="${jboss.bind.address:localhost}"/>

                       <param key="port"  value="${hornetq.remoting.netty.ssl.port:5446}"/>

               

               

               

              you currently have the connector trying localhost and the acceptor is not listening to any other port.

               

               

              I also suggest you looking at chapter 16: http://docs.jboss.org/hornetq/2.2.2.Final/user-manual/en/html/configuring-transports.html#configuring-transports.acceptors

              • 4. Remote JMS client hanging on createConnection
                andrew.s

                Thanks for the info....I'll give it a try.  I've actually looked at that chapter, but I'll give it another read through, since obviously I don't have everything down.

                 

                On a side note, will the standard netty TCP work over SSL for a remote client into the app server?  I'd prefer to use this over the ssl servlet, but since I didn't see an example for this, was thinking it might not work.  I looked for it in the documentation, but I wasn't sure if all the different types of connectors/acceptors worked while running in the app server.

                 

                Thanks for the help,

                Andrew

                • 5. Remote JMS client hanging on createConnection
                  clebert.suconic

                  It should all work the same being standalone or inside the App server.

                  1 of 1 people found this helpful
                  • 6. Remote JMS client hanging on createConnection
                    andrew.s

                    Yes, thanks, I tried it locally just to see after I replied.  It definitely worked.  I will try on my remote setup tomorrow when I'm in the office for the binding solution.

                     

                    Thanks for all of you help/info,

                    Andrew