Platform dependent problem with JBossMQ
grenaria Mar 24, 2004 10:28 AMWe are experiencing problems with remote connections to queues and topics in JBossMQ. The problem is easy to repeat, but it only happens under Windows, under Linux we were not able to create any problems. The problem is that we had intended to have some windows based servers.
The problem occurs both when a connection is accepted to JMS through OILServerILService and also can happen if a JBoss instance connects to another machine through the OILServerILService. By OILServerILService I mean that we tried it with the RMI, OIL, UIL2, and HTTP invokers and the problem occurs for all of those.
As far as we can tell, at any time after the connection is accepted, even after it has been closed for some time, if you remove the network cable from the machine or lose power to the hub that the server is connected to you will start getting exceptions.
Although the exceptions occur slightly differently they are in general the same. Generally a handful of these occur every minute after the device loses power:
2004-03-23 14:50:23,031 WARN [org.jboss.mq.il.oil.OILServerILService] Connection failure (1).
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2313)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2452)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2601)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:206)
at java.lang.Thread.run(Thread.java:534)
Sometimes this one occurs but not always, and sometimes not for a few minutes:
09:06:25,078 WARN [Connection] Connection failure:
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
If the machine that has the network failure is the initiator of the connection, when it tries to reconnect (along with all of the other exceptions it gets) it gets this one:
09:04:35,500 ERROR [STDERR] javax.jms.JMSException: Another thread is already in receive.
09:04:35,500 ERROR [STDERR] at org.jboss.mq.SpyMessageConsumer.receiveNoWait(SpyMessageConsumer.java:333)
09:04:35,500 ERROR [STDERR] at com.cielo.truck.transport.TransportHandler$TransportThread.hotPotato(TransportHandler.java:173)
09:04:35,500 ERROR [STDERR] at com.cielo.truck.transport.TransportHandler$TransportThread.loop(TransportHandler.java:279)
09:04:35,515 ERROR [STDERR] at com.cielo.truck.transport.TransportHandler$TransportThread.run(TransportHandler.java:259)
One time I left it running while giving exceptions every minute, and after 10 minutes or so it started giving exceptions much more often and CPU utilization went to 100%.
I can provide code, but you can make this happen with any Windows JBoss installation and the JBossMQ client demos.
Alex Figliolia