Hi All,
I'm testing the AutomaticRecovery feature unplugging and plugging my pc network cable.
After plugging again the cable my api client fails firing this exception:
15:53:53.221 [AMQP Connection
185.107.196.53:5672] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - Caught an exception during connection recovery!
java.net.UnknownHostException:
feedcentremq.uat.betgenius.com: Nome o servizio sconosciuto
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
at java.net.InetAddress.getAllByName(InetAddress.java:1162)
at java.net.InetAddress.getAllByName(InetAddress.java:1098)
at com.rabbitmq.client.DnsRecordIpAddressResolver.resolveIpAddresses(DnsRecordIpAddressResolver.java:83)
at com.rabbitmq.client.DnsRecordIpAddressResolver.getAddresses(DnsRecordIpAddressResolver.java:73)
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:56)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverConnection(AutorecoveringConnection.java:531)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.beginAutomaticRecovery(AutorecoveringConnection.java:494)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.access$000(AutorecoveringConnection.java:53)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection$1.recoveryCanBegin(AutorecoveringConnection.java:435)
at com.rabbitmq.client.impl.AMQConnection.notifyRecoveryCanBeginListeners(AMQConnection.java:693)
at com.rabbitmq.client.impl.AMQConnection.doFinalShutdown(AMQConnection.java:687)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:577)
at java.lang.Thread.run(Thread.java:745)
Strangely this happens only when in factory.setHost I use a domain name.
Using direct ip, api reconnects without exceptions.
Unfortunately the mq server uses an ip pool so I need to set in my client a dns address.
Can someone help me out?
Regards,
Giuseppe.