digitalocean / k8s-staticroute-operator

Create static routes for your k8s nodes using CRDs.
Apache License 2.0
55 stars 11 forks source link

Error: Cannot connect to host 10.245.0.1:443 #21

Open sgavrylenko opened 1 year ago

sgavrylenko commented 1 year ago

I have around 25 nodes in my cluster. And 7 instances of operator's pod have the error shown below


[2023-02-26 22:07:35,259] kopf._core.reactor.o [DEBUG   ] Request attempt #9/9: GET https://10.245.0.1:443/apis
[2023-02-26 22:07:35,260] kopf._core.reactor.o [DEBUG   ] Request attempt #9/9: GET https://10.245.0.1:443/api
[2023-02-26 22:07:35,260] kopf._core.reactor.o [ERROR   ] Request attempt #9/9 failed; escalating: GET https://10.245.0.1:443/apis -> ClientConnectorError(ConnectionKey(host='10.245.0.1', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=3436630113383686192), ConnectionRefusedError(111, "Connect call failed ('10.245.0.1', 443)"))
[2023-02-26 22:07:35,261] kopf._core.reactor.o [ERROR   ] Request attempt #9/9 failed; escalating: GET https://10.245.0.1:443/api -> ClientConnectorError(ConnectionKey(host='10.245.0.1', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=3436630113383686192), ConnectionRefusedError(111, "Connect call failed ('10.245.0.1', 443)"))
[2023-02-26 22:07:35,261] kopf._core.reactor.r [ERROR   ] Resource observer has failed: Cannot connect to host 10.245.0.1:443 ssl:default [Connect call failed ('10.245.0.1', 443)]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/scanning.py", line 68, in _read_new_apis
    rsp = await api.get('/apis', settings=settings, logger=logger)
  File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/api.py", line 111, in get
    response = await request(
  File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/auth.py", line 45, in wrapper
    return await fn(*args, **kwargs, context=context)
  File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/api.py", line 78, in request
    response = await context.session.request(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 10.245.0.1:443 ssl:default [Connect call failed ('10.245.0.1', 443)]```
sgavrylenko commented 1 year ago

found this issue https://github.com/digitalocean/k8s-staticroute-operator/issues/8