docs(installer): running-shard detection covers every launch shape (installer#47) #419

Merged
whitlocktech merged 1 commits from docs/installer-running-shard-detection into main 2026-11-27 02:04:58 -06:00
2 changed files with 12 additions and 3 deletions
Showing only changes of commit cdd5862621 - Show all commits

View File

@@ -630,7 +630,8 @@ release tarball is gone, and the report tells you to diff against them.
| Symptom | Cause and fix | | Symptom | Cause and fix |
|---|---| |---|---|
| **Windows asks for Administrator as soon as you launch it** | Expected, and it needs Administrator anyway. Windows applies *installer detection* to unsigned executables whose file name contains `install` and elevates them before the program starts. Run it from an already-elevated PowerShell and you will not see the prompt. | | **Windows asks for Administrator as soon as you launch it** | Expected, and it needs Administrator anyway. Windows applies *installer detection* to unsigned executables whose file name contains `install` and elevates them before the program starts. Run it from an already-elevated PowerShell and you will not see the prompt. |
| **"ServUO is running — stop it before installing"** | Correct, and not overridable. `ServUO.exe` locks `Scripts.dll` and rewrites `Saves/` on exit; deploying underneath it corrupts one or both. Stop the shard, install, start it again. | | **"ServUO is running — stop it before installing"** | Correct, and not overridable. `ServUO.exe` locks `Scripts.dll` and rewrites `Saves/` on exit; deploying underneath it corrupts one or both. Stop the shard, install, start it again. It is detected however it was started — `ServUO.exe` directly, `mono /path/ServUO.exe`, or `mono ServUO.exe` from inside the server directory (systemd, tmux, screen). |
| **"A ServUO process is running … its working directory cannot be read"** | The installer found a `ServUO.exe` launched with a relative path but, not running as root, cannot read where it was started from — so it cannot rule out that it is this shard, and refuses. Stop that process, or re-run the installer with `sudo` so it can check. Not overridable. |
| Shard boots clean but nothing reaches the site | The classic silent failure: ServUO ignores the script build's exit code and reloaded a **stale `Scripts.dll`**. Run `dotnet build Scripts/Scripts.csproj -c Release -p:Platform=x64` and read the errors it prints. | | Shard boots clean but nothing reaches the site | The classic silent failure: ServUO ignores the script build's exit code and reloaded a **stale `Scripts.dll`**. Run `dotnet build Scripts/Scripts.csproj -c Release -p:Platform=x64` and read the errors it prints. |
| `[bridge status` says `connected=False` | The sidecar is not listening on `127.0.0.1:7788`. Check the service is running, and that `[shard] bind` in `sidecar.toml` matches `Host`/`Port` in `Bridge.cfg`. | | `[bridge status` says `connected=False` | The sidecar is not listening on `127.0.0.1:7788`. Check the service is running, and that `[shard] bind` in `sidecar.toml` matches `Host`/`Port` in `Bridge.cfg`. |
| `[bridge` is not a command | The plugin did not compile, or `Bridge.cfg` has the bridge disabled. See the row above. | | `[bridge` is not a command | The plugin did not compile, or `Bridge.cfg` has the bridge disabled. See the row above. |

View File

@@ -554,9 +554,17 @@ not already settled above:
- **The shard-running check matches by path, not by process name.** `deploy.ps1` can look for a - **The shard-running check matches by path, not by process name.** `deploy.ps1` can look for a
process called `ServUO` because it only runs on Windows; on Linux the same shard is `mono` or process called `ServUO` because it only runs on Windows; on Linux the same shard is `mono` or
`dotnet` with `ServUO.exe` as an argument, and a name match would answer "not running" for a live `dotnet` with `ServUO.exe` as an argument, and a name match would answer "not running" for a live
shard — the one wrong answer that corrupts `Scripts.dll`. The installer requires a process whose shard — the one wrong answer that corrupts `Scripts.dll`. The installer requires a process that
executable or command line names *both* the tree being deployed into and `ServUO.exe`, so a second names `ServUO.exe` *and* whose assembly resolves into the tree being deployed into, so a second
shard elsewhere on the host does not block this deploy, and the installer never matches itself. shard elsewhere on the host does not block this deploy, and the installer never matches itself.
"Resolves into the tree" covers every launch shape (installer#47): `ServUO.exe` as the
executable (Windows) is decided by its path; `mono /abs/ServUO.exe` by the command line; and
`mono ServUO.exe` started from inside the root — systemd `WorkingDirectory=`, tmux — by resolving
the relative argument against the process's **working directory**, where the root is the only
place it appears. When that working directory cannot be read (another user's process, installer
not run as root) the check **fails closed**: install/update refuse, saying they could not check
and to stop the process or re-run with `sudo`; `doctor` counts only certain matches. Linux lists
each thread beside its process; threads are skipped so the refusal names the real pid.
- **ServUO's version is read from `Server/AssemblyInfo.cs`**, not from `ServUO.exe`'s PE metadata: - **ServUO's version is read from `Server/AssemblyInfo.cs`**, not from `ServUO.exe`'s PE metadata:
it is the same *source* tree the patch tier diffs against, needs no dependency, and works it is the same *source* tree the patch tier diffs against, needs no dependency, and works
identically on Linux. `57.4.0.0` and `57.4` are normalized to compare equal. An unreadable version identically on Linux. `57.4.0.0` and `57.4` are normalized to compare equal. An unreadable version