我使用Eclipse Kura创建了与Microsoft Azure Cloud的连接:以下是Kura UI的屏幕截图: Screen Shot of Kura
当我运行Kura服务器时,它会向IOT Hub发送一些消息(一次性10-15)。即使没有在Kura上部署包或捆绑包,消息号也会每隔几秒钟增加一次。
记录器中还有一个 EndOfFileException 。以下是在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.
感谢任何帮助。 另外,由于我是Kura的新手,如果有人可以建议我一步一步的DataService教程,那就太棒了。
由于
答案 0 :(得分:0)
我们(Azure IoT SDK团队)刚刚与Kura开发团队合作启动了一个正在进行的工作,以便为Azure IoT Hub提供Eclipse Kura连接器。您可以在此处查看此工作:https://github.com/andrew-buckley/kura/tree/AzureIntegration