camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sreekumara <sreekum...@gmail.com>
Subject ActiveMQ - RabbitMQ Camel bridge over SSL+MQTT transport protocol
Date Thu, 30 Jul 2015 10:28:23 GMT
I am trying to make a bridge between Active MQ to Rabbit MQ through activemq
embedded camel configurations using MQTT over SSL . 

Active MQ version --- apache-activemq-5.10.0 
Camel version  ------  Apache Camel 2.15.2 
Rabbit MQ version ---- RabbitMQ.3.5.0 

Camel Jars versions used are as given below: 
activemq-camel-5.10.0.jar 
camel-core-2.15.2.jar 
camel-jms-2.15.2.jar 
camel-mqtt-2.15.2.jar 
camel-rabbitmq-2.15.2.jar 
camel-spring-2.15.2.jar 
rabbitmq-client.jar 

  
As per camel documentation in the link (http://camel.apache.org/mqtt.html).
I have configured the camel Route for MQTT as below 

<route>
        <from uri="activemq:topic://testTopic"/>
      <to
uri=&quot;mqtt:test?host=ssl://&lt;&lt;hostname>>:1884&qualityOfService=AtLeastOnce&publishTopicName=logs&userName=rmqtest:test&password=test"/>
 </route>

I am getting below errors in the Active MQ log and Rabbit MQ logs 
Active MQ log: 
[WARN] 2015-07-29 11:11:16,110 org.apache.camel.component.mqtt.MQTTEndpoint
onFailure - Failed to connect to ssl://<<Host Name>>:1884 due Disconnected 
[WARN] 2015-07-29 11:11:17,054 org.apache.camel.spring.SpringCamelContext
shutdownServices - Error occurred while shutting down service:
Endpoint[mqtt:test?host=ssl://<<hostname>>:1884&qualityOfService=AtLeastOnce&publishTopicName=logs&userName=rmqtest:test&password=xxxxxx].
This exception will be ignored. 
java.util.concurrent.TimeoutException 
 at org.fusesource.mqtt.client.Promise.await(Promise.java:83) 
                at
org.apache.camel.component.mqtt.MQTTEndpoint.doStop(MQTTEndpoint.java:161) 
                at
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102) 
                at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141) 
                at
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:204) 
                at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2827)

                at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2852)

                at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2840)

                at
org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:2701) 
                at
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102) 
                at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72) 
                at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432) 
                at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255) 
                at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)

                at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)

                at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
                at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)

                at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)

                at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)

                at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)

                at
org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104) 
                at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)

                at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) 
                at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71) 
                at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) 
                at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87) 
                at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 
                at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150) 
                at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 
                at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) 
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) 
                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
                at java.lang.reflect.Method.invoke(Method.java:606) 
                at
org.apache.activemq.console.Main.runTaskClass(Main.java:262) 
                at org.apache.activemq.console.Main.main(Main.java:115) 
Rabbit MQ log: 
=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started TCP Listener on [::]:5671 
=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started SSL Listener on [::]:5673 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
rabbit_stomp: default user 'guest' enabled 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
rabbit_stomp: ssl_cert_login enabled 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started STOMP TCP Listener on [::]:6162 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started STOMP SSL Listener on [::]:6164 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started MQTT TCP Listener on [::]:1882 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
started MQTT SSL Listener on [::]:1884 

=INFO REPORT==== 29-Jul-2015::11:44:18 === 
Server startup complete; 5 plugins started. 
* rabbitmq_shovel 
* rabbitmq_mqtt 
* rabbitmq_stomp 
* rabbitmq_amqp1_0 
* amqp_client 
=ERROR REPORT==== 29-Jul-2015::11:11:07 === 
MQTT detected TLS upgrade error on <<hostname>>:44143 -> <<>hostname>:1884:
connection closed 

=ERROR REPORT==== 29-Jul-2015::11:11:07 === 
** Generic server <0.384.0> terminating 
** Last message in was {'$gen_cast', 
                           {go,#Port<0.4119>, 
                              
#Fun<rabbit_networking.3.120554880>,<0.385.0>}} 
** When Server state == undefined 
** Reason for termination == 
** {network_error,{ssl_upgrade_error,closed}, 
                  "<<hostname>>:44143 -> <<hostname>>:1884"} 


Also I have tried adding SSL Context configuration to set trust store like
below. 

<camel:sslContextParameters id="sslContextParameters">
<camel:keyManagers keyPassword=&quot;&lt;&lt;password>>"> 
<camel:keyStore password=&quot;&lt;&lt;password>>"
resource="/data01/Datapush/client/keycert.p12"/></camel:keyManagers>
<camel:trustManagers>
<camel:keyStore password=&quot;&lt;&lt;password>>"
resource="/data01/Datapush/server/trustStore"/></camel:trustManagers>
</camel:sslContextParameters>

I got the same errors like above. 

I am able to connect to both ActiveMQ and MQTT over SSL successfully from
stand alone java programs. 

The link http://camel.apache.org/mqtt.html mentioned it supports MQTT over
SSL, what is wrong in my Camel route configurations ? Please help me to
setup this bridge connections . I have similar problems with SSL+STOMP also.

Thanks in advance. 
Sreekumar 




--
View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-RabbitMQ-Camel-bridge-over-SSL-MQTT-transport-protocol-tp5770102.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message