nats-io/nats-server · error
cluster name from remote server conflicts
Error message
cluster name from remote server conflicts
What it means
An incoming route connection advertised a cluster name different from this server's configured cluster name; the route is sent an error and closed with the ClusterNameConflict reason. The remote server's cluster name is the mismatched input.
Source
Thrown at server/errors.go:195
// ErrServerNameHasSpaces signals that the server name contains spaces, which is not allowed.
ErrServerNameHasSpaces = errors.New("server name cannot contain spaces")
// ErrBadMsgHeader signals the parser detected a bad message header
ErrBadMsgHeader = errors.New("bad message header detected")
// ErrMsgHeadersNotSupported signals the parser detected a message header
// but they are not supported on this server.
ErrMsgHeadersNotSupported = errors.New("message headers not supported")
// ErrNoRespondersRequiresHeaders signals that a client needs to have headers
// on if they want no responders behavior.
ErrNoRespondersRequiresHeaders = errors.New("no responders requires headers support")
// ErrClusterNameConfigConflict signals that the options for cluster name in cluster and gateway are in conflict.
ErrClusterNameConfigConflict = errors.New("cluster name conflicts between cluster and gateway definitions")
// ErrClusterNameRemoteConflict signals that a remote server has a different cluster name.
ErrClusterNameRemoteConflict = errors.New("cluster name from remote server conflicts")
// ErrClusterNameHasSpaces signals that the cluster name contains spaces, which is not allowed.
ErrClusterNameHasSpaces = errors.New("cluster name cannot contain spaces")
// ErrClusterNameReserved signals that the cluster name is reserved for internal protocol use.
ErrClusterNameReserved = errors.New("cluster name is reserved")
// ErrMalformedSubject is returned when a subscription is made with a subject that does not conform to subject rules.
ErrMalformedSubject = errors.New("malformed subject")
// ErrSubscribePermissionViolation is returned when processing of a subscription fails due to permissions.
ErrSubscribePermissionViolation = errors.New("subscribe permission violation")
// ErrNoTransforms signals no subject transforms are available to map this subject.
ErrNoTransforms = errors.New("no matching transforms available")
// ErrCertNotPinned is returned when pinned certs are set and the certificate is not in it
ErrCertNotPinned = errors.New("certificate not pinned")View on GitHub (pinned to 3a66a489d2)
Solutions
- Configure identical cluster names on all servers that should route together
- Point the route URL at a server in the intended cluster
- Remove cross-cluster route URLs between genuinely different clusters
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/errors.go:195 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02).
Data as JSON: /api/errors/bb1b5a32e19c2af2.
Report an issue: GitHub.