Closed RJGhugo closed 2 months ago
Don’t leave me hanging: What happens on k3s?
Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn 2024-04-18 05:56:54.009683 UTC: Starting FediFetcher 2024-04-18 05:56:59.032337 UTC: Error getting timeline toots: HTTPSConnectionPool(host='mastodon.xx.xx', port=443): Max retries exceeded with url: /api/v1/timelines/home (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7268d1af5150>: Failed to establish a new connection: [Errno 101] Network unreachable')) 2024-04-18 05:56:59.047916 UTC: Job failed after 0:00:05.038199. conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) OSError: [Errno 101] Network unreachable
OSError: [Errno 101] Network unreachable
This is gonna be your root cause: Your container can't reach your network.
spec:
hostNetwork: true
containers:
- name: fedifetcher
image: ghcr.io/nanos/fedifetcher:latest
I had to add hostNetwork: true. Else the CronJob has no access to the outer network...
Glad you got that sorted. I guess we should add that to the example file.
Are you able to provide a PR by any chance?
The problem was the lack of knowledge about network functionality in k3s.
A pod uses the internal DNS structure and cannot access resources in the LAN (e.g. proxy).
As I understood...
A PR doesn't seem appropriate here.
OK, great. Thanks for the feedback, and I'll close the issue again then.
I can run FediFetcher from bash without issue.
but not inside a k3s/k8s pod.