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

UPnP: continious errors in logs #73988

Closed
Gooman-rus opened this issue Jun 25, 2022 · 22 comments
Closed

UPnP: continious errors in logs #73988

Gooman-rus opened this issue Jun 25, 2022 · 22 comments

Comments

@Gooman-rus
Copy link

The problem

I have these errors every minute:

2022-06-25 19:59:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:01:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:03:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:05:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:07:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:09:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>
2022-06-25 20:11:04 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=16 read=polling write=<idle, bufsize=0>>

Internet connection is OK. UPnP itself seems to be working fine. So the issue is only in the logs?

What version of Home Assistant Core has the issue?

core-2022.6.7

What was the last working version of Home Assistant Core?

core-2022.5.5

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

UPnP

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

upnp documentation
upnp source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @StevenLooman, @ehendrix23, mind taking a look at this issue as it has been labeled with an integration (upnp) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@ThePatricide
Copy link

ThePatricide commented Jun 28, 2022

Same here, although only difference is fd=13 in the logs. It is exactly every 2 minutes that this error pops up. The first time in the logs it shows up there is additional info in the logs though:

2022-06-26 15:07:07 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=13 read=polling write=<idle, bufsize=0>>
2022-06-26 15:08:35 WARNING (MainThread) [zeroconf] Error with socket 12 (('fe80::3120:e3b2:4da6:aa34', 5353, 0, 3))): [Errno 101] Network unreachable
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 1053, in sendto
self._sock.sendto(data, addr)
OSError: [Errno 101] Network unreachable

So it seems for me it's IPv6 related. I think the issue started for me when I disabled IPv6 in the HASS configuration (System -> Network -> IPv6 to disabled). I've re-enabled DHCP (although I don't have IPv6 on my router enabled), I'll let you know what happens.

Edit: seems to have done the trick for me. This error should however not be there when IPv6 is disabled.

@probot-home-assistant
Copy link

ssdp documentation
ssdp source
(message by IssueLinks)

@probot-home-assistant
Copy link

network documentation
network source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (network) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@StevenLooman
Copy link
Contributor

StevenLooman commented Jul 1, 2022

I think when IPv6 is disabled, the adapter(s) found via the network integration shouldn't provide the IPv6 address(es). Not sure what is happening though, perhaps @bdraco has a clue?

@bdraco
Copy link
Member

bdraco commented Jul 1, 2022

I'm not sure if we actually know if ipv6 is disabled as ifaddr only tells us the addresses not if ipv6 is actually enabled which isn't something we can tell in a cross platform way AFAICT

@StevenLooman
Copy link
Contributor

StevenLooman commented Jul 2, 2022

There is also the question why it reports Network unreachable. Is there a firewall preventing any traffic, for example? Do you have any more information about your set up, @Gooman-rus ?

@balloob
Copy link
Member

balloob commented Jul 2, 2022

How are these supervised installations run; bare-metal Ubuntu? VM? k8s?

@ThePatricide
Copy link

ThePatricide commented Jul 2, 2022

For me it's bare metal, Intel NUC installation (don't havr an actual NUC though).

@Gooman-rus Gooman-rus reopened this Jul 3, 2022
@Gooman-rus
Copy link
Author

Gooman-rus commented Jul 3, 2022

I have Intel NUC with Supervised HA on Ubuntu 20.04. But now I don't have these errors anymore. Firewall is disabled. IPv6 is disabled.

@StevenLooman
Copy link
Contributor

I have Intel NUC with Supervised HA on Ubuntu 20.04. But now I don't have these errors anymore. Firewall is disabled. IPv6 is disabled.

Did you change anything, or just restart home assistant?

@Gooman-rus
Copy link
Author

I didn't change anything. I have tried to restart HA and host several times and the errors were still appearing. But after a night I realized that there are no errors anymore.

@mark-miller0
Copy link

mark-miller0 commented Jul 4, 2022

This issue is happening to me as well. I am running HA 2022.6.7 on macOS 12.4 and python 3.10.5. Previously this was working fine with python 3.8.x and HA 2021.12.x.

I have to restart HA every couple of days to get it working again.

@mark-miller0
Copy link

It appears that disabling ssdp is a non-ideal work-around for the issue.

@StevenLooman
Copy link
Contributor

StevenLooman commented Jul 5, 2022

It appears that disabling ssdp is a non-ideal work-around for the issue.

Yes, when you do this SSDP/UPnP devices will no longer be discovered and integrations relying on this will no longer properly work.

@StevenLooman
Copy link
Contributor

@mark-miller0 I'm uncertain if macOS is a supported platform, unless running in a container or VM. Still, I'd like to investigate this. Do you see any changes with regard to the addresses? Windows uses RFC3041 to randomly generate an address and use that, for privacy reasons. Perhaps macOS does this as well, but for link local addresses (i.e., it changes mac address or something)?

Can you see if your IPv6 addresses change between a restart of home assistant, and when the error starts occuring?

@mark-miller0
Copy link

mark-miller0 commented Jul 6, 2022

@StevenLooman HA has been supported on macOS in a python venv for several years. In my case it has been running fine for 5 years.

It wasn't until the move from python 3.8.9 to 3.10.5 and from HA 2021.12.7 to 2022.6.7 did this happen.

I can take a look at IPv6 this week. macOS is a fairly aggressive user of RFC3041.

@StevenLooman
Copy link
Contributor

@StevenLooman HA has been supported on macOS in a python venv for several years. In my case it has been running fine for 5 years.

You are right, must have read over the link to this page: https://www.home-assistant.io/installation/macos. Though it mentions apt-get, I doubt you'll have that on macOS. 😆 Not sure if macports is still being used, or what else is popular right now, but perhaps somebody with access to macOS could update those instructions.

I can take a look at IPv6 this week. macOS is a fairly aggressive user of RFC3041.

Great, hopefully we can get this fixed.

@mark-miller0
Copy link

Yikes! I have not read the current macOS installation instructions for HA in quite a while, but those are much different than what used to be there.

The installation instructions located here are what I have been using with great success:

https://siytek.com/install-home-assistant-on-mac/

Will get back to you soon with some more info on the IPv6 behavior.

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 6, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants