{"record":{"id":"bdbedf96ebe09d71","repo":"istio/istio","slug":"failed-to-get-readiness-stats-v","errorCode":null,"errorMessage":"failed to get readiness stats: %v","messagePattern":"failed to get readiness stats: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pilot/cmd/pilot-agent/status/ready/probe.go","lineNumber":149,"sourceCode":"func StateString(state ServerInfoState) string {\n\tswitch state {\n\tcase Live:\n\t\treturn \"LIVE\"\n\tcase Draining:\n\t\treturn \"DRAINING\"\n\tcase PreInitializing:\n\t\treturn \"PRE_INITIALIZING\"\n\tcase Initializing:\n\t\treturn \"INITIALIZING\"\n\t}\n\treturn \"UNKNOWN\"\n}\n\n// checkEnvoyStats actually executes the Stats Query on Envoy admin endpoint.\nfunc checkEnvoyStats(host string, port uint16) error {\n\tstate, ws, err := util.GetReadinessStats(host, port)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get readiness stats: %v\", err)\n\t}\n\n\tif state != nil && ServerInfoState(*state) != Live {\n\t\treturn fmt.Errorf(\"server is not live, current state is: %v\", StateString(ServerInfoState(*state)))\n\t}\n\n\tif !ws {\n\t\treturn fmt.Errorf(\"workers have not yet started\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":131,"sourceCodeEnd":162,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/pilot/cmd/pilot-agent/status/ready/probe.go#L131-L162","documentation":"Error \"failed to get readiness stats: %v\" thrown in istio/istio.","triggerScenarios":"Thrown at pilot/cmd/pilot-agent/status/ready/probe.go:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8dc789c5cf17517c64e3c36cb3288230f149dfae","analyzedAt":"2026-08-15T15:16:55.434Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}