From 14e64844dff50b302c01c4622f3e90b66c8681a3 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 28 Sep 2026 01:13:52 +0200 Subject: [PATCH 1/2] A host logs in to the new bus as node. The mesh names a machine's bus user node.; the host dialled with the bare name and every machine was refused the first time it reached the server: "authentication error - User". Same string as the composed user list, or nothing connects. --- internal/link/hearing_nats.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/link/hearing_nats.go b/internal/link/hearing_nats.go index d3416be..804534d 100644 --- a/internal/link/hearing_nats.go +++ b/internal/link/hearing_nats.go @@ -70,7 +70,10 @@ func dialNats(ctx context.Context, m Membership, timeout time.Duration) (Link, e } opts := []nats.Option{ nats.Secure(config), - nats.UserInfo(m.Node, m.Password), + // The mesh names a machine's bus user "node." (the controller's principal scheme), and + // the server refused the bare name the first time a machine dialled it: "authentication + // error - User". The same string the mesh composed into the user list, or nothing connects. + nats.UserInfo("node."+m.Node, m.Password), nats.Name("mesh-host/" + m.Node), nats.Timeout(timeout), // A node that has silently lost its route notices, rather than holding a connection the From d749de989cae05036766785d153a8ba85a46c0c5 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 28 Sep 2026 01:16:23 +0200 Subject: [PATCH 2/2] A host hears the server's answers on its own inbox The mesh grants a machine exactly its own inbox prefix; the client used the default one and was refused a subscription to it. --- internal/link/hearing_nats.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/link/hearing_nats.go b/internal/link/hearing_nats.go index 804534d..0bad8e9 100644 --- a/internal/link/hearing_nats.go +++ b/internal/link/hearing_nats.go @@ -74,6 +74,9 @@ func dialNats(ctx context.Context, m Membership, timeout time.Duration) (Link, e // the server refused the bare name the first time a machine dialled it: "authentication // error - User". The same string the mesh composed into the user list, or nothing connects. nats.UserInfo("node."+m.Node, m.Password), + // Replies to what this client asks the server arrive on its inbox, and the mesh grants a + // machine exactly its own: the same prefix the user list was composed with. + nats.CustomInboxPrefix("_INBOX.node." + m.Node), nats.Name("mesh-host/" + m.Node), nats.Timeout(timeout), // A node that has silently lost its route notices, rather than holding a connection the