Description
The resource clean up code for dead clients doesn't seem to work reliably. Probably not a show-stopper for a beta release, but definitely needs to be cleaned up for production. Basically, when Artemis detected a dead client (it stopped responding because I hit a breakpoint in my debugger), it tried to clean it up, but failed. The result is that I can no longer connect a new client from that client machine, because the broker thinks I already have a connection. This is after I killed my client app and restarted it. I'll log a bug for this one, but here's the server log (note the final INFO message of "failed to remove connection"):
WARN [org.apache.activemq.artemis.core.server] AMQ222067: Connection failure has been detected: AMQ119014: Did not receive data from /xxx.xxx.xxx.xxx:53516. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=CONNECTION_TIMEDOUT] WARN [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session ID:testmachine-63273-635671999039695375-1:0:-1 WARN [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session ID:testmachine-63273-635671999039695375-1:0:-1 WARN [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session ID:testmachine-63273-635671999039695375-1:0:1 WARN [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session ID:testmachine-63273-635671999039695375-1:0:1 INFO [org.apache.activemq.artemis.core.server] AMQ221021: failed to remove connection
Attempting to run a fresh client gets the following return exception on the client:
Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(Persistent): Apache.NMS.InvalidClientIDException : Broker: mybroker - Client: ID:AsyncConsumeTest:1:2 already connected from /xxx.xxx.xxx.xxx:53516