{"record":{"id":"0b540fa9db72ba23","repo":"fatedier/frp","slug":"no-proxy-status-found","errorCode":null,"errorMessage":"no proxy status found","messagePattern":"no proxy status found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/sdk/client/client.go","lineNumber":55,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcontent, err := c.do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tallStatus := make(model.StatusResp)\n\tif err = json.Unmarshal([]byte(content), &allStatus); err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshal http response error: %s\", strings.TrimSpace(content))\n\t}\n\tfor _, pss := range allStatus {\n\t\tfor _, ps := range pss {\n\t\t\tif ps.Name == name {\n\t\t\t\treturn &ps, nil\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"no proxy status found\")\n}\n\nfunc (c *Client) GetAllProxyStatus(ctx context.Context) (model.StatusResp, error) {\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"http://\"+c.address+\"/api/status\", nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcontent, err := c.do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tallStatus := make(model.StatusResp)\n\tif err = json.Unmarshal([]byte(content), &allStatus); err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshal http response error: %s\", strings.TrimSpace(content))\n\t}\n\treturn allStatus, nil\n}\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/sdk/client/client.go#L37-L73","documentation":"Returned by Client.GetProxyStatus when /api/status parsed fine but no proxy with the requested name exists in any status group. It means the admin API is healthy but the named proxy is not registered (yet) — typically not yet started, already closed, or the name is wrong.","triggerScenarios":"Querying a proxy by name before frpc finished establishing it; after the proxy exited or failed to start; using a name that differs from the config (case, prefix, or renamed proxy).","commonSituations":"Polling loops racing against frpc startup; typos in the proxy name; querying after stop/reload removed the proxy; health checks referencing an old name after config refactor.","solutions":["List all statuses with GetAllProxyStatus and compare actual names with the requested one.","If polling at startup, retry with backoff until the proxy registers or a timeout expires.","Check the proxy exists in frpc.toml and that its name matches exactly (names are case-sensitive)."],"exampleFix":"// before\nstatus, err := client.GetProxyStatus(ctx, \"web\")\nif err != nil { return err } // fails during frpc startup\n\n// after\nvar status *model.ProxyStatusResp\nerr = retryWithBackoff(ctx, 5*time.Second, func() error {\n    var e error\n    status, e = client.GetProxyStatus(ctx, \"web\")\n    return e\n})","handlingStrategy":"retry","validationCode":"// confirm the proxy name exists before targeted queries\nall, err := client.GetAllProxyStatus(ctx)\nif err != nil { return err }\nfor _, group := range all {\n    for _, ps := range group {\n        if ps.Name == name { /* exists */ }\n    }\n}","typeGuard":null,"tryCatchPattern":"var st *model.ProxyStatusResp\nerr := backoff Retry(ctx, func() error {\n    var e error\n    st, e = client.GetProxyStatus(ctx, \"web\")\n    return e // retry while proxy not yet registered\n})","preventionTips":["Poll with backoff after frpc start instead of a single immediate query.","Derive the queried name from the same config source frpc loads to avoid drift."],"tags":["sdk","http","proxy-status","go"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}