kolibri-server leaves kolibri.service enabled and competing with nginx for its port
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
[!NOTE] On hold until #15992 shows whether kolibri-server's nginx stack stays; the fix depends on it. #15506 waits on this issue.
Target branch: develop
Observed behavior
kolibri-server's postinst stopskolibri.serviceand never disables it.kolibri's postinst enabled it. The README says it is disabled.- At boot
kolibri.servicerunskolibri start, which serves HTTP onHTTP_PORT. That is thekolibri-server/portthe postinst writes tooptions.iniand nginx listens on. - With
kolibri-server/port80,kolibri startcannot bind the port today, so nginx always gets it. #15506 launcheskolibri.servicewithCAP_NET_BIND_SERVICE, so on port 80 the service that starts first holds it, as already happens on 8080 and 8008. - With #15506, a fresh
apt install kolibri-serverthat configureskolibribeforenginx-fullsavesHTTP_PORT = 80and startskolibri.serviceon port 80 before nginx is configured.
Expected behavior
On a host with kolibri-server installed, only nginx listens on kolibri-server/port.
User-facing consequences
nginx cannot start while kolibri.service holds its port. kolibri-server.init stops Kolibri and starts nginx only if no nginx process exists when it runs.
Steps to reproduce
- On Ubuntu 24.04, run
apt install kolibri-serverand choose 80 forkolibri-server/port. - Run
systemctl is-enabled kolibri. It printsenabled. - Install the
kolibri.deb built from #15506's pull request, then reboot. - Run
ss -ltnp 'sport = :80'to see which process holds port 80.
Context
platforms/debian-serverat 886a0c9f24da6f6d5163d2879826170fcd2bbf00.kolibri.deb with #15506.
Acceptance Criteria
- [ ] After a reboot of a host with
kolibri-serverinstalled, nginx holdskolibri-server/portand no Kolibri process listens on it, for each choice: 8080, 8008 and 80. - [ ] A fresh
apt install kolibri-serverends with nginx listening onkolibri-server/port, whether apt configureskolibriornginx-fullfirst. - [ ] After
apt remove kolibri-server,kolibri.serviceserves HTTP again after a reboot. - [ ]
platforms/debian-server/README.rststates whetherkolibri.serviceis enabled on akolibri-serverhost, and matches what the postinst does.
AI usage
Drafted by Claude Code while working #15506, from reading the maintainer scripts of the kolibri and kolibri-server packages.
On hold until #15992 shows whether kolibri-server's nginx stack stays. How kolibri.service and kolibri-server share the port depends on that. #15506 waits for this, so port 80 doesn't ship before it's settled.
Marked on hold at the top of the body. Blocked-by #15992 and blocking #15506 relationships were already set.