{"record":{"id":"dde4cd00cfb200cf","repo":"nats-io/nats-server","slug":"config-reload-not-supported-for-s-v","errorCode":null,"errorMessage":"config reload not supported for %s: %v","messagePattern":"config reload not supported for (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/reload.go","lineNumber":1793,"sourceCode":"\t\t\t// would lose the real TLS configuration.\n\t\t\ttmpOld.Gateways = copyRemoteGWConfigsWithoutTLSConfig(tmpOld.Gateways)\n\t\t\ttmpNew.Gateways = copyRemoteGWConfigsWithoutTLSConfig(tmpNew.Gateways)\n\n\t\t\t// If there is really a change prevents reload.\n\t\t\tif !reflect.DeepEqual(tmpOld, tmpNew) {\n\t\t\t\t// See TODO(ik) note below about printing old/new values.\n\t\t\t\treturn nil, fmt.Errorf(\"config reload not supported for %s: old=%v, new=%v\",\n\t\t\t\t\tfield.Name, oldValue, newValue)\n\t\t\t}\n\t\tcase \"leafnode\":\n\t\t\ttmpOld := oldValue.(LeafNodeOpts)\n\t\t\ttmpNew := newValue.(LeafNodeOpts)\n\n\t\t\tlno, err := getLeafNodeOptionsChanges(s, &tmpOld, &tmpNew)\n\t\t\t// If there was an unsupported change, we will get an error with the name\n\t\t\t// of the (first) field and its old and new value.\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"config reload not supported for %s: %v\", field.Name, err)\n\t\t\t}\n\t\t\t// If there was an actual change...\n\t\t\tif lno != nil {\n\t\t\t\tdiffOpts = append(diffOpts, lno)\n\t\t\t}\n\t\tcase \"jetstream\":\n\t\t\tnew := newValue.(bool)\n\t\t\told := oldValue.(bool)\n\t\t\tif new != old {\n\t\t\t\tdiffOpts = append(diffOpts, &jetStreamOption{newValue: new})\n\t\t\t}\n\n\t\t\t// Mark whether JS will be disabled.\n\t\t\tdisableJS = !new\n\t\tcase \"storedir\":\n\t\t\tnew := newValue.(string)\n\t\t\told := oldValue.(string)\n\t\t\tmodified := new != old","sourceCodeStart":1775,"sourceCodeEnd":1811,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/reload.go#L1775-L1811","documentation":"The `leafnodes` block supports some runtime changes, but getLeafNodeOptionsChanges validates which leaf-node fields changed. If an unsupported field changed, it returns an error naming the field and its old/new values, and ProcessReload wraps it as \"config reload not supported for leafnode: <field> old=... new=...\". The reload is rejected.","triggerScenarios":"Signaling reload after changing a leaf-node option that is not in the reloadable allow-list — e.g. adding/removing `leafnodes.remotes`, changing a remote's `url`, `creds`, `credentials`, or `hub` settings.","commonSituations":"Adding a new leaf remote connection via config edit + SIGHUP; rotating leaf-node credentials other than supported fields; tools templating leafnodes blocks and producing diffs the reload checker rejects.","solutions":["Read the wrapped error to identify the exact leaf-node field that cannot change, then revert it or restart","Restart the server to apply leaf-node topology or remote changes","Keep leaf-node changes limited to reloadable fields (e.g. some TLS settings) if reload is required"],"exampleFix":"// before\nserver # kill -HUP <pid>  (after editing leafnodes.remotes url)\n// after\nserver # systemctl restart nats-server  (leaf remote changes require restart)","handlingStrategy":"validation","validationCode":"// Parse the wrapped error to find the offending leaf field:\nif err := s.Reload(); err != nil {\n\tvar unsupported = strings.HasPrefix(err.Error(), \"config reload not supported for leafnode:\")\n\tif unsupported { restartServer(err) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restart instead of reloading when changing leafnodes.remotes, remote urls, or credentials","Keep leaf-node block edits limited to reloadable fields","Stage config changes and run reload in a canary server before fleet rollout"],"tags":["nats-server","config-reload","leafnodes"],"backgroundTag":"unsupported-hot-reload","analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}