tiredofit/docker-traefik-cloudflare-companion

Failed to establish a new connection

Opened this issue · 0 comments

I tried following Setup with some changes: https://mattdyson.org/blog/2024/02/using-traefik-with-cloudflare-tunnels/

First he couldn't connect to Traefik (with same error), that is fixed by requesting in the internal docker network. No he cant connect to Clouflare with following error:

2024-09-12T07:46:43.008334414Z Traceback (most recent call last):
2024-09-12T07:46:43.008390164Z   File "/usr/sbin/cloudflare-companion", line 551, in <module>
2024-09-12T07:46:43.008924409Z     sync_mappings(get_initial_mappings(traefik_included_hosts, traefik_excluded_hosts), doms)
2024-09-12T07:46:43.009117459Z   File "/usr/sbin/cloudflare-companion", line 405, in sync_mappings
2024-09-12T07:46:43.009759153Z     if point_domain(k, domain_infos):
2024-09-12T07:46:43.010074995Z        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T07:46:43.010104572Z   File "/usr/sbin/cloudflare-companion", line 177, in point_domain
2024-09-12T07:46:43.010507192Z     records = cf.zones.dns_records.get(domain_info['zone_id'], params={u'name': name})
2024-09-12T07:46:43.011216018Z               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T07:46:43.011271589Z   File "/usr/lib/python3.12/site-packages/CloudFlare/cloudflare.py", line 747, in get
2024-09-12T07:46:43.012259753Z     raise CloudFlareAPIError(e=e) from None
2024-09-12T07:46:43.012536635Z CloudFlare.exceptions.CloudFlareAPIError: network request connection error: HTTPSConnectionPool(host='api.cloudflare.com', port=443): Max retries exceeded with url: /client/v4/zones/**************/dns_records?name=traefik.***.*** (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f407ef85fa0>: Failed to establish a new connection: [Errno -3] Try again'))

My .env file:

ROOT_DOMAIN=***.***
HTTP_TIMEOUT=60
POLLING_INTERVAL=10
PROPAGATION_TIMEOUT=3600
TTL=300
LOG_LEVEL=DEBUG

Log and docker Compose file (as txt because github doesn't allow .yml files):
log.txt
docker-compose.txt