Changing APACHE_TCP_ADDR breaks Maintenance -> Analyze configuration

CMK version: 2.5.0p21 Pro Edition (Container)

OS version: VyOS Stream 2026.03 (Linux vyos 6.6.128-vyos #1 SMP Mon Mar 16 10:04:04 UTC 2026 x86_64 GNU/Linux, Podman version 4.9.5)

Error message:

When visiting Setup → Maintenance → Analyze configuration the following tasks fails to execute (shown as “UNKN”):

  • Apache number of processes
  • Apache process usage

Entering the container and tailing the web.log like so:

tail -f /opt/omd/sites/LAB/var/log/web.log

Will show these errors when the Analyze configuration page is being loaded:

2026-11-29 08:29:33,381 [40] [cmk.web 2129] Error executing configuration test ACTestApacheNumberOfProcesses: Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 204, in _new_conn
    sock = connection.create_connection(
        (self._dns_host, self.port),
    ...<2 lines>...
        socket_options=self.socket_options,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
    ~~~~~~~~~~~~^^^^
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 331, in connect
    self.sock = self._new_conn()
                ~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 219, in _new_conn
    raise NewConnectionError(
        self, f"Failed to establish a new connection: {e}"
    ) from e
urllib3.exceptions.NewConnectionError: HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 842, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/retry.py", line 543, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3/cmk/gui/watolib/analyze_configuration.py", line 182, in run
    for result in self.execute(site_id, config):
                  ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 816, in execute
    process_limit = self._get_maximum_number_of_processes()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 770, in _get_maximum_number_of_processes
    apache_status = self._get_apache_status()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 783, in _get_apache_status
    response = requests.get(url, headers={"Accept": "text/plain"}, timeout=110)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 495, in instrumented_send
    raise exception.with_traceback(exception.__traceback__)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 422, in instrumented_send
    result = wrapped_send(
        self, request, **kwargs
    )  # *** PROCEED
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 729, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))
Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 204, in _new_conn
    sock = connection.create_connection(
        (self._dns_host, self.port),
    ...<2 lines>...
        socket_options=self.socket_options,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
    ~~~~~~~~~~~~^^^^
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 331, in connect
    self.sock = self._new_conn()
                ~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 219, in _new_conn
    raise NewConnectionError(
        self, f"Failed to establish a new connection: {e}"
    ) from e
urllib3.exceptions.NewConnectionError: HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 842, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/retry.py", line 543, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3/cmk/gui/watolib/analyze_configuration.py", line 182, in run
    for result in self.execute(site_id, config):
                  ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 816, in execute
    process_limit = self._get_maximum_number_of_processes()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 770, in _get_maximum_number_of_processes
    apache_status = self._get_apache_status()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 783, in _get_apache_status
    response = requests.get(url, headers={"Accept": "text/plain"}, timeout=110)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 495, in instrumented_send
    raise exception.with_traceback(exception.__traceback__)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 422, in instrumented_send
    result = wrapped_send(
        self, request, **kwargs
    )  # *** PROCEED
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 729, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))
2026-11-29 08:29:33,392 [40] [cmk.web 2129] Error executing configuration test ACTestApacheProcessUsage: Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 204, in _new_conn
    sock = connection.create_connection(
        (self._dns_host, self.port),
    ...<2 lines>...
        socket_options=self.socket_options,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
    ~~~~~~~~~~~~^^^^
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 331, in connect
    self.sock = self._new_conn()
                ~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 219, in _new_conn
    raise NewConnectionError(
        self, f"Failed to establish a new connection: {e}"
    ) from e
urllib3.exceptions.NewConnectionError: HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 842, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/retry.py", line 543, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3/cmk/gui/watolib/analyze_configuration.py", line 182, in run
    for result in self.execute(site_id, config):
                  ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 906, in execute
    total_slots = self._get_maximum_number_of_processes()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 770, in _get_maximum_number_of_processes
    apache_status = self._get_apache_status()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 783, in _get_apache_status
    response = requests.get(url, headers={"Accept": "text/plain"}, timeout=110)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 495, in instrumented_send
    raise exception.with_traceback(exception.__traceback__)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 422, in instrumented_send
    result = wrapped_send(
        self, request, **kwargs
    )  # *** PROCEED
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 729, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))
Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 204, in _new_conn
    sock = connection.create_connection(
        (self._dns_host, self.port),
    ...<2 lines>...
        socket_options=self.socket_options,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
    ~~~~~~~~~~~~^^^^
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/omd/sites/LAB/lib/python3.13/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 331, in connect
    self.sock = self._new_conn()
                ~~~~~~~~~~~~~~^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connection.py", line 219, in _new_conn
    raise NewConnectionError(
        self, f"Failed to establish a new connection: {e}"
    ) from e
urllib3.exceptions.NewConnectionError: HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/connectionpool.py", line 842, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/omd/sites/LAB/lib/python3.13/site-packages/urllib3/util/retry.py", line 543, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/LAB/lib/python3/cmk/gui/watolib/analyze_configuration.py", line 182, in run
    for result in self.execute(site_id, config):
                  ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 906, in execute
    total_slots = self._get_maximum_number_of_processes()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 770, in _get_maximum_number_of_processes
    apache_status = self._get_apache_status()
  File "/omd/sites/LAB/lib/python3/cmk/gui/wato/_ac_tests.py", line 783, in _get_apache_status
    response = requests.get(url, headers={"Accept": "text/plain"}, timeout=110)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 495, in instrumented_send
    raise exception.with_traceback(exception.__traceback__)
  File "/omd/sites/LAB/lib/python3.13/site-packages/opentelemetry/instrumentation/requests/__init__.py", line 422, in instrumented_send
    result = wrapped_send(
        self, request, **kwargs
    )  # *** PROCEED
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
  File "/omd/sites/LAB/lib/python3.13/site-packages/requests/adapters.py", line 729, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /server-status?auto (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=5000): Failed to establish a new connection: [Errno 111] Connection refused"))

After some troubleshooting I realized the error is because I in omd config LAB set APACHE_TCP_ADDR to the IP of the interface I want apache to listen at (instead of default 127.0.0.1).

It seems that you cannot put in multiple IP-addresses to listen at so only one of these are accepted:

  • 127.0.0.1 (default)
  • 0.0.0.0 (listen at ALL interfaces)
  • 192.0.2.1 (listen at a specific interface)

Since webgui needs to be accessed using the default of 127.0.0.1 is not an option.

Only workaround that seems to currently work is to set APACHE_TCP_ADDR to 0.0.0.0.

How do I set CheckMK to only listen at a single interface but at the same time dont break internal stuff that depends on that 127.0.0.1 is listening?

For security and compatability reasons it would be handy if perhaps 127.0.0.1 always worked and then what you put in APACHE_TCP_ADDR would be the additional IP-addresses (aka interfaces) you want to access the webgui at?

While at it what about listen at IPv6 addresses for the webgui?

The system should have a reverse proxy before the containers own Apache. In default installation outside of CMK docker containers this is also a second Apache instance. In your case you should provide the outside connection also with an external reverse proxy that then connects to the container Apache.

I fail to see why there would be needed to run apache ontop of apache?

To me using a reverse proxy should only be needed for broken applications or applications that doesnt have logging on their own and such.

You should have a reverse proxy for the CMK internal Apache as you can have many CMK instances on one host. My biggest system has 8 single instances on one physical host.
This should give enough reason to have a single point of entry for all these instances.

Sure but I run one per VM to have better isolation between them.

Where each VM have its own IP.

It should be doable for APACHE_TCP_ADDR to take multiple IP-addresses (both IPv4 and IPv6) to listen at:

Multiple Listen directives may be used to specify a number of addresses and ports to listen on. The server will respond to requests from any of the listed addresses and ports.

And you could make so “Listen 127.0.0.1:5000” is always present (well adjust for the port of course but still).

Something like:

Listen 127.0.0.1:%%APACHE_TCP_PORT%%
Listen %%APACHE_TCP_ADDR%%:%%APACHE_TCP_PORT%%

This way no matter what admin choose to set as APACHE_TCP_ADDR through omd config <site> it wont break internal access (since 127.0.0.1 will always be present which is needed for CheckMK to function properly).

But this is not the intended use case. The system was initially build to give the highest flexibility for deployment scenarios. One point is that every instance is his own small environment and presents only on localhost a connection to the outside world.

Your idea with the extra addresses you should write on the idea portal → https://ideas.checkmk.com/ and make some advertisement here that the devs see that you are not the only one that want’s such a config option.

Thanks, I have posted such now over at:

What do you mean by the “advertisement”, Im gussing this currently existing thread is enough to not spam the forum? :slight_smile:

Yes such a thread is ok. For some ideas it is good to describe what is the benefit or use case if you would say so.

I think it would be obvious:

  1. The Listen 127.0.0.1:%%APACHE_TCP_PORT%% would always exist.

  2. Support for both IPv4 and IPv6 listenaddress.

  3. Be able to limit which physical interfac(es) based on IPv4/IPv6-address(es) CheckMK will listen for incoming access to webgui.