You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm running the docker gateway on my Raspi running Librelec. It's perfect for not messing with LibreElec.
Sinon docker-compose is not available on LibreElec, I start the container with the --restart always option : docker run --restart always --network host -e MQTT_HOST=nas.pawelko.local -e BLE=true -e DISCOVERY=true -e SCANNING_MODE=active -e PUBLISH_ALL=false -e SCAN_TIME=1 -e TIME_BETWEEN=20 -v /var/run/dbus:/var/run/dbus --name TheengsGateway theengs/gateway
On reboot, the container is started, but get stucks because network is not ready :
INFO:BLEGateway:Starting BLE scan
ERROR:BLEGateway:Connection error
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/TheengsGateway/ble_gateway.py", line 193, in connect_mqtt
self.client.connect(
File "/opt/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1429, in connect
return self.reconnect()
^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1592, in reconnect
self._sock = self._create_socket()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 4598, in _create_socket
sock = self._create_socket_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 4623, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 827, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution
After a container restart, it works perfectly.
To Reproduce
Installer docker image
Run it with docker --restart always
Reboot
Check docker logs
Expected behavior
Should either completely fail or retry MQTT host name resolution until success.
Note
Since the failure is in name resolution, using the MQTT server IP address is a workaround.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm running the docker gateway on my Raspi running Librelec. It's perfect for not messing with LibreElec.
Sinon docker-compose is not available on LibreElec, I start the container with the --restart always option :
docker run --restart always --network host -e MQTT_HOST=nas.pawelko.local -e BLE=true -e DISCOVERY=true -e SCANNING_MODE=active -e PUBLISH_ALL=false -e SCAN_TIME=1 -e TIME_BETWEEN=20 -v /var/run/dbus:/var/run/dbus --name TheengsGateway theengs/gateway
On reboot, the container is started, but get stucks because network is not ready :
After a container restart, it works perfectly.
To Reproduce
Installer docker image
Run it with
docker --restart always
Reboot
Check docker logs
Expected behavior
Should either completely fail or retry MQTT host name resolution until success.
Note
Since the failure is in name resolution, using the MQTT server IP address is a workaround.
The text was updated successfully, but these errors were encountered: