kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

kolibri status probes the address the server listens on

Open rtibblesbot opened this issue 1 week ago • 1 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

get_status() checks a running server by requesting /status/ on 127.0.0.1, so a server whose LISTEN_ADDRESS is one specific IP, such as 192.168.1.10, does not answer it and reports Not responding (5). Several commands use the same check to refuse to run against a live server, so they go ahead against that server. The probe should request an address the server is serving on.

Complexity: Low Target branch: develop

Context

  • get_status builds its URL from 127.0.0.1, with a TODO saying so, and calls requests.get, which honours HTTP_PROXY and NO_PROXY from the environment.
  • These refuse to run while get_status() finds a server, and run when it raises NotRunning:

The Change

  • The probe should request LISTEN_ADDRESS, or loopback when LISTEN_ADDRESS is a wildcard (0.0.0.0 or ::).
  • The probe should ignore proxy settings from the environment.

How to Get There

  1. Set KOLIBRI_LISTEN_ADDRESS to a non-loopback IP assigned to the machine, such as 192.168.1.10, and leave KOLIBRI_URL_PATH_PREFIX unset.
  2. Run kolibri start and check that Kolibri loads at that IP.
  3. Run kolibri status in a shell with the same configuration. It prints Not responding (5).

Acceptance Criteria

  • [ ] After steps 1–2, kolibri status prints OK, running (0) and the server's URL.
  • [ ] The same check succeeds with a failing HTTP_PROXY and NO_PROXY=localhost,127.0.0.1.
  • [ ] After steps 1–2, kolibri manage dbrestore --latest prints Cannot restore while Kolibri is running and restores nothing.
  • [ ] Tests cover LISTEN_ADDRESS set to 0.0.0.0, 127.0.0.1 and a non-loopback IP, and a proxy in the environment.

AI usage

Codex reproduced this with a simulated listener during #15794 review and drafted the report. I chose to probe the address the server serves on, and Claude Code rewrote it as a task.

rtibblesbot avatar Nov 22 '26 18:11 rtibblesbot

Rewritten as a task: get_status() probes the address the server listens on (LISTEN_ADDRESS, or loopback for a wildcard) instead of always 127.0.0.1, and ignores environment proxies. The CHERRYPY_START=False loopback criterion is dropped.

rtibbles avatar Nov 24 '26 21:11 rtibbles