2 Replies Latest reply on Jun 12, 2012 5:18 AM by jaikiran

    JMS Queue reconnection failure jbossas7.1.1-Final

    cesello1969

      We are using two jboss 7.1.1-Final with a very simple client application running into the first jboss (sender) that open a remote jms queue in the second jboss (receiver) and write messages in.

      Everything works great until the second jboss is up and running.

      If I stop the second jboss (receiver) and I restart it the client application running on the first one receive a strange error in a context lookup call.

       

      ERROR [stderr] (http--0.0.0.0-8080-1) javax.naming.NamingException: Failed to lookup [Root exception is org.jboss.remoting3.NotOpenException: Writes closed]

      ERROR [stderr] (http--0.0.0.0-8080-1)  at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)

      ..

       

      an extracted of code ...

       

      ctx = JEEUtils.getInitialContext(remote, host, port, user, password);

      QueueConnectionFactory connFactory = (QueueConnectionFactory)

      ctx.lookup(connectionFactory);   <-------  here happens the exception

       

       

      After that I've added in the

      into the standalone-full.xml at connection-factory hive

       

      <retry-interval>1000</retry-interval>

      <retry-interval-multiplier>1.5</retry-interval-multiplier>

      <max-retry-interval>60000</max-retry-interval>

      <reconnect-attempts>1000</reconnect-attempts>

       

      I see both jboss logs with reconnection messages warning and successfully reconnections .. but the error still happens.

       

       

      Any idea ?

       

      Damiano

        • 1. Re: JMS Queue reconnection failure jbossas7.1.1-Final
          jmesnil

          Damiano Scaramuzza wrote:

           

          We are using two jboss 7.1.1-Final with a very simple client application running into the first jboss (sender) that open a remote jms queue in the second jboss (receiver) and write messages in.

          Everything works great until the second jboss is up and running.

          If I stop the second jboss (receiver) and I restart it the client application running on the first one receive a strange error in a context lookup call.

           

          ERROR [stderr] (http--0.0.0.0-8080-1) javax.naming.NamingException: Failed to lookup [Root exception is org.jboss.remoting3.NotOpenException: Writes closed]

          ERROR [stderr] (http--0.0.0.0-8080-1)  at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)

          ..

           

          an extracted of code ...

           

          ctx = JEEUtils.getInitialContext(remote, host, port, user, password);

          QueueConnectionFactory connFactory = (QueueConnectionFactory)

          ctx.lookup(connectionFactory);   <-------  here happens the exception

           

           

          After that I've added in the

          into the standalone-full.xml at connection-factory hive

           

          <retry-interval>1000</retry-interval>

          <retry-interval-multiplier>1.5</retry-interval-multiplier>

          <max-retry-interval>60000</max-retry-interval>

          <reconnect-attempts>1000</reconnect-attempts>

           

          I see both jboss logs with reconnection messages warning and successfully reconnections .. but the error still happens.

           

           

          Any idea ?

           

          Damiano

           

          The issue you encounter is when you are looking up JMS resources in JNDI.

          The settings you have modified deals with JMS connection (when you call ConnectionFactory.createConnection()). They are not related to your issue.

           

          I am not very familiar with JNDI in AS7 but it seems you try to connect to the AS7 server to look up its resources when it is not open.

          • 2. Re: JMS Queue reconnection failure jbossas7.1.1-Final
            jaikiran

            This is actually a bug which is fixed here https://issues.jboss.org/browse/AS7-4508