Because you didn't close the connection?
I do close the connection but get this error on the client when doing it...
org.jboss.mq.SpyJMSException: Cannot close properly the connection; - nested throwable: (java.net.SocketException: Connection reset by peer: socket write error)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
... 5 more
This problem was fixed in 3.0.7
It was possible for the stopping of the
ping thread to be bypassed by other errors.
Hi, Im also having serious problems with this connection failed - Ping error message and we have closed the connection as well.
THe problem is that we are using the JBoss 3.0.4 version and we are not able to upgrade as it is being used in a deployment. Is there any way to kill it at all???
Also why is it that the connection timesout.
We are trying to build an application that can run for extended periods of time so the when we have all hte elements such as hte initial connection, queue session, queue ect... which ones of htese do actually time out and how do you configure so that they dont time out..
I'm seeing this same problem in 3.2.1 on Linux with java 1.4.2.
I have an Exception Listener that reconnects after JBOSS goes down and comes back up. This works fine except that my ExceptionListener will continue to be called over and over and over with a ping timeout exception. Not sure why.
We are also seeing the same error with 3.2.2 on windows 2000 pro using java 1.4.1
We are seeing the same problem after upgrading to JBoss 3.2.2. Unfortunately we are not going back to 3.2.1 but this problem need to be solved.
We are closing all connections when done, and I have ExceptionListener registered as well.
Since it is a WARNING, we could probably turn it off by setting the logging level to be FATAL. However, that does not stop the ClockDaemon's ping task. Does someone has any suggestions?
Anybody has any suggestions?
I have met it on jboss3.2.2 and jboss3.2.1, and can't resolve it now. Adrian, can you give some good advice?
Like I said originally, close the connection. That will stop the ping thread.
oh, I seems to find my problem. I used a static QueueConnection in my class, and I initialized the connection and other thing, then used it later for every time I want to send message. I thought I can help my performance, and appareantly I was wrong.
the pattern to use JMS is just like below:
lookup the factory
create a connection
create a session
create a sender
and I confused I must repeat the step every time.
there are some steps that just need to initialize once?
No, you just need to install an ExceptionListener on the connection.
When the connection fails, you reinitialize (closing the previous connection).
Ive been following this thread and I agree with your suggestions. However when I close my connections my entire receiver terminates. If I dont close the connection using connection.close() and set the session and connection to null, then I have a receiver that IS able to recover when the MQ Server goes down, the receiver stays alive when the MQ server goes down and picks up new messages from the queue correctly ... this is with the reinitialization in my onException(). The only issue is ping timeouts of the other failed connections. So my issue is if I want the receiver to stay up and wait for the MQ to come back up I dont use close(), but my ping timeouts dont get cleaned up.
Can someone point me in the direction for some sample code that demonstrates how a receiver can stay up to reconnect after an MQ goes down AND still clean up the connections causing a ping timeout? I apologize if this is a simple item as Ive seen many similar questions/responses in the forums, but I havent found a straightforward way to accomplish this needed robustness. Thanks for everyone's time.
I had to extend thread and simply make a sleeping thread in an infinite loop in the background to keep the client alive while I closed the connection. I previously had the problem of closing the connections to stop the constant ping but it exited my app. It may not be the best way but it seems to work for my needs. Thanks!