dahlb / ha_hatch

Home Assistant Integration for Hatch Rest Mini
MIT License
77 stars 16 forks source link

Error connecting to cognito-identity.us-west-2.amazonaws.com #49

Closed efaden closed 1 year ago

efaden commented 1 year ago

I'm getting an error connecting to cognito-identity.us-west-2.amazonaws.com:443. Not sure why though? Any suggestions?

efaden commented 1 year ago
This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/ha_hatch/__init__.py:136
Integration: Hatch Rest Mini/Plus (documentation, issues)
First occurred: 8:10:01 PM (2 occurrences)
Last logged: 8:10:51 PM

Error setting up entry Katilyn.faden@gmail.com for ha_hatch
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, 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 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/ha_hatch/__init__.py", line 164, in async_setup_entry
    await setup_connection("initial setup")
  File "/config/custom_components/ha_hatch/__init__.py", line 136, in setup_connection
    _, mqtt_connection, rest_devices, expiration_time = await get_rest_devices(
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/util_bootstrap.py", line 38, in get_rest_devices
    aws_credentials = await aws_http.aws_credentials(
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/aws_http.py", line 42, in aws_credentials
    await self._post_request_with_logging_and_errors_raised(
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/util_http.py", line 22, in request_with_logging_wrapper
    response = await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/aws_http.py", line 27, in _post_request_with_logging_and_errors_raised
    return await self.api_session.post(url=url, json=json_body, headers=headers)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/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 cognito-identity.us-west-2.amazonaws.com:443 ssl:default [Try again]
dahlb commented 1 year ago

all I can think of is a transient issue or internet connectivity on your router, the node version of this project isn't reporting similar issues from any other users

efaden commented 1 year ago

Yep. Randomly started working.

On Thu, May 25, 2023, 21:01 Brendan Dahl @.***> wrote:

all I can think of is a transient issue or internet connectivity on your router, the node version of this project isn't reporting similar issues from any other users

— Reply to this email directly, view it on GitHub https://github.com/dahlb/ha_hatch/issues/49#issuecomment-1563679285, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAEABG3W677OZELOW4TKVTXH76GZANCNFSM6AAAAAAYOCN7VI . You are receiving this because you authored the thread.Message ID: @.***>