caddyserver/caddy · error

no upstreams available

Error message

no upstreams available

What it means

Error "no upstreams available" thrown in caddyserver/caddy.

Source

Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:1887

	start time.Time

	// logger is the prepared logger which is used to write logs
	// with the request, duration, and selected upstream attached.
	logger *zap.Logger

	// isFinalized is whether the response has been finalized,
	// i.e. copied and closed, to make sure that it doesn't
	// happen twice.
	isFinalized bool
}

// proxyHandleResponseContextCtxKey is the context key for the active proxy handler
// so that handle_response routes can inherit some config options
// from the proxy handler.
const proxyHandleResponseContextCtxKey caddy.CtxKey = "reverse_proxy_handle_response_context"

// errNoUpstream occurs when there are no upstream available.
var errNoUpstream = fmt.Errorf("no upstreams available")

// Interface guards
var (
	_ caddy.Provisioner           = (*Handler)(nil)
	_ caddy.CleanerUpper          = (*Handler)(nil)
	_ caddyhttp.MiddlewareHandler = (*Handler)(nil)
)

View on GitHub (pinned to 50e54ee279)

Solutions

  1. Configure at least one upstream for the reverse proxy, and ensure upstreams are healthy and not all marked down.
  2. Check dynamic upstream resolution if used; it may be returning zero results.

When it happens

Trigger: Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:1887 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15). Data as JSON: /api/errors/32cb62ac6ccc1ab4. Report an issue: GitHub.