kafka AdminClient API Timed out waiting for node assignment
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
The Kafka AdminClient error “Timed out waiting for node assignment” usually means the client could not find a usable broker connection in time for the admin request. The mistake is often not the API call itself, but the network path or broker metadata that tells the client where brokers actually live.
In other words, the bootstrap address got the client started, but the metadata returned by the cluster was not reachable or not usable.
What “Node Assignment” Means
AdminClient operations such as listing topics, creating topics, or describing configs must be sent to a broker node that can handle the request. Before that happens, the client needs fresh cluster metadata.
If metadata never becomes usable, the AdminClient cannot assign the operation to a node and eventually times out.
A minimal example looks like this:
If this fails with the timeout message, increasing the timeout may hide the symptom temporarily, but it will not fix a broken connection path.
Most Common Root Causes
The most common causes are:
- wrong
bootstrap.serversvalue - bad
advertised.listenerson the broker - DNS or hostname resolution failure
- Docker or Kubernetes port mapping mismatch
- firewall or security-group rules blocking broker ports
- SASL or SSL configuration mismatch that prevents a real connection
The advertised.listeners setting is especially important. A broker can accept the initial connection on one address, then advertise a different hostname that the client cannot resolve from its network location.
Diagnose the Metadata Path First
A practical debugging sequence is:
- verify the client can reach the bootstrap host and port
- inspect broker
advertised.listeners - confirm the advertised addresses are reachable from the client machine
- only then consider timeout tuning
If the client runs outside Docker but the broker advertises an internal container hostname, AdminClient metadata requests fail even though the first TCP connection succeeded.
Security Mismatches Can Look Like Connectivity Issues
AdminClient uses the same security layer as producers and consumers. If the cluster expects SASL_SSL and the AdminClient is configured as plain text, the metadata exchange may never complete cleanly.
A secure configuration looks like this:
If those settings do not match the cluster, the timeout message may be the downstream symptom rather than the real cause.
When Increasing Timeouts Is Reasonable
Longer timeouts are appropriate only after you have ruled out routing and security problems. For example, a cross-region admin job on a loaded cluster may legitimately need more time than a local development cluster.
Even then, raising request.timeout.ms should be the last step, not the first.
Common Pitfalls
- Assuming the bootstrap server is the only address that matters. Kafka clients also use the broker addresses returned in metadata.
- Ignoring
advertised.listeners, especially in Docker, Kubernetes, and cloud NAT setups. - Treating every timeout as a performance problem when the real issue is unreachable broker metadata.
- Testing with a producer that works in one network context and assuming AdminClient from another context will behave the same.
- Increasing timeouts before validating listener, DNS, firewall, and security configuration.
Summary
- “Timed out waiting for node assignment” usually means AdminClient never got a usable broker target.
- The main suspects are
bootstrap.servers,advertised.listeners, DNS, firewall rules, and security mismatch. - The initial connection can succeed while the metadata-returned broker addresses still fail.
- Fix connectivity and listener configuration before changing timeout values.
- Timeout tuning is appropriate only after the network and security path is known to be correct.

