Issue
Running repro.bash
while RabbitMQ is running and listening on port 5672
will reproduce the issue:
- Download artifacts
- Start up
toxiproxy-server
listening on port55672
, forwarding to RMQ - Start up PerfTest with defaults connecting to port
55672
- After 10 seconds, disable TCP proxy which immediately kills the connection
- After 30 seconds, re-enable TCP proxy
- You will see PerfTest try to reconnect, but the following is logged by RabbitMQ:
2018-07-17 15:21:27.432 [warning] <0.23374.2> closing AMQP connection <0.23374.2> (127.0.0.1:19192 -> 127.0.0.1:5672 - perf-test-consumer-0): {handshake_timeout,frame_header}
- The following is the exception shown by PerfTest:
15:21:27.442 [AMQP Connection 127.0.0.1:55672] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - Caught an exception during connection recovery! java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7268228e rejected from java.util.concurrent.ScheduledThreadPoolExecutor@744259fb[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326) at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:573) at com.rabbitmq.client.impl.HeartbeatSender.setHeartbeat(HeartbeatSender.java:85) at com.rabbitmq.client.impl.AMQConnection.setHeartbeat(AMQConnection.java:479) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:394) at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64) at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverConnection(AutorecoveringConnection.java:585) at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.beginAutomaticRecovery(AutorecoveringConnection.java:547) at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.access$000(AutorecoveringConnection.java:58) at com.rabbitmq.client.impl.recovery.AutorecoveringConnection$3.recoveryCanBegin(AutorecoveringConnection.java:488) at com.rabbitmq.client.impl.AMQConnection.notifyRecoveryCanBeginListeners(AMQConnection.java:748) at com.rabbitmq.client.impl.AMQConnection.doFinalShutdown(AMQConnection.java:725) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:609) at java.lang.Thread.run(Thread.java:748)