{"record":{"id":"b271641e9dfc920f","repo":"nats-io/nats-server","slug":"config-reload-not-supported-for-cluster-host-old","errorCode":null,"errorMessage":"config reload not supported for cluster host: old=%s, new=%s","messagePattern":"config reload not supported for cluster host: old=(.+?), new=(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/reload.go","lineNumber":2783,"sourceCode":"\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\t// Allow routes to be accepted now.\n\ts.routesReject = false\n\t// If there is a pool size change or added accounts, solicit routes now.\n\tif co.poolSizeChanged || len(co.accsAdded) > 0 {\n\t\ts.solicitRoutes(opts.Routes, co.accsAdded)\n\t}\n\ts.mu.Unlock()\n}\n\n// validateClusterOpts ensures the new ClusterOpts does not change some of the\n// fields that do not support reload.\nfunc validateClusterOpts(old, new ClusterOpts) error {\n\tif old.Host != new.Host {\n\t\treturn fmt.Errorf(\"config reload not supported for cluster host: old=%s, new=%s\",\n\t\t\told.Host, new.Host)\n\t}\n\tif old.Port != new.Port {\n\t\treturn fmt.Errorf(\"config reload not supported for cluster port: old=%d, new=%d\",\n\t\t\told.Port, new.Port)\n\t}\n\t// Validate Cluster.Advertise syntax\n\tif new.Advertise != \"\" {\n\t\tif _, _, err := parseHostPort(new.Advertise, 0); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Cluster.Advertise value of %s, err=%v\", new.Advertise, err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// diffRoutes diffs the old routes and the new routes and returns the ones that\n// should be added and removed from the server.\nfunc diffRoutes(old, new []*url.URL) (add, remove []*url.URL) {","sourceCodeStart":2765,"sourceCodeEnd":2801,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/reload.go#L2765-L2801","documentation":"validateClusterOpts blocks a config reload that changes cluster.host: the cluster listener's bind address cannot be changed without recreating the listener socket, so reload aborts with the old and new host values. The running server keeps its original cluster host; the new config is discarded.","triggerScenarios":"Thrown at server/reload.go:2783 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Revert cluster.host to the value the server is currently using and reload","Restart nats-server to bind the new cluster host"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}