osdir.com


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

Re: Camel 2.22.1 and Rabbitmq getting a error


Hi Babak,

You were right with the port 15672 there was a port forwarding issue. I
reconfigured the port forwarding and was able to get the connection to
work.

I found another issue with RMQ bean configuration. In our RMQ
configuration, we are using vhost. When I configured the from route,  I
put the vhost=test in the uri and for some reason Camel doesn't pick up
the vhost value! I had to configure the virtual host at the connection
factory level.

Thank you for your help,

Alireza Salemi

>
>
> Hi Alireza
>
> I tried to reproduce your issue at the following repo:
>
> https://github.com/bvahdat/camel-user-forum-rabbitmq
> <https://github.com/bvahdat/camel-user-forum-rabbitmq>
>
> Starting the App using the the port 15672 runs into problems similar to
yours, that said the stack trace is *not* exactly the same as yours.
Using the port 5672 works properly for me. (Please note that I expose
both the ports 5672 as well as 15672 from the Docker image)
>
> Given your stack trace I found couple of hits on Google about people
having the same issue using RabbitMQ, so to me the problem is not Camel
specific. There were also couple of minor issues inside your POM I tried
to fix by the repo above visible the commit history.
>
> Babak
>
>> On 10 Nov 2018, at 23:13, Alireza Salemi <alireza.salemi@xxxxxxx> wrote:
>>
>> Hi Babak,
>>
>> I tried the port you mentioned 5672. I am getting the same result!
>>
>> 2018-11-10 14:07:00.819  WARN 66945 --- [ 127.0.0.1:5672]
>> c.r.c.impl.ForgivingExceptionHandler     : An unexpected connection driver
>> error occured (Exception message: Socket closed)
>> 2018-11-10 14:07:05.822  WARN 66945 --- [:0:0:0:0:1:5672]
>> c.r.c.impl.ForgivingExceptionHandler     : An unexpected connection driver
>> error occured (Exception message: Socket closed)
>>
>> Thank you,
>> Ali
>>
>>> Hi,
>>>
>>> I am trying to connect Camel to RabbitMq  but I am getting the error
below. Does any body have any idea why this configuration is not
working?
>>> I have attached the PM and Route XML.
>>>
>>>
>>> Thank you,
>>> Ali
>>>
>>> 2018-11-09 22:19:30.764  INFO 30863 --- [           main]
>>> o.a.c.c.rabbitmq.RabbitMQComponent       : Auto-detected single instance:
>>> customConnectionFactory of type ConnectionFactory in Registry to be used
>>> as ConnectionFactory when creating endpoint:
>>> rabbitmq://connectionFactory=%23customConnectionFactory&queue=network_status&vhost=rbo&exchangeType=queue&autoDelete=false&prefetchEnabled=true&prefetchCount=100&threadPoolSize=100&channelPoolMaxSize=100
2018-11-09 22:19:30.822  INFO 30863 --- [           main]
>>> o.a.camel.spring.SpringCamelContext      : StreamCaching is not in
use. If
>>> using streams then its recommended to enable stream caching. See more
details at http://camel.apache.org/stream-caching.html
>>> 2018-11-09 22:19:35.942  WARN 30863 --- [0:0:0:0:1:15672]
>>> c.r.c.impl.ForgivingExceptionHandler     : An unexpected connection
driver
>>> error occured (Exception message: Socket closed)
>>> 2018-11-09 22:19:40.938  WARN 30863 --- [127.0.0.1:15672]
>>> c.r.c.impl.ForgivingExceptionHandler     : An unexpected connection
driver
>>> error occured (Exception message: Socket closed)
>>> 2018-11-09 22:19:40.944  WARN 30863 --- [           main]
>>> o.a.c.component.rabbitmq.RabbitConsumer  : Unable to open channel for
RabbitMQConsumer. Continuing and will try again
>>>
>>> java.util.concurrent.TimeoutException: null
>>> 	at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:77)
>>> ~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:120)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:494)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:315)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1095)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1012)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1201)
~[amqp-client-5.4.3.jar:5.4.3]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:230)
~[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:64)
[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQConsumer.getConnection(RabbitMQConsumer.java:75)
[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitConsumer.<init>(RabbitConsumer.java:55)
~[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQConsumer.createConsumer(RabbitMQConsumer.java:120)
[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQConsumer.createConsumers(RabbitMQConsumer.java:96)
[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.component.rabbitmq.RabbitMQConsumer.doStart(RabbitMQConsumer.java:172)
[camel-rabbitmq-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3705)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:4023)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3958)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3878)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3642)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3494)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:209)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3253)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3249)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3272)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3249)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3165)
[camel-core-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:133)
[camel-spring-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.spring.CamelContextFactoryBean.start(CamelContextFactoryBean.java:369)
[camel-spring-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:416)
[camel-spring-2.22.1.jar:2.22.1]
>>> 	at
>>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:94)
[camel-spring-2.22.1.jar:2.22.1]
>>> 	at
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:398)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:355)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
>>> 	at
>>> org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at
>>> viasat.camel.RmqToS3CamelApplication.main(RmqToS3CamelApplication.java:21)
[classes/:na]
>>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> ~[na:1.8.0_151]
>>> 	at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_151]
>>> 	at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_151]
>>> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151] at
>>> org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:558)
[spring-boot-maven-plugin-2.1.0.RELEASE.jar:2.1.0.RELEASE]
>>> 	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
>>>
>>
>
>
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion
below:
> http://camel.465427.n5.nabble.com/Re-Camel-2-22-1-and-Rabbitmq-getting-a-error-tp5825625p5825632.html
>
> To unsubscribe from Camel - Users, visit
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465429&code=YWxpcmV6YS5zYWxlbWlAdWRvLmVkdXw0NjU0Mjl8LTczMjM3ODExNw==