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

  1. Ensure brokers are running and their brokerIP1/bind address is correctly configured so they register real addresses
  2. Restart brokers so they re-register with the name servers and retry
  3. 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

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


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/fb3597da7907afdb. Report an issue: GitHub.