future complete not called after reconnect in RabbitMQClientImpl.start
derekjwashington opened this issue · 4 comments
When using docker-compose my app attempted to connect to RabbitMQ container before RabbitMQ was ready to accept connections. I have connectionRetries=3 so my app correctly tried again. On the second attempt connection succeeded but my app hung and the verticle didn't finishing starting. Looking at RabbitMQClientImpl start method, version 3.5.0 line 338, I noticed future.complete() not called.
Excerpt from logs:
Jan 11, 2018 1:51:58 AM io.vertx.rabbitmq.impl.RabbitMQClientImpl
INFO: Starting rabbitmq client
Jan 11, 2018 1:51:58 AM io.vertx.rabbitmq.impl.RabbitMQClientImpl
SEVERE: Could not connect to rabbitmq
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:47)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:822)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:778)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:868)
at io.vertx.rabbitmq.impl.RabbitMQClientImpl.newConnection(RabbitMQClientImpl.java:86)
at io.vertx.rabbitmq.impl.RabbitMQClientImpl.connect(RabbitMQClientImpl.java:396)
at io.vertx.rabbitmq.impl.RabbitMQClientImpl.lambda$start$20(RabbitMQClientImpl.java:332)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:278)
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Jan 11, 2018 1:51:58 AM io.vertx.rabbitmq.impl.RabbitMQClientImpl
INFO: Attempting to reconnect to rabbitmq...
Jan 11, 2018 1:52:08 AM io.vertx.rabbitmq.impl.RabbitMQClientImpl
INFO: Successfully reconnected to rabbitmq (attempt # 1)
Can you please provide a reproducer?
@Sammers21 I think this is a double of this issue: #46
can we close it as duplicate ?
closing as it seems a re