Here is my Rhasspy external MQTT setting.
And each time I get the below socket error in Rhasspy log after 10 tries to connect and then final message of “Failed to connect MQTT broker”.
socket.gaierror: [Errno -2] Name or service not known
[DEBUG:2021-06-12 23:41:53,306] rhasspyserver_hermes: Connecting to http://“HA ip address”:1883 (retries: 2/10)
[ERROR:2021-06-12 23:41:52,303] rhasspyserver_hermes: mqtt connect
Traceback (most recent call last):
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 289, in start
self.client.connect(self.host, self.port)
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
[DEBUG:2021-06-12 23:41:52,301] rhasspyserver_hermes: Connecting to http://“HA ip address”:1883 (retries: 1/10)
[ERROR:2021-06-12 23:41:51,298] rhasspyserver_hermes: mqtt connect
Traceback (most recent call last):
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 289, in start
self.client.connect(self.host, self.port)
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
[DEBUG:2021-06-12 23:41:51,295] rhasspyserver_hermes: Connecting to http://“HA ip address”:1883 (retries: 0/10)
[DEBUG:2021-06-12 23:41:51,295] rhasspyserver_hermes: Starting core