OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apache Camel - rabbitmq - ssl ( not working )


Hi Pranay,
seems that you have a network issue (Connection refused), make sure
that the configuration references the right host/port combination. I
have found that setting `-Djavax.net.debug=all` JVM property is quite
helpful to diagnose such issues.

zoran

On Wed, Apr 11, 2018 at 4:20 AM, Pranay Tonpay <ptonpay@xxxxxxxxx> wrote:
> I am trying to use apache camel ( camel-spring-boot - 2.20.2 ) with
> rabbitmq and create routes. It does work fine when iI use un-secured
> RabbitMQ ( no-SSL ), but when iI try to connect to RabbitMQ using SSL, it's
> not connecting to the queue at all. I am using "connectionFactory" option
> given on Apache Camel page. This connectionFactory object has all the
> correct parameters set (useSslProtocol, username, password etc ) Please
> note that the connectionFactory is properly populated, as iI am able to use
> it to connect using the other way (setting it in setConnectionFactory on
> SimpleMessageListenerContainer ). But with Apache Camel iI am facing issues.
>
> java.net.ConnectException: Connection refused (Connection refused)
>     at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_161]
>     at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> ~[?:1.8.0_161]
>     at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> ~[?:1.8.0_161]
>     at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> ~[?:1.8.0_161]
>     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> ~[?:1.8.0_161]
>     at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_161]
>     at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
> ~[?:1.8.0_161]
>     at
> com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>     at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:918)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>     at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:870)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>     at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:828)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>     at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:996)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>     at
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:248)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
>     at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:64)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
>     at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.getConnection(RabbitMQConsumer.java:75)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
>     at
> org.apache.camel.component.rabbitmq.RabbitConsumer.<init>(RabbitConsumer.java:55)
> [camel-rabbitmq-2.20.2.jar!/:2.20.2]
>     at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.createConsumer(RabbitMQConsumer.java:120)
> [camel-rabbitmq-2.20.2.jar!/:2.20.2]



-- 
Zoran Regvart