Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectivity issues #54

Open
JakobTewes opened this issue Sep 1, 2024 · 1 comment
Open

Connectivity issues #54

JakobTewes opened this issue Sep 1, 2024 · 1 comment

Comments

@JakobTewes
Copy link

Heyhey,

since a few, I´ve got problems with the containers MQTT connectivity although MQTT is running and reachable from the docker host. Seeing this error message:

Traceback (most recent call last):
File "//dht22mqtt.py", line 216, in <module>
client.connect(mqtt_brokeraddr, keepalive=dht22mqtt_refresh*60)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 914, in connect
return self.reconnect()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1044, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File "/usr/local/lib/python3.9/socket.py", line 843, in create_connection
raise err
File "/usr/local/lib/python3.9/socket.py", line 831, in create_connection
sock.connect(sa)
socket.timeout: timed out

Maybe someone can help?

Thanks and regards

Jakob

@hvalev
Copy link
Owner

hvalev commented Sep 3, 2024

Hey @JakobTewes, I haven't used this container myself in some time. I'll take a look soon, likely sometime next week. Meanwhile, can you try adding network_mode: "host" to the docker compose file and also check if your mqtt network is configured to accept new devices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants