On startup, I get the following errors from system_sensors
Oct 06 15:22:48 augmntrpi python3[618]: Traceback (most recent call last):
Oct 06 15:22:48 augmntrpi python3[618]: File "/home/pi/system_sensors/src/system_sensors.py", line 436, in <module>
Oct 06 15:22:48 augmntrpi python3[618]: mqttClient.connect(settings["mqtt"]["hostname"], settings["mqtt"]["port"])
Oct 06 15:22:48 augmntrpi python3[618]: File "/home/pi/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 9
Oct 06 15:22:48 augmntrpi python3[618]: return self.reconnect()
Oct 06 15:22:48 augmntrpi python3[618]: File "/home/pi/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1
Oct 06 15:22:48 augmntrpi python3[618]: sock = self._create_socket_connection()
Oct 06 15:22:48 augmntrpi python3[618]: File "/home/pi/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 3
Oct 06 15:22:48 augmntrpi python3[618]: return socket.create_connection(addr, source_address=source, timeout=self._k
Oct 06 15:22:48 augmntrpi python3[618]: File "/usr/lib/python3.7/socket.py", line 707, in create_connection
Oct 06 15:22:48 augmntrpi python3[618]: for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Oct 06 15:22:48 augmntrpi python3[618]: File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
Oct 06 15:22:48 augmntrpi python3[618]: for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
Oct 06 15:22:48 augmntrpi python3[618]: socket.gaierror: [Errno -3] Temporary failure in name resolution
Oct 06 15:22:48 augmntrpi systemd[1]: system_sensors.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 15:22:48 augmntrpi systemd[1]: system_sensors.service: Failed with result 'exit-code'.
This is because the wifi hasn't fully connected or something similar.
To solve this, I added some auto-restart lines in the service definition. These may be useful for other users.
On startup, I get the following errors from system_sensors
This is because the wifi hasn't fully connected or something similar.
To solve this, I added some auto-restart lines in the service definition. These may be useful for other users.