我正在尝试将 MQTT 消息发布到 iot.eclipse.org:1883。我将加热器包安装到 Kura 3.0.0。在我的树莓派 B(使用 raspbian)中,将 MqttDataTransport 中的“broker-url”设置为 Eclipse 沙箱代理,并将“connect.auto-on-startup”设置为 true。
我看到我的状态在那之后没有改变。然后,我显示了 Kura.log,我意识到 DataPublisherService 没有连接。云服务断开连接
o.e.k.d.h.Heater - Getting CloudClient for heater...
2017-07-21 12:15:20,836 [Component Resolve Thread (Bundle 7)] INFO o.e.k.d.h.Heater - Activating Heater... Done.
2017-07-21 12:15:21,034 [Component Resolve Thread (Bundle 7)] INFO o.e.k.c.c.ConfigurationServiceImpl - Registering ConfigurableComponent - org.eclipse.kura.demo.heater.Heater....
2017-07-21 12:15:21,040 [Component Resolve Thread (Bundle 7)] INFO o.e.k.c.c.ConfigurationServiceImpl - Registering ConfigurableComponent - org.eclipse.kura.demo.heater.Heater....Done
2017-07-21 12:15:22,974 [] INFO o.e.k.d.h.Heater - Published to data message: org.eclipse.kura.message.KuraPayload@248966
2017-07-21 12:15:22,986 [DataServiceImpl:Submit] INFO o.e.k.c.d.DataServiceImpl - DataPublisherService not connected
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70)
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650)
... 1 more
MqttDataTransport - xxxxx Connect failed. Forcing disconnect. xxxxx {}
o.e.k.c.d.t.m.MqttDataTransport - Closing client...
o.e.k.c.d.t.m.MqttDataTransport - Closed
` 我必须做什么?提前致谢。