kolibri status probes the address the server listens on
❌ 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_statusbuilds its URL from127.0.0.1, with a TODO saying so, and callsrequests.get, which honoursHTTP_PROXYandNO_PROXYfrom the environment.- These refuse to run while
get_status()finds a server, and run when it raisesNotRunning:- the upgrade migrations in
main.py dbrestore,dbbackup,deprovisionandcontent
- the upgrade migrations in
The Change
- The probe should request
LISTEN_ADDRESS, or loopback whenLISTEN_ADDRESSis a wildcard (0.0.0.0or::). - The probe should ignore proxy settings from the environment.
How to Get There
- Set
KOLIBRI_LISTEN_ADDRESSto a non-loopback IP assigned to the machine, such as192.168.1.10, and leaveKOLIBRI_URL_PATH_PREFIXunset. - Run
kolibri startand check that Kolibri loads at that IP. - Run
kolibri statusin a shell with the same configuration. It printsNot responding (5).
Acceptance Criteria
- [ ] After steps 1–2,
kolibri statusprintsOK, running (0)and the server's URL. - [ ] The same check succeeds with a failing
HTTP_PROXYandNO_PROXY=localhost,127.0.0.1. - [ ] After steps 1–2,
kolibri manage dbrestore --latestprintsCannot restore while Kolibri is runningand restores nothing. - [ ] Tests cover
LISTEN_ADDRESSset to0.0.0.0,127.0.0.1and 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.
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.