ERROR: wait_tcp_port: port 9999 did not respond within 10s #43
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc#43
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?
➜ hero_proc git:(development) ✗ make run
source /Users/casperstevens/hero_proc/scripts/build_lib.sh 2>/dev/null && cargo_env && cargo build --release --workspace --exclude hero_proc_integration_test --exclude hero_proc_integration_tests
Finished
releaseprofile [optimized] target(s) in 0.49sInstalled hero_proc -> /Users/casperstevens/hero/bin/hero_proc
Installed hero_proc_server -> /Users/casperstevens/hero/bin/hero_proc_server
Installed hero_proc_ui -> /Users/casperstevens/hero/bin/hero_proc_ui
No screen session found.
No screen session found.
✓ Services stopped
✓ Directories ready, stale state cleared
Starting hero_proc_server...
✓ Screen session 'hero_proc_server' started
Waiting for hero_proc_server health (max 60s)...
✓ Health check passed: /Users/casperstevens/hero_proc/target/release/hero_proc
Starting hero_proc_ui...
✓ Screen session 'hero_proc_ui' started
Waiting for hero_proc_ui socket (max 30s)...
✓ Unix socket ready: /Users/casperstevens/hero/var/sockets/hero_proc/ui.sock
No screen session found.
✓ Screen session 'hero_proc_ui_nc' started
✓ nc bridge started: TCP 127.0.0.1:9999 → /Users/casperstevens/hero/var/sockets/hero_proc/ui.sock (tool=ncat, session=hero_proc_ui_nc)
ERROR: wait_tcp_port: port 9999 did not respond within 10s
make: *** [run] Error 1
Root Cause
The
nc_detect()function inbuild_lib.shprefers ncat over socat. The ncat command used for the TCP→Unix socket bridge was:This is broken — ncat's
-Uflag means "use Unix domain socket mode", which overrides the TCP listen. So ncat either tries to listen on the Unix socket (ignoring TCP) or exits silently. Nothing ever listens on TCP port 9999, andwait_tcp_porttimes out.It worked on some machines because they only had socat installed (no ncat), so
nc_detect()fell through to socat, which handles TCP→Unix proxying natively.Fix (in development)
nc_detect()andnc_install()— socat natively supportsTCP-LISTEN:...,fork UNIX-CLIENT:...ncat -l 127.0.0.1 $port --keep-open -c 'ncat -U $sock'brew install socaton macOSWorkaround (immediate)
If you already have ncat installed, socat will now be preferred automatically once the fix lands.
Fix pushed in commit
069ffe9ondevelopment.Changes:
nc_detect()/nc_install()now prefer socat over ncatncat -l ... --keep-open -c 'ncat -U $sock'brew install socaton macOSPlease pull
developmentand re-runmake run. If you don't have socat yet:brew install socat