{"record":{"id":"fde747fa06aa3e22","repo":"micro/go-micro","slug":"none-available","errorCode":null,"errorMessage":"none available","messagePattern":"none available","errorType":"exception","errorClass":"ErrNoneAvailable","httpStatus":null,"severity":"error","filePath":"selector/selector.go","lineNumber":42,"sourceCode":"\t// Name of the selector\n\tString() string\n}\n\n// Next is a function that returns the next node\n// based on the selector's strategy.\ntype Next func() (*registry.Node, error)\n\n// Filter is used to filter a service during the selection process.\ntype Filter func([]*registry.Service) []*registry.Service\n\n// Strategy is a selection strategy e.g random, round robin.\ntype Strategy func([]*registry.Service) Next\n\nvar (\n\tDefaultSelector = NewSelector()\n\n\tErrNotFound      = errors.New(\"not found\")\n\tErrNoneAvailable = errors.New(\"none available\")\n)\n","sourceCodeStart":24,"sourceCodeEnd":44,"githubUrl":"https://github.com/micro/go-micro/blob/24529f140421a11a33b6999ab7944f2021cfd69c/selector/selector.go#L24-L44","documentation":"selector.ErrNoneAvailable is returned by Select() when services with the name exist in the registry but none of their nodes are currently considered available (all filtered out, or the default strategy finds zero usable nodes).","triggerScenarios":"Service nodes exist but all fail node filters/health criteria in the Select options; all registered nodes' addresses are unreachable/filtered; a custom Strategy returns an empty Next set; registry contains the service with an empty Nodes slice.","commonSituations":"All instances crashed or were deregistered mid-flight leaving stale metadata; network policy blocking all node endpoints; custom filter logic too strict; load-balancing pool drained during rolling deploys.","solutions":["Check that at least one healthy instance of the service is running and registered","Review selector options/filters for conditions that exclude all nodes","Implement retry/fallback in the client to handle transient unavailability","Inspect registry contents to confirm nodes have valid reachable addresses"],"exampleFix":"// before\nnext, err := selector.Select(\"greeter\")\nif err != nil { return err } // fails when zero nodes available\n// after\nnext, err := selector.Select(\"greeter\")\nif err == selector.ErrNoneAvailable {\n  return retryAfter(time.Second) // or fall back to another service\n}","handlingStrategy":"fallback","validationCode":"svcs, _ := reg.GetService(\"greeter\")\nalive := 0\nfor _, s := range svcs { alive += len(s.Nodes) }\nif alive == 0 { // none available; skip call or alert }\n;","typeGuard":"func isNoneAvailable(err error) bool {\n  return errors.Is(err, selector.ErrNoneAvailable)\n}","tryCatchPattern":"next, err := sel.Select(\"greeter\")\nif errors.Is(err, selector.ErrNoneAvailable) {\n  return fallbackCall() // alternate route or degrade gracefully\n}","preventionTips":["Keep at least one healthy replica during rolling deploys","Audit selector filters so they don't exclude all nodes","Alert when a service's available node count reaches zero"],"tags":["selector","load-balancing","none-available"],"backgroundTag":"no-instances-available","analyzedSha":"24529f140421a11a33b6999ab7944f2021cfd69c","analyzedAt":"2026-09-01T02:52:24.923Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}