A host logs in to the new bus as node.<name>

The mesh names a machine's bus user node.<name>; 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.
This commit is contained in:
2026-09-28 01:13:52 +02:00
parent d82fc9a121
commit 14e64844df
+4 -1
View File
@@ -70,7 +70,10 @@ func dialNats(ctx context.Context, m Membership, timeout time.Duration) (Link, e
} }
opts := []nats.Option{ opts := []nats.Option{
nats.Secure(config), nats.Secure(config),
nats.UserInfo(m.Node, m.Password), // The mesh names a machine's bus user "node.<name>" (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.Name("mesh-host/" + m.Node),
nats.Timeout(timeout), nats.Timeout(timeout),
// A node that has silently lost its route notices, rather than holding a connection the // A node that has silently lost its route notices, rather than holding a connection the