JMS Error after few hours sending message and Jboss ping err
cgonzalez Jun 8, 2004 5:21 PMHi,
We are using JBoss 3.2.3 on Windows 2000 Server running Sun JDK 1.4.2.
We have two problems:
First:
Our application needs to send messages to a queue in the same machine for a long time. But, After a few hours we have the following exception:
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.ConnectException: Connection refused: connect)
at org.jboss.mq.Connection.authenticate(Connection.java:883)
at org.jboss.mq.Connection.(Connection.java:238)
at org.jboss.mq.Connection.(Connection.java:315)
at org.jboss.mq.SpyConnection.(SpyConnection.java:60)
at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
at com.acmgrp.tellarian.communications.RecordSender.send(RecordSender.java:112)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:434)
at java.net.Socket.connect(Socket.java:384)
at java.net.Socket.(Socket.java:291)
at java.net.Socket.(Socket.java:147)
at javax.net.DefaultSocketFactory.createSocket(DashoA6275)
at org.jboss.mq.il.oil.OILServerIL.createConnection(OILServerIL.java:563)
at org.jboss.mq.il.oil.OILServerIL.checkConnection(OILServerIL.java:507)
at org.jboss.mq.il.oil.OILServerIL.authenticate(OILServerIL.java:289)
at org.jboss.mq.Connection.authenticate(Connection.java:876)
... 54 more
To send the message to the queue we have the following code:
try {
context = new InitialContext();
connectionFactory = (QueueConnectionFactory) context.lookup("ConnectionFactory");
queue = (Queue) context.lookup("queue/infoRecordQueue");
queueConnection = connectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
sender = queueSession.createSender(queue);
objectMessage = queueSession.createObjectMessage();
objectMessage.setObject(record);
sender.send(objectMessage);
} catch (NamingException e1) {
log.error("Error, NammingException occurred trying to send the TellarianInfoRecord", e1);
} catch (JMSException e) {
log.error("Error, JMSException occurred trying to send the TellarianInfoRecord", e);
} finally{
if (queueConnection != null){
try {
queueConnection.close();
} catch (JMSException e2) {
log.error("Error, JMSException occurred trying to close queueConnection", e2);
}
}
}
Second:
After the first error, when the server has been running for extended periods of time we note the following error keeps getting posted to our server.log:
org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable:
(java.io.IOException: ping timeout.)
at org.jboss.mq.Connection.asynchFailure(Connection.java:718)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1311)
at
EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.IOException: ping timeout.
at org.jboss.mq.Connection$PingTask.run(Connection.java:1303)
... 2 more
And from here, the ping error listed above constantly writtes to the log.
Our application run succesfully for a few hours, and this make us believe that the ping error have not relation with a Network failure.
Anybody can help me? Thanks!