{"record":{"id":"b28abc2b744403a4","repo":"rqlite/rqlite","slug":"errnoavailablehost","errorCode":"ErrNoAvailableHost","errorMessage":"no host available to perform the request","messagePattern":"no host available to perform the request","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/rqlite/http/client.go","lineNumber":15,"sourceCode":"package http\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"maps\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"strings\"\n)\n\n// ErrNoAvailableHost indicates that the client could not find an available host to send the request to.\nvar ErrNoAvailableHost = fmt.Errorf(\"no host available to perform the request\")\n\n// ErrTooManyRedirects indicates that the client exceeded the maximum number of redirects\nvar ErrTooManyRedirects = fmt.Errorf(\"maximum leader redirect limit exceeded\")\n\n// HostChangedError indicates that the underlying request was executed on a different host\n// different from the caller anticipated\ntype HostChangedError struct {\n\tNewHost string\n}\n\nfunc (he *HostChangedError) Error() string {\n\treturn fmt.Sprintf(\"HostChangedErr: new host is '%s'\", he.NewHost)\n}\n\ntype ConfigFunc func(*Client)\n\n// Client is a wrapper around stock `http.Client` that adds \"retry on another host\" behaviour\n// based on the supplied configuration.","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/rqlite/rqlite/blob/7586a4d1bdbd9a5a80021664c5a863cd850adb60/cmd/rqlite/http/client.go#L1-L33","documentation":"Sentinel error ErrNoAvailableHost returned by the CLI HTTP client after it exhausted all candidate hosts (including retries and leader redirects) without getting a responsive one. Means every known node was unreachable or repeatedly failed at the point of the request.","triggerScenarios":"Thrown at cmd/rqlite/http/client.go:15 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the cluster nodes are running and the supplied host list/addresses are correct","Verify network connectivity and firewall rules to node HTTP ports","Inspect individual host errors in the client log to find the root failure"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7586a4d1bdbd9a5a80021664c5a863cd850adb60","analyzedAt":"2026-09-03T07:03:02.260Z","contentChangedAt":"2026-09-03T07:03:02.260Z","schemaVersion":2},"datasetVersion":"2026-09-10T12:17:11.382Z"}