Site Controller can't connect or is marked OFFLINE in the Control Panel
Problem
Walk through the suggested solution here if you face any of these problems.
- Your newly installed and configured Site Controller is not shown in Control Panel → My Organization → Locations
- Your Site Controller shows OFFLINE for the cloud_connected sensor
- You see errors in
log/cloudConnector.log
file.
No route to host
2016-02-22 13:11:57,365:2839:[cloudConnector.py:971]:DEBUG:Trying to connect to 192.168.0.53:1883 2016-02-22 13:12:00,358:2839:[cloudConnector.py:986]:ERROR:Exception while trying to connect to 192.168.0.53:1883: Traceback (most recent call last): File "/opt/azeti/SiteController/src/cloudConnector.py", line 973, in connect_to_broker mqttc.connect(host, port, 60) File "build/bdist.linux-armv7l/egg/paho/mqtt/client.py", line 612, in connect return self.reconnect() File "build/bdist.linux-armv7l/egg/paho/mqtt/client.py", line 734, in reconnect sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0)) File "/usr/lib/python2.7/socket.py", line 571, in create_connection raise err error: [Errno 113] No route to host
or
Connection refused
2016-02-22 13:25:15,236:3541:[cloudConnector.py:571]:WARNING:Could not publish to ExternalCloudBroker (azetibroker02.azeti.net)! ... 2016-02-22 13:24:41,982:3541:[cloudConnector.py:380]:DEBUG:ExternalCloudBroker: on_connect - rc: Connection Refused: not authorised. [5] flags: {'session present': 0} 2016-02-22 13:24:41,983:3541:[cloudConnector.py:414]:DEBUG:ExternalCloudBroker: Disconnected - rc: Connection Refused: not authorised. 2016-02-22 13:24:41,983:3541:[cloudConnector.py:425]:DEBUG:ExternalCloudBroker: is already marked as disconnected
Solution
- Make sure SIteController runs, check by running
SiteController/run_SiteController.py status
on your device. - Error message
on_connect - rc:
Connection Refused: not authorised.
implies incorrect MQTT credentials. Verify the configureduser
andpass
inconfig/SiteController.cfg
- Error message
error: [Errno 111] Connection refused
implies that Site Controller can't establish an outgoing MQTT TCP connection. Check your firewall settings and test for a successful outgoing connection with telnet (see below). - Error message
no route to host
implies that the broker host cannot be reached, either because the host is offline or you have no network connection to the host. Test if you can reach the MQTT broker as configured inconfig/SiteController.cfg
,
telnet> open azetibroker02.azeti.net 1883 Trying 54.93.215.194... Connected to azetibroker02.azeti.net. Escape character is '^]'.
Related articles