{"record":{"id":"206578eb3b4f5a08","repo":"netbirdio/netbird","slug":"no-relay-server-available","errorCode":null,"errorMessage":"no relay server available","messagePattern":"no relay server available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/relay/client/picker.go","lineNumber":116,"sourceCode":"\t\t\tif err := cr.RelayClient.Close(); err != nil {\n\t\t\t\tlog.Errorf(\"failed to close connection to %s: %v\", cr.Url, err)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\thasSuccess = true\n\t\tsuccessChan <- cr\n\t}\n\tif !hasSuccess {\n\t\terrChan <- pickErr(errs)\n\t}\n\tclose(successChan)\n}\n\n// pickErr combines per-server connection failures into a single error.\nfunc pickErr(errs []error) error {\n\tif len(errs) == 0 {\n\t\treturn errors.New(\"no relay server available\")\n\t}\n\treturn errors.Join(errs...)\n}\n","sourceCodeStart":98,"sourceCodeEnd":120,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/shared/relay/client/picker.go#L98-L120","documentation":"pickErr merges per-server connection failures and returns this error only when there are no failures to merge — the candidate relay URL list was empty, so no relay was ever tried. It is distinct from relays that were attempted and failed: here the picker had nothing to pick from.","triggerScenarios":"Management delivered no relay address in the network map, or the relay client was constructed with an empty list of relay URLs.","commonSituations":"Self-hosted management deployed without configuring a relay; relay URL misparsed from config; a management version that does not populate the relay field for this client.","solutions":["Configure a relay service URL in the management settings","Verify the network map actually delivers relay addresses to the agent","For self-hosted, deploy a relay and register it with management"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"relayURLs := networkMap.RelayURLs()\nif len(relayURLs) == 0 {\n\treturn fmt.Errorf(\"network map contains no relay address; check management relay configuration\")\n}","typeGuard":null,"tryCatchPattern":"conn, err := picker.Pick(ctx)\nif err != nil {\n\tif err.Error() == \"no relay server available\" {\n\t\t// nothing was configured: fall back to a default relay URL or degrade to direct connections\n\t}\n\treturn nil, err\n}","preventionTips":["Validate the relay configuration on management at deploy time","Distinguish empty-candidate from all-candidates-failed in logs","For self-hosted, health-check the relay registration after setup"],"tags":["relay","configuration","picker","network-map"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}