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

After upgrade to 7.1 Nabu Cloud, OpenWeather, Xbox, and Plex failing to start #52846

Closed
ericullmann opened this issue Jul 10, 2021 · 17 comments
Closed
Labels

Comments

@ericullmann
Copy link

The problem

Everything was working fine prior to the upgrade but after the upgrade NABU Cloud, Openweather, Xbox, and Plex will not load. I have attached the logs.
home-assistant.log

What is version of Home Assistant Core has the issue?

core-2021.7.1

What was the last working version of Home Assistant Core?

core-2021.6.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Plex,Nabu Casa, Openweather,Xbox

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@ericullmann
Copy link
Author

When I roll back everything works as expected so this has to be an issue in the latest version. I have attached the logs so we can determine what is going on.

@frenck
Copy link
Member

frenck commented Jul 12, 2021

Looking at your logs, it seems like your system has problems resolving hosts, which is the reason for all the socket.gaierror's in the logs.

@ericullmann
Copy link
Author

ericullmann commented Jul 12, 2021 via email

@asucrews
Copy link

Hello, I having a similar issue, and i was thinking it was DNS issue. but i have added domains allowed list and i am getting the below errors.

Logger: homeassistant.config_entries
Source: components/xbox/api.py:31
First occurred: 12:04:50 PM (2 occurrences)
Last logged: 12:07:13 PM

Error setting up entry Home Assistant Cloud for xbox
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport
await waiter
ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/xbox/init.py", line 88, in async_setup_entry
consoles: SmartglassConsoleList = await client.smartglass.get_console_list()
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 54, in get_console_list
resp = await self._fetch_list("devices", params, **kwargs)
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 359, in _fetch_list
resp = await self.client.session.get(
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/client.py", line 86, in get
return await self.request(hdrs.METH_GET, url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/client.py", line 60, in request
await self._auth_mgr.refresh_tokens()
File "/usr/src/homeassistant/homeassistant/components/xbox/api.py", line 31, in refresh_tokens
await super().refresh_tokens()
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/authentication/manager.py", line 73, in refresh_tokens
self.user_token = await self.request_user_token()
File "/usr/local/lib/python3.9/site-packages/xbox/webapi/authentication/manager.py", line 138, in request_user_token
resp = await self.session.post(url, json=data, headers=headers)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host user.auth.xboxlive.com:443 ssl:default [None]

Logger: aiohttp.server
Source: data_entry_flow.py:303
First occurred: 12:07:13 PM (1 occurrences)
Last logged: 12:07:13 PM

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 77, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 146, in get
return await super().get(request, flow_id)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 95, in get
result = await self._flow_mgr.async_configure(flow_id)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 202, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 303, in _async_handle_step
self._progress.pop(flow.flow_id)
KeyError:

@ericullmann
Copy link
Author

This continues to be an issue and now it seems like more people are having an issue. Is the team looking into this?

@wsw70
Copy link

wsw70 commented Jul 14, 2021

This is related to upstream problems

If "upstream problems" mean "problems with the latest Alpine image", would it be a problem to downgrade the base Alpine image to the last working one for 2021.7 ?

@frenck
Copy link
Member

frenck commented Jul 14, 2021

This is not an Alpine Linux problem either as it seems.
We are aware of the issues, but they are fairly limited; At this point, I can recommend downgrading if it causes issues for you.
Meanwhile, we are monitoring the issues on several upstream projects.

@wsw70
Copy link

wsw70 commented Jul 14, 2021

@frenck

This is not an Alpine Linux problem either as it seems

It seems that alpine really does have DNS issues. I ran a fresh alpine image on my server (srv) and tried to resolve both local and remote addresses

root@srv:~# docker run --rm -it alpine:3.13
/ # ping google.com
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=116 time=2.993 ms
64 bytes from 216.58.198.206: seq=1 ttl=116 time=2.323 ms
^C

/ # ping mqtt.my.actual.local.domain
ping: bad address 'mqtt.my.actual.local.domain'

/ # nslookup mqtt.my.actual.local.domain
Server:         192.168.10.1
Address:        192.168.10.1:53

Name:   mqtt.my.actual.local.domain
Address: 192.168.10.2

** server can't find mqtt.swtk.info: NXDOMAIN

The same tests done on alpine:3.10 (EDIT: up to 3.12) are all fine.

Same test on an ubuntu image:

root@srv:~# docker run --rm -it ubuntu
root@18f0f41c6592:/# ping mqtt.my.actual.local.domain
PING mqtt.my.actual.local.domain (192.168.10.2) 56(84) bytes of data.
64 bytes from srv.my.actual.local.domain (192.168.10.2): icmp_seq=1 ttl=64 time=0.067 ms
^C

I can recommend downgrading if it causes issues for you

Yes, thanks, this is what I did (#52667).

@frenck
Copy link
Member

frenck commented Jul 14, 2021

It seems that alpine really does have DNS issues

Those tests do not conclude that. At this point, it seems to be incorrect handling by the platform you are running your Docker on. VirtualBox is now known for having an issue but also rootless Docker setups on Ubuntu have problems.

@wsw70
Copy link

wsw70 commented Jul 14, 2021

Those tests do not conclude that

I just updated my previous comment with the fact that all tests run fine on e.g. alpine 3.10 (EDIT: up to 3.12). How would the issue be related to the host then? (which in my case is ubuntu 18.04)

@frenck
Copy link
Member

frenck commented Jul 14, 2021

Please read in the above issues, as it is explained on several places. Alpine did change handling, however, it seems to be according to specifications, which seems to have revealed bugs on some specific platforms people are running Docker on. If that is true, it's not an Alpine bug.

@wsw70
Copy link

wsw70 commented Jul 14, 2021

Please read in the above issues, as it is explained on several places. Alpine did change handling, however, it seems to be according to specifications, which seems to have revealed bugs on some specific platforms people are running Docker on. If that is true, it's not an Alpine bug.

Yes, I read the issues but what happens is not that clear. To me, it looks like the resolution prioritizes IPv6 and fails if it is not present (as in my case, where IPv6 is explicitly disabled). I do not know ip-utils enough to state whether this is ultimately expected but if it is, it is seriously breaking the current status (for people on an IPv4 stack only).

Anyway, if there is no plan to release 2021.7 on a pre-13 alpine, I will be closely monitoring the future releases to get back on track (=automated updates) when this is fixed.

Thanks a lot for the follow-up!

@ericullmann
Copy link
Author

Are we expecting any changes in the future to address this as I have seen quite of few people having the issue?

@github-actions
Copy link

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 29, 2021
@ericullmann
Copy link
Author

ericullmann commented Oct 29, 2021 via email

@github-actions github-actions bot removed the stale label Oct 29, 2021
@github-actions
Copy link

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 Jan 27, 2022
@balloob balloob closed this as completed Jan 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants