001F0004: Kafka: The metadata request to the broker has failed (timeout or connection error).
A Kafka producer was successfully created but the metadata request to the broker timed out or failed. This means the producer could be configured and initialized, but actual network communication with the broker did not succeed within the allotted time.
Possible causes:
- The broker address is correct in format but the broker is not running or not reachable from the Agent network.
- A firewall blocks the connection between the Agent and the Kafka broker on the specified port.
- DNS resolution of the broker hostname failed.
- SSL/TLS certificate verification failed during the connection handshake.
- SASL authentication was rejected by the broker (wrong credentials or mechanism).
Action:
Verify that the Kafka broker is running and reachable from the Agent system. Use network tools (telnet, openssl s_client) to verify TCP connectivity to the broker port. Check firewall rules. If using SSL, verify that the CA certificate matches the broker's certificate. If using SASL/SCRAM, verify that the credentials are correct.