eclipseazureiotkura

MQTT issue after connecting Eclipse Kura with Micorosoft Azure IoT Hub


I have created a connection to Microsoft Azure Cloud using Eclipse Kura: Following is the screen shot of Kura UI: Screen Shot of Kura

When I run Kura server, it is sending some messages(10-15 in one go) to the IOT Hub. Messages number gets increased every few seconds even when there is no package or bundle deployed on Kura.

There is also one EndOfFileException in the logger. Following is the log being generated in Kura:

2016 - 03 - 08 01: 28: 04, 292[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #------------------------------------------------------------
  2016 - 03 - 08 01: 28: 04, 299[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #Connection Properties
2016 - 03 - 08 01: 28: 04, 300[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #broker = ssl: //iothub00.azure-devices.net:8883
  2016 - 03 - 08 01: 28: 04, 300[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #clientId = myfirstdevice
2016 - 03 - 08 01: 28: 04, 300[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #username = iothub00.azure - devices.net / myfirstdevice
2016 - 03 - 08 01: 28: 04, 300[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #password = XXXXXXXXXXXXXX
2016 - 03 - 08 01: 28: 04, 300[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #keepAlive = 30
2016 - 03 - 08 01: 28: 04, 301[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #timeout = 20
2016 - 03 - 08 01: 28: 04, 301[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #cleanSession = true
2016 - 03 - 08 01: 28: 04, 301[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #MQTT version = 3.1.1
2016 - 03 - 08 01: 28: 04, 301[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #willDestination = $EDC / devices / myfirstdevice / messages / events //myfirstdevice/MQTT/LWT
2016 - 03 - 08 01: 28: 04, 302[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #willMessage =
  2016 - 03 - 08 01: 28: 04, 302[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #
  2016 - 03 - 08 01: 28: 04, 302[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #Connecting...
2016 - 03 - 08 01: 28: 04, 303[pool - 10 - thread - 1] INFO o.e.k.c.s.r.LogStatusRunnable - Notification LED fast blinking
2016 - 03 - 08 01: 28: 04, 315[MQTT Con: myfirstdevice] INFO o.e.k.c.s.SSLSocketFactoryWrapper - SSL Endpoint Identification enabled.
2016 - 03 - 08 01: 28: 05, 633[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #Connected!
  2016 - 03 - 08 01: 28: 05, 633[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - #------------------------------------------------------------
  2016 - 03 - 08 01: 28: 05, 634[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - Notified connected
2016 - 03 - 08 01: 28: 05, 634[pool - 10 - thread - 1] INFO o.e.k.c.s.r.LogStatusRunnable - Notification LED slow blinking
2016 - 03 - 08 01: 28: 05, 634[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - New session established.Unpublishing all in -flight messages.Disregarding the QoS level, this may cause duplicat$
2016 - 03 - 08 01: 28: 05, 635[pool - 10 - thread - 1] INFO o.e.k.c.s.r.LogStatusRunnable - Notification LED on
2016 - 03 - 08 01: 28: 05, 645[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - Storing message on topic: $EDC / #account - name / #client - id / MQTT / BIRTH, priority: 0
2016 - 03 - 08 01: 28: 05, 651[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - Stored message on topic: $EDC / #account - name / #client - id / MQTT / BIRTH, priority: 0
2016 - 03 - 08 01: 28: 05, 657[DataServiceImpl: Submit] INFO o.e.k.c.d.t.m.MqttDataTransport - Publishing message on topic: $EDC / devices / myfirstdevice / messages / events //myfirstdevice/MQTT/BIRTH with QoS: 0
2016 - 03 - 08 01: 28: 05, 667[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.t.m.MqttDataTransport - Subscribing to topic: $EDC / devices / myfirstdevice / messages / events //myfirstdevice/# with QoS: 1
2016 - 03 - 08 01: 28: 05, 778[DataServiceImpl: ReconnectTask] ERROR o.e.k.c.d.t.m.MqttDataTransport - Cannot subscribe to topic: $EDC / devices / myfirstdevice / messages / events //myfirstdevice/#
Connection lost(32109) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java: 154)
at java.lang.Thread.run(Thread.java: 745)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java: 267)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java: 89)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java: 112)
  ...1 more
2016 - 03 - 08 01: 28: 05, 786[DataServiceImpl: ReconnectTask] WARN o.e.k.c.c.CloudServiceImpl - Cannot setup cloud service connection
2016 - 03 - 08 01: 28: 05, 787[MQTT Rec: myfirstdevice] WARN o.e.k.c.d.t.m.MqttDataTransport - Connection Lost
Connection lost(32109) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java: 154)
at java.lang.Thread.run(Thread.java: 745)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java: 267)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java: 89)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java: 112)
  ...1 more
2016 - 03 - 08 01: 28: 05, 787[DataServiceImpl: ReconnectTask] INFO o.e.k.c.Cloudlet - Cloud Client Connection Restored
2016 - 03 - 08 01: 28: 05, 788[MQTT Rec: myfirstdevice] INFO o.e.k.c.d.DataServiceImpl - connectionLost
2016 - 03 - 08 01: 28: 05, 789[MQTT Rec: myfirstdevice] INFO o.e.k.c.d.DataServiceImpl - Reconnect task running.Stopping it
2016 - 03 - 08 01: 28: 05, 788[DataServiceImpl: ReconnectTask] INFO o.e.k.c.Cloudlet - Cloud Client Connection Restored
2016 - 03 - 08 01: 28: 05, 789[MQTT Rec: myfirstdevice] INFO o.e.k.c.d.DataServiceImpl - Starting reconnect task with initial delay 5
2016 - 03 - 08 01: 28: 05, 789[pool - 10 - thread - 1] INFO o.e.k.c.s.r.LogStatusRunnable - Notification LED slow blinking
2016 - 03 - 08 01: 28: 05, 789[DataServiceImpl: ReconnectTask] INFO o.e.k.c.Cloudlet - Cloud Client Connection Restored
2016 - 03 - 08 01: 28: 05, 790[DataServiceImpl: ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - Connected.Reconnect task will be terminated.

Any help is appreciated. Also, as I am new to Kura, it would be great if somebody could suggest me step-by-step tutorials on DataService.

Thanks


Solution

  • There is work in progress that we (the Azure IoT SDK team) have just initiated in collaboration with the Kura dev team to have an Eclipse Kura connector for Azure IoT Hub. You can see this work in progress here: https://github.com/andrew-buckley/kura/tree/AzureIntegration