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

SLZB-06x Error handling #131575

Open
wernerhp opened this issue Nov 25, 2024 · 3 comments
Open

SLZB-06x Error handling #131575

wernerhp opened this issue Nov 25, 2024 · 3 comments

Comments

@wernerhp
Copy link

The problem

aiodns.error.DNSError: (1, 'DNS server returned answer with no data')

What version of Home Assistant Core has the issue?

core-2024.11.3

What was the last working version of Home Assistant Core?

core-2024.10.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

smlight

Link to integration documentation on our website

https://www.home-assistant.io/integrations/smlight/

Diagnostics information

I just noticed these in my logs. I didn't do anything relating to this integration. It was running just fine. It looks like it had trouble looking up a DNS record and doesn't handle the error well.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:944
First occurred: 18:28:00 (1 occurrences)
Last logged: 18:28:00

Update for binary_sensor.slzb_06m_internet_2 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/resolver.py", line 105, in resolve
resp = await self._resolver.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiodns.error.DNSError: (1, 'DNS server returned answer with no data')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
hosts = await self._resolve_host(host, port, traces=traces)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 989, in _resolve_host
return await asyncio.shield(resolved_host_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1020, in _resolve_host_with_throttle
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/resolver.py", line 114, in resolve
raise OSError(None, msg) from exc
OSError: [Errno None] DNS server returned answer with no data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pysmlight/web.py", line 72, in get
async with self.session.get(
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1360, in aenter
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 538, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1050, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1341, in _create_direct_connection
raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host slzb-06m.local:80 ssl:default [DNS server returned answer with no data]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1302, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/smlight/binary_sensor.py", line 141, in async_update
await self.coordinator.client.get_param("inetState")
File "/usr/local/lib/python3.12/site-packages/pysmlight/web.py", line 227, in get_param
return await self.get(params)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pysmlight/web.py", line 88, in get
raise SmlightConnectionError("Connection failed") from err
pysmlight.exceptions.SmlightConnectionError: Connection failed




### Additional information

_No response_
@home-assistant
Copy link

Hey there @tl-sl, mind taking a look at this issue as it has been labeled with an integration (smlight) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of smlight can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign smlight Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


smlight documentation
smlight source
(message by IssueLinks)

@darkxst
Copy link
Contributor

darkxst commented Nov 26, 2024

Thanks for the report, I shall add this to exceptions for Connection Error.

What version of core firmware are you running?

@wernerhp
Copy link
Author

Latest v2.5.8

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

No branches or pull requests

2 participants