jhalterman / lyra

High availability RabbitMQ client
Apache License 2.0
263 stars 74 forks source link

when java.net.UnknownHostException is thrown the recovery failed #61

Closed igreenfield closed 7 years ago

igreenfield commented 8 years ago

we are working with DNS load-balancing and if all cluster node failed than java.net.UnknownHostException is thrown and the recovery failed.

2016-07-25 07:07:57.341 ERROR 23574 --- [lyra-recovery-2] n.jodah.lyra.internal.ConnectionHandler : Failed to recover connection cxn-1

java.net.UnknownHostException: rabbitmq.service.vci at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[na:1.8.0_05] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_05] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_05] at com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32) ~[amqp-client-3.6.0.jar!/:na] at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:676) ~[amqp-client-3.6.0.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler$3.call(ConnectionHandler.java:244) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler$3.call(ConnectionHandler.java:237) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.RetryableResource.callWithRetries(RetryableResource.java:51) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler.createConnection(ConnectionHandler.java:237) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler.recoverConnection(ConnectionHandler.java:274) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler.access$100(ConnectionHandler.java:42) ~[lyra-0.5.2.jar!/:na] at net.jodah.lyra.internal.ConnectionHandler$ConnectionShutdownListener$1.run(ConnectionHandler.java:96) ~[lyra-0.5.2.jar!/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_05] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_05] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]