4 Replies Latest reply on Jul 27, 2012 4:38 PM by mdmiles

    Getting Error when connecting to remote JMS queue on JBoss AS 7.1.0/7.1.1

    mdmiles

      I am connecting to a couple of remote queues (all on the same JBoass AS 7.1.0 or JBoss AS 7.1.1) from an external command-line client as well as a class in the deployments on the JBoss server to drop JMS messages and I am getting errors as indicated below. The messages are getting put on the queues and are being handled by our applications, but I have not been able to get rid of these exceptions. These were not always showing up. I upgraded the servers to AS 7.1.1.Final and I started seeing them, so i backed 7.1.1 back out and redeployed 7.1.0.Final, but they are still there. Is this a JBoss bug/issue, or is there something that I might need to set to eliminate this error?

       

      Here is what I am getting in the server.log:

       

      10:31:24,960 ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: Connection reset by peer

      10:31:24,965 ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: Connection reset by peer

      10:40:07,764 INFO  [org.jboss.as.naming] JBAS011806: Channel end notification received, closing channel Channel ID 3e1594b1 (inbound) of Remoting connection 18d54f19 to /172.16.144.65:53221

      10:40:08,909 INFO  [org.jboss.as.naming] JBAS011806: Channel end notification received, closing channel Channel ID 046f2cfd (inbound) of Remoting connection 046a361e to /172.16.40.34:51629

       

      Here is what I am getting in the console of the console app running as junit unit test in eclipse:

       

      0    [main] DEBUG org.jboss.logging  - Logging Provider: org.jboss.logging.Log4jLoggerProvider

      16   [main] DEBUG org.jboss.naming.remote.client.InitialContextFactory  - Looking for jboss-naming-client.properties using classloader sun.misc.Launcher$AppClassLoader@53372a1a

      18   [main] DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.endpoint.create.options. has the following options {}

      18   [main] DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.remote.connectionprovider.create.options. has the following options {}

      23   [main] INFO  org.xnio  - XNIO Version 3.0.3.GA

      28   [main] INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.0.3.GA

      39   [main] INFO  org.jboss.remoting  - JBoss Remoting version 3.2.2.GA

      83   [Remoting "config-based-naming-client-endpoint" read-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-naming-client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl@342f356f

      83   [Remoting "config-based-naming-client-endpoint" write-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-naming-client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl@75d252d

      93   [main] DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.connect.options. has the following options {}

      741  [Remoting "config-based-naming-client-endpoint" task-2] ERROR org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1  - Channel end notification received, closing channel Channel ID cd19146a (outbound) of Remoting connection 55443800 to localhost/127.0.0.1:4447

      One or more of the Identity Messages failed send to the JMS Queue: jms/queue/remintegrationqueue

       

      The following is the code that the commandiline client uses to conect:

       

      public static boolean sendMessage(String hostName, Integer port, String queueName, String message, String userName, String password)

        throws IOException, JMSException, NamingException {

       

                boolean success = false;

       

                Session session = null;

                Connection conn = null;

                MessageProducer producer = null;

       

                try          {

                               Context context = null;

                               ConnectionFactory connFactory = null;

                               Queue queue = null;

       

                               Properties props = new Properties();                                                                                             

                               props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

                               props.put(Context.PROVIDER_URL, "remote://" + hostName + ":" + port);

                               context = new InitialContext(props);

                               connFactory = (ConnectionFactory) context.lookup(REMOTE_CONNECTION_FACTORY_NAME);

       

                               queue = (Queue)context.lookup(queueName);

       

       

                               conn = connFactory.createConnection(userName, password);

                               session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

       

                               producer = session.createProducer(queue);

                               Message messageToSend = null;

                               messageToSend = session.createTextMessage((String)message);

       

       

                               producer.send(messageToSend);

             context.close();

             }

             finally          {

                  try          {

                       if (conn != null) conn.close();

                               } catch (Exception e2) {}

                }

       

       

                return success;

      }

       

      Any help you can provide would be greatly appreciated!

       

      Thanks!