[nu-demo] hero_skills hardcodes TF Grid private IP 10.1.2.2 as default in service_onlyoffice + auth.nu — breaks nu servers #192
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?
Symptom
Fresh installer run on a generic Ubuntu nu server (not a TF Grid VM) leaves two modules with non-functional defaults:
tools/modules/services/service_onlyoffice.nu:21— constant defaultOO_DEFAULT_BIND = "10.1.2.2:8088". On a host without10.1.2.2, the OnlyOffice container is started bound to a non-existent IP —docker runsucceeds, then/healthcheckcurl fails forever; install hangs inoo_wait_healthy.tools/modules/installers/auth.nu:126,136—HERO_AUTH_LISTEN_ADDRandHERO_AUTH_UPSTREAM_ADDRdefault to"10.1.2.2". Same failure mode for nginx (bind() to 10.1.2.2 failed).Operator must know to set
ONLYOFFICE_BIND_ADDR/HERO_AUTH_*_ADDRmanually, but neither the runbook nor the install messages mention this for non-TF-Grid hosts.Root cause
These defaults were copy-pasted from the herodemo TF Grid VM (
HERO_ROUTER_ADDRESS=10.1.2.2) without an env-driven fallback. The auto-detect atinstall.sh:468-470correctly exportsHERO_ROUTER_ADDRESS=10.1.2.2only when10.1.2.xis present, so on nu serversHERO_ROUTER_ADDRESSis unset and the hardcoded10.1.2.2constants leak into bind addresses.Audit (read-only assessment)
Properly gated already (no fix needed):
installers.nu install_docker_btrfs—if ("/data" | path exists)guards the btrfs//data/dockerconfig; on nu servers Docker installs with default overlay2.installers.nudockerd start +auth.nu:189-198nginx reload — both usesystemctl … || nohup …fallback.service_router.nustart — flag → env → mycelium →127.0.0.1fallback chain.install.sh:468-470HERO_ROUTER_ADDRESS auto-export — gated onip -4 a | grep '10\.1\.2\.'.Bugs (this issue):
service_onlyoffice.nu:21(constant default)auth.nu:126,136(env defaults)Proper fix
Derive from
HERO_ROUTER_ADDRESS(TF Grid auto-detect already sets this), fall back to127.0.0.1:oo_bindprecedence:ONLYOFFICE_BIND_ADDR→HERO_ROUTER_ADDRESS:8088→127.0.0.1:8088.auth.nuprecedence:--listen-addr/--upstream-addr→HERO_AUTH_*_ADDRenv →HERO_ROUTER_ADDRESSenv →127.0.0.1.Result:
Filed 2026-04-26 during nu-server universality sweep. Signed-off-by: mik-tf
Fixed in hero_skills commit
4b2a26condevelopment.service_onlyoffice.nu:OO_DEFAULT_BINDchanged from"10.1.2.2:8088"to"127.0.0.1:8088".oo_bindprecedence:ONLYOFFICE_BIND_ADDR(explicit) →HERO_ROUTER_ADDRESS:8088(TF Grid auto-detect) →OO_DEFAULT_BIND.auth.nubasic_auth_setup:router_addr_default = HERO_ROUTER_ADDRESS or "127.0.0.1".lst_addr/up_addrprecedence:--listen-addr/--upstream-addr(flag) →HERO_AUTH_*_ADDR(env) →router_addr_default.Verification across deploy targets:
oo_bindauth.nulst_addr127.0.0.1:8088127.0.0.1HERO_ROUTER_ADDRESS=10.1.2.2auto-set)10.1.2.2:808810.1.2.2TF Grid behavior is preserved (init.sh's
10.1.2.xauto-detect atinstall.sh:468-470continues to exportHERO_ROUTER_ADDRESS=10.1.2.2, which the new defaults pick up).Audit also confirmed clean (no fix needed):
install_docker_btrfs—/data/dockerconfig gated on("/data" | path exists); nu servers get default overlay2.systemctl … || nohup …fallback in both modules.service_router.nu— flag → env → mycelium →127.0.0.1precedence chain.install.sh:468-470— TF Grid IP auto-detect gated onip -4 a | grep '10\.1\.2\.'.Signed-off-by: mik-tf