[nomad-step-3] S3-fix-6 — woodpecker-agent can't reach server gRPC at localhost:9000 (port bound to LXC IP) #964
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#964
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?
Step 4 verification: woodpecker-agent crashes with
connection refused localhost:9000.Root cause
WP agent jobspec has
WOODPECKER_SERVER=localhost:9000. Agent runsnetwork_mode=host. But WP server's gRPC port 9000 is mapped via Docker port binding to the LXC's eth0 IP (10.10.10.x:9000), not127.0.0.1:9000.Nomad's Docker driver binds ports to the allocation's IP, not localhost, unless the jobspec explicitly requests
0.0.0.0.Fix
Two options:
A (preferred): In
nomad/jobs/woodpecker-agent.hcl, changeWOODPECKER_SERVERto use Nomad service discovery or the LXC hostname:Or hardcode the bridge/host IP that both containers share.
B: In
nomad/jobs/woodpecker-server.hcl, bind gRPC to0.0.0.0:9000by addingaddress_mode = "host"to the port stanza, which makes it listen on all interfaces including localhost.Acceptance criteria
connection refused.nomad alloc logs woodpecker-agentshows"Starting Woodpecker agent"without connection errors.Labels / meta
backlog+bug-report.