0

I'm trying to publish MQTT messages to the iot.eclipse.org:1883. I installed the heater bundle to Kura 3.0.0. in my raspberry pi B (with raspbian) and set the 'broker-url' in the MqttDataTransport to the Eclipse sandbox broker and the 'connect.auto-on-startup' to true.

I saw that my status did not change after that. Then, I displayed the Kura.log and I realized that DataPublisherService did not connect.CloudServices disconnected

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

` What must I do? Thanks in advance.

MVTN
  • 3
  • 2
  • It's better to copy and paste the actual log rather than an image which is really hard to read and can not be indexed by search engines. – hardillb Jul 21 '17 at 20:50
  • @hardillb Done. Thanks. :) – MVTN Jul 21 '17 at 22:13
  • A socket timeout exception means that the machine running this code could not find a route to the iot.eclipse.org machine. This either means iot.eclipse.org was down at the time or your pi is not properly connected to the internet – hardillb Jul 23 '17 at 10:33
  • @hardillb Thanks for the response. Actually, I am able to ping to iot.eclipse.org and to google.com. So, I guess I have internet access, however, the status in the Cloud Service of Kura is disconnected :(. When I try to connect I get some error: Error connecting org.eclipse.kura.web.shared.GwtKuraException .... – MVTN Jul 24 '17 at 10:11
  • Could you please provide the exact URL you are using in the Kura configuration? It must be in the form: mqtt://iot.eclipse.org:1883/ – David Woodard Jul 24 '17 at 22:41
  • @DavidWoodard I have tried the URL mqtt://iot.eclipse.org:1883/ and the mqtts://iot.eclipse.org:8883/ too. But the kura.log get the error as follows: org.eclipse.kura.KuraConnectException: "Connection failed. Cannot connect" at org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport.connect(MqttDataTransport.java:333) at org.eclipse.kura.core.data.DataServiceImpl$1.run(DataServiceImpl.java:501) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) .. – MVTN Jul 25 '17 at 09:47
  • It looks like this may be a network error: https://www.eclipse.org/forums/index.php/t/1087670/ . I will update this thread if a solution is found. – David Woodard Jul 27 '17 at 16:46

0 Answers0