{
  "id": "go/grpc-connection-refused",
  "signature": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 127.0.0.1:50051: connect: connection refused\"",
  "signature_zh": "rpc 错误：代码 = Unavailable 描述 = 连接错误：描述 = \"传输：拨号时出错：拨号 tcp 127.0.0.1:50051：连接被拒绝\"",
  "regex": "rpc\\ error:\\ code\\ =\\ Unavailable\\ desc\\ =\\ connection\\ error:\\ desc\\ =\\ \"transport:\\ Error\\ while\\ dialing:\\ dial\\ tcp\\ 127\\.0\\.0\\.1:50051:\\ connect:\\ connection\\ refused\"",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "Server is not running or the port is not open.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器未运行或端口未开放。",
  "versions": [
    {
      "version": "1.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The server is not listening on any port.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Firewall is not the issue if the server is not running.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "lis, _ := net.Listen(\"tcp\", \":50051\"); s := grpc.NewServer(); pb.RegisterGreeterServer(s, &server{}); s.Serve(lis)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Ensure client dials the correct address: grpc.Dial(\"localhost:50051\", grpc.WithInsecure())",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}