t8y2/dbx · error

No management API endpoint candidates

Error message

No management API endpoint candidates

What it means

managementRequest tries each management API base URL candidate in turn; this error is only returned when the candidate list itself was empty — no base URL could even be attempted (as opposed to a requestError or a recorded lastConnectionError).

Source

Thrown at agents/drivers/rabbitmq/management.go:71

		result, requestError := managementRequestOnce(baseURL, connection, method, path, body)
		if requestError == nil {
			return result, nil
		}
		var statusError *managementStatusError
		if errors.As(requestError, &statusError) {
			return nil, requestError
		}
		var networkError net.Error
		if errors.As(requestError, &networkError) {
			lastConnectionError = requestError
			continue
		}
		return nil, requestError
	}
	if lastConnectionError != nil {
		return nil, lastConnectionError
	}
	return nil, errors.New("No management API endpoint candidates")
}

func managementRequestOnce(baseURL string, connection jsonObject, method, path string, body jsonObject) (any, error) {
	var requestBody io.Reader
	if body != nil {
		encoded, err := json.Marshal(body)
		if err != nil {
			return nil, err
		}
		requestBody = bytes.NewReader(encoded)
	}
	ctx, cancel := context.WithTimeout(context.Background(), managementRequestTimeout)
	defer cancel()
	request, err := http.NewRequestWithContext(ctx, method, baseURL+path, requestBody)
	if err != nil {
		return nil, err
	}
	request.Header.Set("Authorization", basicAuthHeader(

View on GitHub (pinned to c0390bff16)

Solutions

  1. Ensure the connection config has valid 'addresses'/'host' so management base URLs can be derived
  2. Verify the RabbitMQ management plugin is enabled and reachable on the expected port (usually 15672)
  3. Inspect the preceding config resolution — fix the root missing-address error first

Example fix

// before
config := map[string]any{} // no addresses → no management candidates
agent.Call("mq_get_topic_stats", config)
// after
config := map[string]any{"addresses": "rabbit:5672", "management_port": 15672}
agent.Call("mq_get_topic_stats", config)
Defensive patterns

Strategy: retry

Validate before calling

if strings.TrimSpace(cfg["host"]) == "" && strings.TrimSpace(cfg["addresses"]) == "" {
	return errors.New("no endpoints; management API candidates cannot be built")
}

Try / catch

_, err := agent.Call("mq_get_topic_stats", params)
if err != nil && strings.Contains(err.Error(), "No management API endpoint candidates") {
	// fix config, then retry the management call
	if _, cerr := agent.Call("mq_connect", fixedCfg); cerr == nil {
		_, err = agent.Call("mq_get_topic_stats", params)
	}
}

Prevention

When it happens

Trigger: managementGet/managementSend called when no management base URL candidates exist — typically because the addresses/connection config yielded no endpoints to derive management URLs from.

Common situations: Management calls (queue stats, consumers, purge) made with a config whose host/address fields are missing, so no http://host:15672 candidates could be built; management plugin port never configured.

Related errors


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