The Home Assistant system I'm using has the problem that domain names can't be resolved sometimes. However, it works normally after a restart

System version:

  • Core2024.12.5
  • Supervisor2024.12.0
  • Operating System14.0
  • Frontend20241127.8

Log content:

  • net work error = HTTPSConnectionPool(host=‘apigw.tuyacn.com’, port=443): Max retries exceeded with url: /v1.0/m/token/b75af58aa06bd3b1aa67599fdf78601f (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fbcf1d59d10>: Failed to establish a new connection: [Errno 98] Address in use’))

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.13/site-packages/urllib3/connection.py”, line 174, in _new_conn
conn = connection.create_connection(
(self._dns_host, self.port), self.timeout, **extra_kw
)
File “/usr/local/lib/python3.13/site-packages/urllib3/util/connection.py”, line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/socket.py”, line 975, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 98] Address in use

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File “/usr/local/lib/python3.13/site-packages/aiohttp/resolver.py”, line 103, in resolve
resp = await self._resolver.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…<5 lines>…
)
^
aiodns.error.DNSError: (11, ‘Could not contact DNS servers’)

1 Like

Check your DNS settings in Settings → System → Network → Your Adaptor

The DNS settings are correct. This problem will occur with all Internet-based plug-ins. It will be normal after restarting. It will be abnormal after a few days.

That does not sound “correct” to me.

Hi yan,

My DNS Detector nose is smelling pihole or adware or another DNS blocker messing you up.

Is there any way to deal with it? Thank you so much

Do you have one running?

I have not installed and run the two plug-ins you mentioned.

Now there is a problem. When I ping the domain name on HA, I can no longer resolve the address.
After restarting the host, it will return to normal

I have the exact same issue and Ive gone as far as to do PCAPs from inside the HA docker container and at my router. I have Adguard running and it’s resolving all the domains HA throws at it perfectly fine. The only way ive been able to get anything to come back is to hard reboot HA. super annoying :frowning: