Unexpected Exception occurred: Could not fetch notices - Name or service not known

Hi all,

I’ve got this message from our indico server.

2024-02-15 03:30:00,030 0000000000000000 - indico.notices - ERROR notices.py:115 -- Could not fetch notices

Traceback (most recent call last):
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/data/indico/.pyenv/versions/3.9.12/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1b359b2820>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/indico/.venv/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/data/indico/.venv/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='getindico.io', port=443): Max retries exceeded with url: /notices.yml (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b359b2820>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/indico/.venv/lib/python3.9/site-packages/indico/modules/admin/notices.py", line 112, in load_notices
resp = requests.get(config.SYSTEM_NOTICES_URL)
File "/data/indico/.venv/lib/python3.9/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/data/indico/.venv/lib/python3.9/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/data/indico/.venv/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/data/indico/.venv/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/data/indico/.venv/lib/python3.9/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='getindico.io', port=443): Max retries exceeded with url: /notices.yml (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b359b2820>: Failed to establish a new connection: [Errno -2] Name or service not known'))

Would I do something for fix it or ignore this message?

Thank you for any comments.

It’s kind of safe to ignore but it means that outgoing network connections are not working properly. Besides not being able to load system notices, this also means that e.g. refreshing people’s Gravatars won’t work.

Do you need to use a proxy for outgoing internet connections? If yes, make sure to set the necessary environment variables (such as HTTPS_PROXY) in the indico-celery.service systemd unit.

Also see this thread and the requests docs on the env vars you can use.

1 Like