Erlang distribution and the box's epmd listen on every interface with the cookie this repo publishes (mcl_tube on 0.0.0.0, cookie mcl_tube) #1

Open
opened 2026-11-23 14:00:25 +00:00 by jupiter · 0 comments
Member

Purpose (defect): mcl-tube's Erlang distribution and the epmd it starts listen only on loopback, and no shipped file names a cookie, so neither a node started from this repo nor the box's shared epmd can be reached from the LAN with a published cookie.

What is wrong (measured 2026-11-23, read-only, while probing macula-services/mcl-mail#17)

  • Containerfile:67 bakes ENV MCL_COOKIE=mcl_tube, and deploy/docker-compose.yml:72 hard-codes MCL_COOKIE=mcl_tube. config/vm.args.src:3 reads -setcookie ${MCL_COOKIE}. Neither file has -kernel inet_dist_use_interface or ERL_EPMD_ADDRESS. Compose :27 uses network_mode: host.
  • On beam02.lab (mcl-tube 0.6.0, container mcl-tube), sudo ss -ltnp shows mcl_tube's beam.smp (-name mcl_tube@127.0.0.1) on 0.0.0.0:46253 (dist) and 0.0.0.0:8493.
  • The box's epmd is mcl-tube's. epmd -daemon (pid 1710, started 2026-11-08) is a child of mcl_tube's beam and sits in the mcl-tube container's cgroup. It listens on 0.0.0.0:4369 and [::]:4369. Every other host-networked BEAM service on the box (mcl-mail, mcl-chess) registers with it, so this epmd stays on every interface until mcl-tube sets ERL_EPMD_ADDRESS, whatever those services do.
  • Reachability, from macula-services/mcl-mail#17 comment 1681: beam02's 4369 answers from host00 and msi00 (LAN, v4 and v6). It times out from the internet: the router filters inbound, and the control showed the VPS side works.
  • Not measured: whether the running mcl-tube uses the published cookie or a fleet secret. I did not connect.

The fix exists in the class

mcl-chess (mcl-om#24) carries it, and macula-services/mcl-mail#17 ports it: ENV ERL_EPMD_ADDRESS=127.0.0.1 in the image, -kernel inet_dist_use_interface {127,0,0,1} in vm.args.src, no cookie in any shipped file, and a service test asserting the pins.

Done when

  • ss -ltn on a box running mcl-tube shows its dist port on 127.0.0.1, and the epmd it starts on 127.0.0.1 only.
  • No shipped file carries a cookie value.
  • A test asserts the pins.

Found by Jupiter during mcl-mail#17 step 1. Refs macula-services/mcl-mail#17.

Purpose (defect): mcl-tube's Erlang distribution and the epmd it starts listen only on loopback, and no shipped file names a cookie, so neither a node started from this repo nor the box's shared epmd can be reached from the LAN with a published cookie. ## What is wrong (measured 2026-11-23, read-only, while probing macula-services/mcl-mail#17) - `Containerfile:67` bakes `ENV MCL_COOKIE=mcl_tube`, and `deploy/docker-compose.yml:72` hard-codes `MCL_COOKIE=mcl_tube`. `config/vm.args.src:3` reads `-setcookie ${MCL_COOKIE}`. Neither file has `-kernel inet_dist_use_interface` or `ERL_EPMD_ADDRESS`. Compose `:27` uses `network_mode: host`. - On beam02.lab (mcl-tube 0.6.0, container mcl-tube), `sudo ss -ltnp` shows mcl_tube's beam.smp (`-name mcl_tube@127.0.0.1`) on `0.0.0.0:46253` (dist) and `0.0.0.0:8493`. - **The box's epmd is mcl-tube's.** `epmd -daemon` (pid 1710, started 2026-11-08) is a child of mcl_tube's beam and sits in the mcl-tube container's cgroup. It listens on `0.0.0.0:4369` and `[::]:4369`. Every other host-networked BEAM service on the box (mcl-mail, mcl-chess) registers with it, so this epmd stays on every interface until mcl-tube sets `ERL_EPMD_ADDRESS`, whatever those services do. - Reachability, from macula-services/mcl-mail#17 comment 1681: beam02's 4369 answers from host00 and msi00 (LAN, v4 and v6). It times out from the internet: the router filters inbound, and the control showed the VPS side works. - Not measured: whether the running mcl-tube uses the published cookie or a fleet secret. I did not connect. ## The fix exists in the class mcl-chess (mcl-om#24) carries it, and macula-services/mcl-mail#17 ports it: `ENV ERL_EPMD_ADDRESS=127.0.0.1` in the image, `-kernel inet_dist_use_interface {127,0,0,1}` in `vm.args.src`, no cookie in any shipped file, and a service test asserting the pins. ## Done when - `ss -ltn` on a box running mcl-tube shows its dist port on 127.0.0.1, and the epmd it starts on 127.0.0.1 only. - No shipped file carries a cookie value. - A test asserts the pins. Found by Jupiter during mcl-mail#17 step 1. Refs macula-services/mcl-mail#17.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
macula-services/mcl-tube#1
No description provided.