question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to setup without Internet

See original GitHub issue

When my HA instance starts I often don’t have Internet as the router is in the process of loging in.

The BoM integration treats this as an error and doesn’t retry at after a suitable interval, so is never restored.

image

If I manually restart the component after the Internet is up everything is fine.

Would it be possible for this integration to retry connection and perhaps make this a warning rather than a hard error?

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/bureau_of_meteorology/PyBoM/collector.py:87
Integration: Bureau of Meteorology (documentation, issues)
First occurred: 8:49:43 AM (1 occurrences)
Last logged: 8:49:43 AM

Error setting up entry Noosa Heads for bureau_of_meteorology
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 880, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 856, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

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 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/bureau_of_meteorology/__init__.py", line 35, in async_setup_entry
    await collector.async_update()
  File "/config/custom_components/bureau_of_meteorology/PyBoM/collector.py", line 87, in async_update
    async with session.get(URL_BASE + self.geohash) as resp:
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.weather.bom.gov.au:443 ssl:default [Try again]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Makin-Thingscommented, May 17, 2022

@purcell-lab there is a 1.1.8b pre-release available now that should fix this problem. Are you able to test?

0reactions
purcell-labcommented, Jun 15, 2022

Thanks, this is resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Fixes for the "No Internet Secured" Error on Windows 10
Run the Network Troubleshooter in Windows 10; Restart your router. Take the time to read the steps carefully before attempting to fix the...
Read more >
No internet with Ethernet or wifi with new Windows 10 TP install
I have just installed Win10 TP on my desktop and CANNOT connect to the internet either with Ethernet cable or wifi, no matter...
Read more >
[Apple Watch] Unable to Check for Update - Apple Developer
I've been trying to update my series 3 Apple Watch and it keeps telling me that I am not connected to the internet....
Read more >
How to Fix "No Internet Access" Error in Windows 10
Learn how to fix no Internet access error in Windows 10 by configuring network settings, updating drivers and power cycling router.
Read more >
How to Fix No Internet After Updating Windows 10 - YouTube
In this video, you will know how to fix no internet issue after updating the windows 10. Several times users face limited internet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found