# org.apache.kafka.common.errors.BrokerIdConflictException: Broker ID 1 is already registered by another broker with address 192.168.1.10:9092

- **ID:** `kafka/broker-id-conflict`
- **Domain:** kafka
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

Two Kafka brokers in the same cluster have the same `broker.id` value, causing a conflict in ZooKeeper or KRaft metadata.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| kafka_2.13-3.4.0 | active | — | — |
| kafka_2.13-3.5.1 | active | — | — |
| kafka_2.13-3.6.0 | active | — | — |

## Workarounds

1. **Change the `broker.id` in one broker's `server.properties` to a unique value (e.g., from 1 to 2) and restart that broker. Verify no other broker uses ID 2.** (95% success)
   ```
   Change the `broker.id` in one broker's `server.properties` to a unique value (e.g., from 1 to 2) and restart that broker. Verify no other broker uses ID 2.
   ```
2. **If using KRaft, check `meta.properties` in the log directory and ensure `broker.id` is unique across all nodes; regenerate the cluster ID if necessary.** (90% success)
   ```
   If using KRaft, check `meta.properties` in the log directory and ensure `broker.id` is unique across all nodes; regenerate the cluster ID if necessary.
   ```
3. **Use a script to list all registered brokers: `zookeeper-shell.sh localhost:2181 get /brokers/ids/1` and compare the `endpoints` field to identify the conflicting broker, then update its ID.** (93% success)
   ```
   Use a script to list all registered brokers: `zookeeper-shell.sh localhost:2181 get /brokers/ids/1` and compare the `endpoints` field to identify the conflicting broker, then update its ID.
   ```

## Dead Ends

- **** — The conflict persists because the same IDs are still assigned; ZooKeeper still sees both with the same ID. (98% fail)
- **** — This removes the conflicting registration but the broker re-registers with the same ID on restart, causing the error again. (90% fail)
- **** — This only affects automatic ID assignment, not manual conflicts; it does not resolve existing duplicate IDs. (85% fail)
