mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3766] [TUI] strata launch reports "this profile already has a live managed runtime" when the real cause is a port already in use #1582
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1582
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Daniel971 on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3766
Area: [TUI] (the Terminal: strata launch)
Desktop app, Terminal or source? Terminal (the
stratacommand), installed withinstall.shWhat happened
Port 8080 on this PC is held by an unrelated application (a root-owned web app).
strata launchonport 8080 failed, and the message it printed named neither the port nor the real cause:
Two things are wrong with that message:
child server had already exited on the port error.
<profile>.server.log, not in the engine log. In the 64K reproduction below the engine log namedin the message does not exist at all.
The correct text already exists in
serve/server.py(listen_problem(), line 140) and is written tothe server log:
It never reaches the user.
Smallest steps to reproduce
Port 8080 must be taken by a program that is not Strata. On this PC:
First run prints:
The named engine log does not exist; the port error is in
~/.local/state/strata/runtime/launch-iq1_m-64k.server.logline 15.Second run, same command, prints the misleading message:
strata launch --statusreports nothing running, andpsshows the owner host still alive:Using
--port 8081instead works (the server is serving on 8081 now).Expected
The first run should say the port is taken and name the port, for example:
and the second run should give the same message rather than "a live managed runtime".
Actual
Three separate defects, in the order the user meets them:
1. The owner host outlives its dead child (
strata_control/runtime.py,Host.serve(), ~line 1242).The loop clears
self.runningonly on a signal or whendie_withdisappears. Nothing checks whetherself.childis still alive, so a host whose server exited on the port error keeps holding its lease.It did on this machine: the host was still running after the failure, and
strata launch --statusreported nothing running.
2. The zombie then poisons the next attempt (
strata_control/runtime.py:297)._recover_stale()cannot take the lease and raises:
That is the false message. The profile has no live runtime; it has a host whose child died.
3. The real reason is discarded on the way out.
_status()does collect the log tail(
strata_control/runtime.py:899):but
runner.start()never readslog_tail(strata_cli/launch/runner.py:1059-1060):So the user sees
server_exitedand a pointer to the engine log, and the port message stays in thedict.
_log_hint()(runner.py:1207) also always names the engine log, which is the wrong filefor a failure that happens before the engine is started.
Suggested fix
log_tailin the message inrunner.start()when it is present.reports the reason still gets answered. A host whose child died should not keep the lease.
serve/server.py:8088runs only afterthe engine has been fetched and the model loaded (~90 s here). A bind probe in
plan()and at thetop of
run()would turn that into a second, and would letstrata launch --planwarn about it(it currently says nothing about the port).
_log_hint()when the failure isserver_exitedrather than an enginecrash; the server log is where this class of error lands.
Environment
Strata version:
install.shstrata doctorreportsterminal_cli ok,monitor_tui 8.2.8 okGraphics card, memory and system:
Reproduction status
Reproduced locally, twice on the same PC, with the commands above. Both the first-run message
(
server_exitedplus a pointer to a non-existent engine log) and the second-run message(
this profile already has a live managed runtime) were observed as quoted. The line references comefrom commit
011c9e60(the 0.2.2 release commit).Logs
~/.local/state/strata/runtime/launch-iq1_m-64k.server.log(the reason, lines 1-15):No API keys are present in this log. The engine log named in the error message does not exist:
Related
port 8080 is already in usemessage itself (closed;listen_problem()came from it).This report is about that message not reaching the user, not about its wording.
lost, different code path (the updater's test start).
startup_wait_expiredon a test start. Different symptom, same area.@github-actions[bot] commented on GitHub (Oct 22, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@Niko1221 commented on GitHub (Oct 24, 2026):
This is fixed in Strata 0.2.3. Please update to the latest release (in the Terminal:
strata update; in the app: download the newest installer from the releases page). If it still happens on the latest version, reply here and we will reopen it. Thank you for the report.