{"record":{"id":"d50a3ab7a56b367b","repo":"nats-io/nats-server","slug":"solicited-routes-require-cluster-capabilities-e-g","errorCode":null,"errorMessage":"solicited routes require cluster capabilities, e.g. --cluster","messagePattern":"solicited routes require cluster capabilities, e\\.g\\. --cluster","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/opts.go","lineNumber":6470,"sourceCode":"\t\t}\n\t})\n\tif flagErr != nil {\n\t\treturn nil, flagErr\n\t}\n\n\t// This will be true if some of the `-tls` params have been set and\n\t// `-tls=false` has not been set.\n\tif tlsOverride {\n\t\tif err := overrideTLS(opts); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// If we don't have cluster defined in the configuration\n\t// file and no cluster listen string override, but we do\n\t// have a routes override, we need to report misconfiguration.\n\tif opts.RoutesStr != _EMPTY_ && opts.Cluster.ListenStr == _EMPTY_ && opts.Cluster.Host == _EMPTY_ && opts.Cluster.Port == 0 {\n\t\treturn nil, errors.New(\"solicited routes require cluster capabilities, e.g. --cluster\")\n\t}\n\n\treturn opts, nil\n}\n\nfunc normalizeBasePath(p string) string {\n\tif len(p) == 0 {\n\t\treturn \"/\"\n\t}\n\t// add leading slash\n\tif p[0] != '/' {\n\t\tp = \"/\" + p\n\t}\n\treturn path.Clean(p)\n}\n\n// overrideTLS is called when at least \"-tls=true\" has been set.\nfunc overrideTLS(opts *Options) error {","sourceCodeStart":6452,"sourceCodeEnd":6488,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/opts.go#L6452-L6488","documentation":"Startup options processing: route URLs (routes / --routes) were configured but no cluster listener exists (empty cluster listen string, host, and port), so solicited routes have no cluster to join. The routes option without cluster capabilities is the misconfiguration.","triggerScenarios":"Thrown at server/opts.go:6470 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a cluster block, e.g. --cluster or cluster { listen: 0.0.0.0:6222 }","Remove the routes if clustering was not intended","Verify the cluster listen address/port are not being overridden to empty"],"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-08T10:18:20.063Z"}