0

I have included the required jar files in IoT server and the IoT Broker console shows that JMS provider is up and running as shown below

[2018-06-06 23:21:09,764] [IoT-Broker]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
[2018-06-06 23:21:09,765] [IoT-Broker]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
[2018-06-06 23:21:10,659] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSConnectionFactory} -  JMS ConnectionFactory : myTopicConnectionFactory initialized
[2018-06-06 23:21:10,660] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSConnectionFactory} -  JMS ConnectionFactory : default initialized
[2018-06-06 23:21:10,661] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSConnectionFactory} -  JMS ConnectionFactory : myQueueConnectionFactory initialized
[2018-06-06 23:21:10,661] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSListener} -  JMS Transport Receiver/Listener initialized...
[2018-06-06 23:21:10,724] [IoT-Broker]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v22 - file:/Users/amar/Documents/ThesisCode/CEP_codes/wso2iot_server/wso2/broker/repository/deployment/client/modules/addressing-1.6.1-wso2v22.mar
[2018-06-06 23:21:10,739] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Sender started
[2018-06-06 23:21:10,739] [IoT-Broker]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Transport Sender initialized...
[2018-06-06 23:21:11,058] [IoT-Broker]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.andes.admin-3.2.16 -

However, I am getting the following error in the IoT Analytics console.

Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)

The code for JMS publisher adapter is

<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="scep_s1_jmss" processing="enable"
  statistics="enable" trace="enable" xmlns="http://wso2.org/carbon/eventpublisher">
  <from streamName="stream1_scep_timestamped" version="1.0.0"/>
  <mapping customMapping="disable" type="text"/>
  <to eventAdapterType="jms">
    <property name="transport.jms.DestinationType">queue</property>
    <property name="transport.jms.Destination">queue1</property>
    <property name="transport.jms.ConcurrentPublishers">allow</property>
    <property name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property>
    <property name="java.naming.provider.url">tcp://localhost:61616</property>
    <property name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</property>
    <property name="transport.jms.UserName">admin</property>
    <property encrypted="true" name="transport.jms.Password">aa47+5/q7d9AvOHUyYAJDXrx0Q6GQmgzIKS/hOkzp6huHrxslJJk6Oqmv2mrW159DOTfJ7Rw2nBbfGWjGiMckTFAO9p9YVF3kDDHhiyirWEJPSESSSJeBB782qnwoXEDSAjgiiUYWSRuYIfxdibXUUZr3JPSmjaxvy+EVMjjWgouMrid51UQTW50wl3C0fX03/nak4P9+GWx14T1JGAb07fKQlgK/AwYtJ8esNyiV1j0Z2jgGM9OLpqgZ9gqjsA95htzdqy2DgC/U74qfhkUKISAXUWZdGS+rCEYBFaVzAj0aPKtXmRWTrC6OTDSTVLQCKZPfcHqnU652PUQZqqKCA==</property>
  </to>
</eventPublisher>

What am I doing wrong?

Community
  • 1
  • 1
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
  • Difficult to say, in general I'd say your config looks good. Are you sure the provided password is correct? Does your password contain special characters (some need to be encoded)? Have you checked the ActiveMQ logs? You should also see in there if it's something related to the password or get another hint. Maybe you can try to set the ActiveMQ password to "admin" and try it again. – Martin Hald Jun 07 '18 at 13:22

1 Answers1

0

I have separately installed ActiveMQ and started it in terminal console. Then started the wso2 IoT server. This solved my issue

Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62