nats-io/nats-server · error
config reload not supported for jetstream storage dir
Error message
config reload not supported for jetstream storage dir
What it means
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.
Source
Thrown at server/reload.go:1995
default:
// TODO(ik): Implement String() on those options to have a nice print.
// %v is difficult to figure what's what, %+v print private fields and
// would print passwords. Tried json.Marshal but it is too verbose for
// the URL array.
// Bail out if attempting to reload any unsupported options.
return nil, fmt.Errorf("config reload not supported for %s: old=%v, new=%v",
field.Name, oldValue, newValue)
}
}
// If not disabling JS but limits have changed then it is an error.
if !disableJS {
if jsMemLimitsChanged || jsFileLimitsChanged {
return nil, fmt.Errorf("config reload not supported for jetstream max memory and max store")
}
if jsStoreDirChanged {
return nil, fmt.Errorf("config reload not supported for jetstream storage dir")
}
}
return diffOpts, nil
}
func copyRemoteGWConfigsWithoutTLSConfig(current []*RemoteGatewayOpts) []*RemoteGatewayOpts {
l := len(current)
if l == 0 {
return nil
}
rgws := make([]*RemoteGatewayOpts, 0, l)
for _, rcfg := range current {
cp := *rcfg
cp.TLSConfig = nil
cp.tlsConfigOpts = nil
rgws = append(rgws, &cp)
}View on GitHub (pinned to 3a66a489d2)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/reload.go:1995 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/4849c61cf2c20c98.
Report an issue: GitHub.