t8y2/dbx · error
no RocketMQ broker address found
Error message
no RocketMQ broker address found
What it means
resolveBrokerAddr walks the cluster info's broker address maps looking for any non-empty broker address; when none exists it returns this error. The client cannot route operations without a broker endpoint.
Source
Thrown at agents/drivers/rocketmq/connection.go:287
func resolveBrokerAddr(info *admin.ClusterInfo, config connectionConfig, proxies *proxyManager) (string, error) {
if config.BrokerAddr != "" {
if local := proxies.LocalForOriginal(config.BrokerAddr); local != "" {
return local, nil
}
return proxies.ProxyFor(config.BrokerAddr, proxyTargetBroker)
}
for _, brokerName := range sortedKeys(info.BrokerAddrTable) {
broker := info.BrokerAddrTable[brokerName]
if address := broker.BrokerAddrs["0"]; address != "" {
return address, nil
}
for _, brokerID := range sortedKeys(broker.BrokerAddrs) {
if broker.BrokerAddrs[brokerID] != "" {
return broker.BrokerAddrs[brokerID], nil
}
}
}
return "", fmt.Errorf("no RocketMQ broker address found")
}
func minDuration(left, right time.Duration) time.Duration {
if left <= 0 || left > right {
return right
}
return left
}
View on GitHub (pinned to c0390bff16)
Solutions
- Ensure brokers are running and their brokerIP1/bind address is correctly configured so they register real addresses
- Restart brokers so they re-register with the name servers and retry
- Check connectivity/firewall between the client and broker ports
Example fix
# before: broker.properties missing address # brokerIP1= # after brokerIP1=10.0.0.5
Defensive patterns
Strategy: retry
Validate before calling
info, err := adminClient.FetchClusterInfo()
if err != nil { return err }
for _, b := range info.BrokerAddrTable {
if len(b.BrokerAddrs) > 0 { return nil } // at least one usable address
}
return errors.New("cluster has no broker addresses; check brokerIP1 config") Try / catch
addr, err := resolveBrokerAddr(ctx, info)
if err != nil {
log.Warn("no broker addr, refreshing cluster info")
info, err = refreshClusterInfo(ctx)
if err == nil { addr, err = resolveBrokerAddr(ctx, info) }
} Prevention
- Set brokerIP1/brokerIP2 in broker.properties to reachable addresses
- Monitor broker registration with the name server
- Ensure brokers are started before clients connect
When it happens
Trigger: connect or clusterTestResult runs against cluster info where every broker's BrokerAddrs map is empty or all values are empty strings.
Common situations: Brokers registered with the name server but reporting no addresses (misconfigured brokerIP); cluster with only replicas down; stale name-server metadata after broker shutdown.
Related errors
- query messages for topic %s on all masters: %w
- query topic stats for %s on all masters: %w
- IoTDB is not reachable at {host}:{port}
- ZooKeeper connection timed out before a session was establis
- ZooKeeper session expired during connection
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/fb3597da7907afdb.
Report an issue: GitHub.