{"record":{"id":"3019a1020fe7cb06","repo":"nats-io/nats-server","slug":"connection-rejected-since-minimum-version-required","errorCode":null,"errorMessage":"connection rejected since minimum version required is","messagePattern":"connection rejected since minimum version required is","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/errors.go","lineNumber":223,"sourceCode":"\n\t// ErrSubscribePermissionViolation is returned when processing of a subscription fails due to permissions.\n\tErrSubscribePermissionViolation = errors.New(\"subscribe permission violation\")\n\n\t// ErrNoTransforms signals no subject transforms are available to map this subject.\n\tErrNoTransforms = errors.New(\"no matching transforms available\")\n\n\t// ErrCertNotPinned is returned when pinned certs are set and the certificate is not in it\n\tErrCertNotPinned = errors.New(\"certificate not pinned\")\n\n\t// ErrDuplicateServerName is returned when processing a server remote connection and\n\t// the server reports that this server name is already used in the cluster.\n\tErrDuplicateServerName = errors.New(\"duplicate server name\")\n\n\t// ErrMinimumVersionRequired is returned when a connection is not at the minimum version required.\n\tErrMinimumVersionRequired = errors.New(\"minimum version required\")\n\t// ErrLeafNodeMinVersionRejected is the leafnode protocol error prefix used\n\t// when rejecting a remote due to leafnodes.min_version.\n\tErrLeafNodeMinVersionRejected = errors.New(\"connection rejected since minimum version required is\")\n\n\t// ErrInvalidMappingDestination is used for all subject mapping destination errors\n\tErrInvalidMappingDestination = errors.New(\"invalid mapping destination\")\n\n\t// ErrInvalidMappingDestinationSubject is used to error on a bad transform destination mapping\n\tErrInvalidMappingDestinationSubject = fmt.Errorf(\"%w: invalid transform\", ErrInvalidMappingDestination)\n\n\t// ErrMappingDestinationNotUsingAllWildcards is used to error on a transform destination not using all of the token wildcards\n\tErrMappingDestinationNotUsingAllWildcards = fmt.Errorf(\"%w: not using all of the token wildcard(s)\", ErrInvalidMappingDestination)\n\n\t// ErrUnknownMappingDestinationFunction is returned when a subject mapping destination contains an unknown mustache-escaped mapping function.\n\tErrUnknownMappingDestinationFunction = fmt.Errorf(\"%w: unknown function\", ErrInvalidMappingDestination)\n\n\t// ErrMappingDestinationIndexOutOfRange is returned when the mapping destination function is passed an out of range wildcard index value for one of it's arguments\n\tErrMappingDestinationIndexOutOfRange = fmt.Errorf(\"%w: wildcard index out of range\", ErrInvalidMappingDestination)\n\n\t// ErrMappingDestinationNotEnoughArgs is returned when the mapping destination function is not passed enough arguments\n\tErrMappingDestinationNotEnoughArgs = fmt.Errorf(\"%w: not enough arguments passed to the function\", ErrInvalidMappingDestination)","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/errors.go#L205-L241","documentation":"ErrLeafNodeMinVersionRejected is the leafnode protocol error prefix used when rejecting a remote due to leafnodes.min_version. The server sends it as a protocol -ERR message ('connection rejected since minimum version required is \"x.y.z\"') before closing, and the soliciting leaf checks for this string (server/leafnode.go:3527) to apply the leafNodeMinVersionReconnectDelay instead of hammering the hub.","triggerScenarios":"Hub has leafnodes.min_version set and receives a CONNECT from a leaf below that version: it sends fmt.Sprintf(\"%s %q\", ErrLeafNodeMinVersionRejected, mv) via sendErrAndErr and closes with MinimumVersionRequired (server/leafnode.go:2273). The soliciting side detects the prefix in errStr during reconnect handling.","commonSituations":"Mixed-version leaf/hub deployments; a hub config adds min_version during an upgrade; a leaf that keeps reconnecting rapidly and gets delayed by leafNodeMinVersionReconnectDelay.","solutions":["Upgrade the leaf node binary to a version >= the hub's leafnodes.min_version.","Temporarily lower leafnodes.min_version on the hub until all leaves are upgraded.","If this appears in hub logs, treat it as informational: the remote leaf is too old and is being rejected by design."],"exampleFix":"// before: leaf 2.9.x reconnects to hub with min_version 2.10.0\n// after\n# on the leaf host\nnats-server --version   # confirm\n# upgrade leaf to >= 2.10.0 and restart","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func isMinVersionRejected(errStr string) bool {\n    return strings.Contains(errStr, server.ErrLeafNodeMinVersionRejected.Error())\n}","tryCatchPattern":"if isMinVersionRejected(errStr) {\n    // apply leafNodeMinVersionReconnectDelay instead of immediate retry\n    delayReconnect()\n}","preventionTips":["Match the reconnect delay when you see this prefix; do not tight-loop reconnects.","Track hub min_version in fleet inventory and alert on leaves below it.","Log leaf version at connect time for quick diagnosis."],"tags":["nats","leafnode","version","protocol-error"],"backgroundTag":"minimum-version-required","analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}