Version compatibility of amqp java client between 3.5.1 and 3.5.5 especially on Address

180 views
Skip to first unread message

Julie kim

unread,
Oct 28, 2015, 9:40:18 PM10/28/15
to rabbitmq-users
Hi all,

I have a question about amqp java client version compatibility between 3.5.1 and 3.5.5.
I'm using amqp java client with spring-amqp and cachingConnectionFactory in spring-amqp and I met a problem on getting rabbitmq connection when upgrading amqp-java client from 3.5.1 to 3.5.5.

When I use v3.5.1, I set address property values with hostname only like: "1.1.1.1", "2.2.2.2" with separate port property and instances works well. However, after upgrading the version, it fails to get connection and show me below stack:

18:10:13.716 [WARN ] [SimpleAsyncTaskExecutor-14] (o.s.a.r.listener.SimpleMessageListenerContainer.1239) Consumer raised exception, processing can restart if the connection factory supports it

org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
        at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:56)
        at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:218)
        at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:476)
        at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:80)
        at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:130)
        at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:67)
        at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:439)
        at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1083)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        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:32)
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:646)
        at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:205)
        ... 7 common frames omitted

I checked network condition and instances' behavior but the condition was not problem and instances didn't send any packet to rabbitmq. Also, there are no access log in rabbitmq logs. To solve this connection problem, I did workaround to set address properties not hostname but also port like "1.1.1.1:8072".
I looked through the recent changes on amqp-client between 3.5.1 and 3.5.5 but cannot find any related updates.. Which address format is right? If I set a wrong property format for amqp-client 3.5.1, how can instances operate well with wrong property?


Michael Klishin

unread,
Oct 28, 2015, 11:38:36 PM10/28/15
to rabbitm...@googlegroups.com
Ports are not supposed to be used in hostnames
and if you want a URI, then you need to provide
a schema and so on. You would typically want to update both
spring-amqp and Java client.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages