{"record":{"id":"4849c61cf2c20c98","repo":"nats-io/nats-server","slug":"config-reload-not-supported-for-jetstream-storage-4849c6","errorCode":null,"errorMessage":"config reload not supported for jetstream storage dir","messagePattern":"config reload not supported for jetstream storage dir","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/reload.go","lineNumber":1995,"sourceCode":"\t\tdefault:\n\t\t\t// TODO(ik): Implement String() on those options to have a nice print.\n\t\t\t// %v is difficult to figure what's what, %+v print private fields and\n\t\t\t// would print passwords. Tried json.Marshal but it is too verbose for\n\t\t\t// the URL array.\n\n\t\t\t// Bail out if attempting to reload any unsupported options.\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for %s: old=%v, new=%v\",\n\t\t\t\tfield.Name, oldValue, newValue)\n\t\t}\n\t}\n\n\t// If not disabling JS but limits have changed then it is an error.\n\tif !disableJS {\n\t\tif jsMemLimitsChanged || jsFileLimitsChanged {\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for jetstream max memory and max store\")\n\t\t}\n\t\tif jsStoreDirChanged {\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for jetstream storage dir\")\n\t\t}\n\t}\n\n\treturn diffOpts, nil\n}\n\nfunc copyRemoteGWConfigsWithoutTLSConfig(current []*RemoteGatewayOpts) []*RemoteGatewayOpts {\n\tl := len(current)\n\tif l == 0 {\n\t\treturn nil\n\t}\n\trgws := make([]*RemoteGatewayOpts, 0, l)\n\tfor _, rcfg := range current {\n\t\tcp := *rcfg\n\t\tcp.TLSConfig = nil\n\t\tcp.tlsConfigOpts = nil\n\t\trgws = append(rgws, &cp)\n\t}","sourceCodeStart":1977,"sourceCodeEnd":2013,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/reload.go#L1977-L2013","documentation":"Config reload rejects a change to the JetStream storage_dir because moving the storage location of a running server is unsupported; the reload differ's default branch catches the changed field and fails the reload with old vs new values. The server keeps running with the old storage directory; the new config is not applied.","triggerScenarios":"Thrown at server/reload.go:1995 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Undo the storage_dir change in the config and reload","Stop the server, migrate/point to the new storage directory, and start it fresh","Use a symlink at the filesystem level instead of changing the config path"],"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"}