{
  "id": "kafka/network-exception-read-returned-negative",
  "signature": "java.io.IOException: Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.common.errors.TimeoutException)",
  "signature_zh": "java.io.IOException: 无法连接到节点 -1 (localhost/127.0.0.1:9092)。代理可能不可用。",
  "regex": "java\\.io\\.IOException.*Connection to node -1.*could not be established",
  "domain": "kafka",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The Kafka client cannot establish a TCP connection to the broker, often due to network misconfiguration or broker downtime.",
  "root_cause_type": "generic",
  "root_cause_zh": "Kafka 客户端无法与代理建立 TCP 连接，通常是由于网络配置错误或代理宕机。",
  "versions": [
    {
      "version": "Kafka 2.8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restarting the Kafka client without checking broker health",
      "why_fails": "The underlying broker issue (e.g., crash, network partition) remains unresolved, so the error recurs.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increasing `request.timeout.ms` to a very high value",
      "why_fails": "A timeout extension does not fix the connection failure; it only delays the error message.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify broker availability by running `telnet localhost 9092` or `nc -zv localhost 9092` to ensure the port is open. Then check broker logs for errors.",
      "success_rate": 0.85,
      "how": "Verify broker availability by running `telnet localhost 9092` or `nc -zv localhost 9092` to ensure the port is open. Then check broker logs for errors.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Update `bootstrap.servers` in the producer/consumer configuration to point to a correct, reachable broker list (e.g., `bootstrap.servers=broker1:9092,broker2:9092`).",
      "success_rate": 0.9,
      "how": "Update `bootstrap.servers` in the producer/consumer configuration to point to a correct, reachable broker list (e.g., `bootstrap.servers=broker1:9092,broker2:9092`).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify broker availability by running `telnet localhost 9092` or `nc -zv localhost 9092` to ensure the port is open. Then check broker logs for errors.",
    "Update `bootstrap.servers` in the producer/consumer configuration to point to a correct, reachable broker list (e.g., `bootstrap.servers=broker1:9092,broker2:9092`)."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#broker_not_available",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-04-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}