9 Replies Latest reply on Apr 2, 2014 4:35 AM by Olgun Kaya

    HornetQ - Session Creation Issue

    Olgun Kaya Newbie

      Hi all,

       

      I am trying to configure my hornetQ client on jboss-7.1.3 towards the queue created on jboss 7.1.1 But I am having a SessionCreation Exception.

      On the 7.1.1 server I am seeeing the below log.

       

      16:15:12,098 INFO  [org.jboss.as.naming] (Remoting "extcomp" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 27831a60 (inbound) of Remoting connection 54f66cb1 to /192.168.180.143:45595

       

      My client configuration is :

      providerUrl : remote://192.168.180.144:4447

      destinationJNDI : queue/provision

      connectionFactoryJNDI : jms/RemoteConnectionFactory

       

      My Server Side configuration is :

       

      Default connectors and acceptors

      Queues

                 <jms-destinations>                                                                                                                            

                          <jms-queue name="provisionReceiver">                                                                                                      

                              <entry name="queue/provision"/>                                                                                                       

                              <entry name="java:jboss/exported/jms/queue/provision"/>                                                                               

                          </jms-queue>                                                                                                                              

                          <jms-queue name="provisionResponder">                                                                                                     

                              <entry name="queueu/provisionResponse"/>                                                                                              

                              <entry name="java:jboss/exported/jms/queue/provisionResponse"/>                                                                       

                          </jms-queue>                                                                                                                              

                          <jms-topic name="testTopic">                                                                                                              

                              <entry name="topic/test"/>                                                                                                            

                              <entry name="java:jboss/exported/jms/topic/test"/>                                                                                    

                          </jms-topic>                                                                                                                              

             </jms-destinations>

       

      interfaces

      <interfaces>                                                                                                                                              

              <interface name="management">                                                                                                                         

                  <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>                                                                                  

              </interface>                                                                                                                                          

              <interface name="public">                                                                                                                             

                  <inet-address value="${jboss.bind.address:0.0.0.0}"/>                                                                                             

              </interface>                                                                                                                                          

              <interface name="unsecure">                                                                                                                           

                  <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>                                                                                  

              </interface>                                                                                                                                          

          </interfaces>

       

      bindings are default

       

       

      the exception on client side I got is :

      Caused by: javax.jms.JMSException: Failed to create session factory

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:605) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:114) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

       

      Can you help me about this please ?

        • 1. Re: HornetQ - Session Creation Issue
          Justin Bertram Master

          The "JBAS011806: Channel end notification received" message you are receiving is an INFO level message and not an error.  It is related to the closing of your JNDI connection.

           

          The "javax.jms.JMSException: Failed to create session factory" is almost certainly caused by your use of 0.0.0.0 for the binding address.  My hunch is that you haven't properly configured the HornetQ netty-connector to deal with this so the client is receiving a JMS connection factory stub which is pointing to 0.0.0.0 which is meaningless to the client.  My first recommendation would be to bind your server to a real IP address instead of 0.0.0.0. 

          • 2. Re: HornetQ - Session Creation Issue
            Olgun Kaya Newbie

            Which in this case : 192.168.180.144 the server that my queue jboss runs at.

             

            I'll try this one also but do you think that there could be a problem related to jboss version differance ? because the client runs on jboss 7.1.3 and server runs on 7.1.1 and hornetq libraries are of course different. Client is much more younger than the server.

            • 3. Re: HornetQ - Session Creation Issue
              Justin Bertram Master

              Once you solve the server binding issue you may still have problems related to mismatched client/server versions.  In general, we've been vigilant to maintains backwards compatibility so that older clients can talk to newer servers, but we've only recently addressed a few issues that prevented newer clients from talking to older servers (and the version you're using may not have those fixes).

              1 of 1 people found this helpful
              • 4. Re: HornetQ - Session Creation Issue
                Olgun Kaya Newbie

                I have changed the ip to the one I mentioned above. So that the exception changed.

                 

                Caused by: javax.jms.JMSException: Failed to create session factory

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:605) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:114) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                        at com.drutt.util.requesting.processor.jms.JmsRequestProcessor.createConnection(JmsRequestProcessor.java:96) ~[util-implementation.jar:6.1.1]

                        at com.drutt.util.requesting.processor.sender.jms.JmsRequestSender.internalInitialize(JmsRequestSender.java:410) ~[util-implementation.jar:6.1.1]

                        ... 5 common frames omitted

                Caused by: org.hornetq.api.core.HornetQException: Timed out waiting to receive cluster topology. Group:null

                        at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:804) ~[hornetq-core-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                        ... 9 common frames omitted

                 

                I am still curious about the versions

                • 5. Re: HornetQ - Session Creation Issue
                  Justin Bertram Master

                  It's hard to tell at this point.  Can you attach the configuration from both nodes?

                  • 6. Re: HornetQ - Session Creation Issue
                    Olgun Kaya Newbie

                    Well the the client side is actaully a product. So that there are some points to write down the jms config. Of course it will be weird without looking at the implementation

                     

                    from the product config; below list is the related config for JMS. jboss 7.1.3

                    <property name="connectionFactoryJndiName" value="jms/RemoteConnectionFactory" />

                    <property name="factoryInitial" value="org.jboss.naming.remote.client.InitialContextFactory" />

                    <property name="providerUrl" value="remote://192.168.180.144:4447" />

                    <property name="destinationJndiName" value="jms/queue/provision" />

                     

                    from the server Jboss 7.1.1 jms queue and binding configs :

                     

                    bindings :

                        <interfaces>

                            <interface name="management">

                                <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>

                            </interface>

                            <interface name="public">

                                <inet-address value="${jboss.bind.address:192.168.180.144}"/>

                            </interface>

                            <interface name="unsecure">

                                <inet-address value="${jboss.bind.address.unsecure:192.168.180.144}"/>

                            </interface>

                        </interfaces>

                     

                     

                        <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                            <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

                            <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

                            <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

                            <socket-binding name="ajp" port="8009"/>

                            <socket-binding name="http" port="8080"/>

                            <socket-binding name="https" port="8443"/>

                            <socket-binding name="jacorb" interface="unsecure" port="3528"/>

                            <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>

                            <socket-binding name="messaging" port="5445"/>

                            <socket-binding name="messaging-throughput" port="5455"/>

                            <socket-binding name="osgi-http" interface="management" port="8090"/>

                            <socket-binding name="remoting" port="4447"/>

                            <socket-binding name="txn-recovery-environment" port="4712"/>

                            <socket-binding name="txn-status-manager" port="4713"/>

                            <outbound-socket-binding name="mail-pop3">

                                <remote-destination host="10.110.10.22" port="25"/>

                            </outbound-socket-binding>

                            <outbound-socket-binding name="mail-smtp">

                                <remote-destination host="localhost" port="25"/>

                            </outbound-socket-binding>

                        </socket-binding-group>

                     

                    messaging config :

                     

                    <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                                <hornetq-server>

                                    <persistence-enabled>true</persistence-enabled>

                                    <security-enabled>false</security-enabled>

                                    <journal-file-size>102400</journal-file-size>

                                    <journal-min-files>2</journal-min-files>

                     

                     

                                    <connectors>

                                        <netty-connector name="netty" socket-binding="messaging"/>

                                        <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                            <param key="batch-delay" value="50"/>

                                        </netty-connector>

                                        <in-vm-connector name="in-vm" server-id="0"/>

                                    </connectors>

                     

                     

                                    <acceptors>

                                        <netty-acceptor name="netty" socket-binding="messaging"/>

                                        <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                            <param key="batch-delay" value="50"/>

                                            <param key="direct-deliver" value="false"/>

                                        </netty-acceptor>

                                        <in-vm-acceptor name="in-vm" server-id="0"/>

                                    </acceptors>

                     

                     

                                    <security-settings>

                                        <security-setting match="#">

                                            <permission type="send" roles="guest"/>

                                            <permission type="consume" roles="guest"/>

                                            <permission type="createNonDurableQueue" roles="guest"/>

                                            <permission type="deleteNonDurableQueue" roles="guest"/>

                                        </security-setting>

                                    </security-settings>

                     

                     

                                    <address-settings>

                                        <address-setting match="#">

                                            <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                            <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                            <redelivery-delay>0</redelivery-delay>

                                            <max-size-bytes>10485760</max-size-bytes>

                                            <address-full-policy>BLOCK</address-full-policy>

                                            <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                        </address-setting>

                                    </address-settings>

                     

                     

                                    <jms-connection-factories>

                                        <connection-factory name="InVmConnectionFactory">

                                            <connectors>

                                                <connector-ref connector-name="in-vm"/>

                                            </connectors>

                                            <entries>

                                                <entry name="java:/ConnectionFactory"/>

                                            </entries>

                                        </connection-factory>

                                        <connection-factory name="RemoteConnectionFactory">

                                            <connectors>

                                                <connector-ref connector-name="netty"/>

                                            </connectors>

                                            <entries>

                                                <entry name="RemoteConnectionFactory"/>

                                                <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                            </entries>

                                        </connection-factory>

                                        <pooled-connection-factory name="hornetq-ra">

                                            <transaction mode="xa"/>

                                            <connectors>

                                                <connector-ref connector-name="in-vm"/>

                                            </connectors>

                                            <entries>

                                                <entry name="java:/JmsXA"/>

                                            </entries>

                                        </pooled-connection-factory>

                                    </jms-connection-factories>

                     

                     

                                    <jms-destinations>

                                        <jms-queue name="provisionReceiver">

                                            <entry name="queue/provision"/>

                                            <entry name="java:jboss/exported/jms/queue/provision"/>

                                        </jms-queue>

                                        <jms-queue name="provisionResponder">

                                            <entry name="queueu/provisionResponse"/>

                                            <entry name="java:jboss/exported/jms/queue/provisionResponse"/>

                                        </jms-queue>

                                        <jms-topic name="testTopic">

                                            <entry name="topic/test"/>

                                            <entry name="java:jboss/exported/jms/topic/test"/>

                                        </jms-topic>

                                    </jms-destinations>

                                </hornetq-server>

                            </subsystem>

                     

                     

                    and the exception is :

                     

                    <product_spesific_exceptions> //removed due to make non-sense on you.

                    Caused by: javax.jms.JMSException: Failed to create session factory

                            at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:605) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                            at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                            at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:114) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                            at com.drutt.util.requesting.processor.jms.JmsRequestProcessor.createConnection(JmsRequestProcessor.java:96) ~[util-implementation.jar:6.1.1]

                            at com.drutt.util.requesting.processor.sender.jms.JmsRequestSender.internalInitialize(JmsRequestSender.java:410) ~[util-implementation.jar:6.1.1]

                            ... 5 common frames omitted

                    Caused by: org.hornetq.api.core.HornetQException: Timed out waiting to receive cluster topology. Group:null

                            at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:804) ~[hornetq-core-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                            at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601) ~[hornetq-jms-2.2.21.Final.jar!/:2.2.21.SNAPSHOT (HQ_2_2_21_final, 122)]

                            ... 9 common frames omitted

                    • 7. Re: HornetQ - Session Creation Issue
                      Justin Bertram Master

                      The configuration looks fine.  I suspect you're running into a client/server compatibility issue.

                       

                      You might try using a JMS bridge on the newer server to pull the messages from the older server.  That way you could create a module using the jars from the older version of HornetQ and have the bridge use that.  See the "JMS Bridge" section here.

                      • 8. Re: HornetQ - Session Creation Issue
                        Olgun Kaya Newbie

                        Thanks for the reply.

                         

                        I did able to build my own Jboss 7.1.3. And I'll deploy and give it a try if it is really a client-server compatibility issue.

                         

                        I suspect that if there is compatibility issue would that cause a timeout exception.

                         

                        If 7.1.3 way not works then I'll give the try for JMS Bridging. I'll be posting here for the progress.

                        • 9. Re: HornetQ - Session Creation Issue
                          Olgun Kaya Newbie

                          I have updated the server jboss to jboss 7.1.3 which is same as the client and it seems that now I have a working jms config.

                           

                          thanks for the assistance Justin.