Repository navigation
Troubleshooting
| Code | Meaning |
|---|---|
0 |
Converged (or nothing to do) |
1 |
A bounce failed, the lock is held, the run was interrupted, undo had nothing to undo, or Docker/Compose returned an error |
2 |
Configuration, validation or pull error, an unknown SERVICE or PROJECT name, a bad flag, or a project format this CLI can't safely change; nothing changed |
On 1 from a failed bounce the old version is still serving: old replicas are only drained as new ones become happy.
refresh and migrate handle projects one by one: 0 when every project succeeded, was up to date or was skipped, 1 when one failed.
Service api Failed: new replica demo-api-app-3 never passed GET /health (expects 2xx) within 5m0s (last answer: HTTP 404)
The message names Envoy's check (GET on healthcheck.uri, or GET / expecting a status below 500 when no uri is set), the bounce_health_timeout, and what the replica answered when Bouncer asked once more: last answer: HTTP <code>, last try: <error> (no answer, connection refused), not running, or Docker healthcheck: unhealthy (Envoy never got to check it).
up removes every new replica that is not healthy and exits 1; healthy new replicas and the remaining old ones keep serving. To find out why:
-
Watch it come up. Run
docker bouncer upagain and, in another terminal,docker bouncer ps(rolenew, DockerHEALTH) anddocker bouncer logs api --follow. -
Check the health path. Envoy sends
GET <healthcheck.uri>to the first port inports:/expose:. With nouriit sendsGET /and accepts any status below500; with auriit accepts only2xx, so a redirect fails. A5xx, no answer, or a health endpoint on another port fails. From a container on the same network:docker run --rm --network demo_default curlimages/curl -si http://demo-api-app-3:8080/health
-
Check the Docker healthcheck, if the service has one. A replica is not put behind Envoy until Docker reports it
healthy, and Docker's default interval is 30s.docker inspect --format '{{json .State.Health}}' demo-api-app-3shows the last results. -
Ask Envoy. The proxy's admin interface listens on
127.0.0.1:9901inside the proxy container (19901if the Service uses port 9901; thedev.cuza.bouncer.admin-portlabel says which). The image has no curl, so use bash:docker exec demo-api-1 bash -c 'exec 3<>/dev/tcp/127.0.0.1/9901 && printf "GET /clusters HTTP/1.1\r\nHost: x\r\nConnection: close\r\n\r\n" >&3 && cat <&3' | grep -E "hostname|health_flags"
Each replica should show
health_flags::healthyin everyport-<N>cluster./failed_active_hcmeans Envoy's check is failing. -
Give it more time if the app is just slow to start: raise
bounce_health_timeout(default300s).
These exit 2 and create nothing; see Configuration:
service "api": network_mode host cannot be set on a bouncer service (its proxy reaches the replicas over a network)
service "worker": network_mode service:api points at api's proxy; bouncer services can't share namespaces or volumes
service "api": replica names like myproject-api-app-1000 are 64 characters, over the 63-character DNS name limit; use a shorter project name (-p) or service name
-
Shared namespace or volumes.
network_mode,ipcorpid: service:apiandvolumes_from: [api]would join the proxy's container, not the app's. Share through a network (talk toapi:<port>) or a named volume instead. -
Bouncer's labels. A label starting with
dev.cuza.bouncer.on any service is rejected: Bouncer finds proxies and replicas by those labels. Rename the label. -
network_mode: container:<name>,service:<name>orlink_local_ipson a Service. The proxy cannot reach replicas inside another container's or service's network, and every replica would claim the same link-local address. Attach the Service to a network instead. -
Name too long. Shorten the project name (
-p,name:or the directory name) or the service name.
up builds build: services before taking the lock. A failed build prints the builder's error and exits 2; nothing has changed. Fix the build and run up again, or up --no-build to run the images you already have.
Every new replica gets new anonymous volumes (- /data, or a VOLUME in the image), and a drained replica's are removed with it. Data that must survive a bounce belongs in a named volume, see Configuration.
bounce in progress by alice@host pid 4242 since 2026-10-03T12:00:00Z (use --force-unlock if it is gone)
Another up or undo holds the project's lock, or one was killed (SIGKILL, crash, power loss) without releasing it. docker bouncer ls shows the project as bouncing while the lock exists.
- If the owner is still running, wait for it.
- If it is gone,
docker bouncer up --force-unlocktakes the lock over and resumes the bounce. Or remove it by hand:docker rm <project>-bouncer-lock. - Doing nothing also works: a lock older than
max(5m, bounce_health_timeout × number of Services)is taken over by the next run.
Ctrl-C and SIGTERM release the lock; a second Ctrl-C kills the process and may leave it.
lock image … is not present locally, pull it first: the lock container is created from the proxy image. This happens with --pull never when that image is missing; run docker bouncer pull once.
Service api Proxy definition changed: recreating (interrupts traffic briefly)
Something the proxy is built from changed: proxy_image, ports:, expose:, the service name, networks or aliases, logging, or a new docker-bouncer version renders a different Envoy bootstrap or seed. Health check settings such as x-bouncer.healthcheck.uri are not part of the proxy's definition: they are written to the running proxy's cluster file and Envoy reloads them in place (Proxy config updated), see How it works. Upgrading to the docker-bouncer version that introduced this recreates each proxy one last time, because the seed changed shape. Upgrading to the version whose proxy listens on IPv6 as well recreates each proxy once too, because its bootstrap and entrypoint changed. Likewise, upgrading to the version that passes WebSocket upgrades recreates each proxy once, because its bootstrap gained upgrade_configs and stream_idle_timeout, and changing upgrade_types recreates it too. Compose recreates the proxy container before the bounce, so the Service is unreachable for the seconds Envoy takes to start and the replicas take to pass their first health check. Nothing else is lost: the replicas keep running and the new proxy's list is rebuilt by the same run. Make such changes in a quiet moment.
-
Host port already in use. The proxy publishes the Service's
ports:. If another process or container holds a host port, Compose fails to start the proxy andupexits1. Under plain Compose the same file would fail the same way. -
Two Services on the same container port is fine: each has its own proxy and hostname (
api:8080,worker:8080). -
Port 9901. Envoy's admin interface uses
127.0.0.1:9901inside the proxy. A Service that serves on 9901 moves admin to19901automatically. A Service that uses both 9901 and 19901 is rejected:admin port: both 9901 and 19901 are service ports. -
<S>-appalready exists. A Serviceapireserves the nameapi-appfor its replicas; rename the other service.
envoy rejected the cluster update for api
envoy did not apply the cluster update for api within 10s
Bouncer writes the replica list into the proxy and waits for Envoy to confirm it. If Envoy rejects it or does not apply it within 10 seconds, the bounce stops before draining anything and up exits 1. Look at docker bouncer logs api --proxy. A custom proxy_image that is not the official Ubuntu-based Envoy image is the usual cause.
proxy not ready means the proxy's admin interface did not answer within a minute of the run starting; check the proxy logs and that the container is running.
Skipped: no invocation recorded; run docker bouncer up once: the project's replicas were created before Bouncer recorded how up loaded the project. Run docker bouncer up once (with your usual -f, --env-file and --profile); the replicas it creates carry the invocation, and refresh takes it from there. An up that finds nothing to change creates no replicas, so make it bounce once (the upgrade to this version does, through image pinning).
Failed: the recorded invocation loads project other, not shop; run docker bouncer up for shop once: the compose files the last up recorded now load under another project name (a top-level name: changed, or labels were copied by hand). refresh fails that project before locking, pulling or bouncing anything. Run up for the project once to record a current invocation.
Not set in the env files: TAG; values from the shell at the last up are not replayed; put them in an env file: the compose files use a variable, with no default, that neither the recorded --env-files nor the project's .env set. At up it came from your shell; cron's shell doesn't have it. Put it in the project's .env or an env file you pass to up, then run up once so the invocation records that file.
Service api Held at revision 3 by undo; run docker bouncer up to resume: the last revision came from undo, and refresh won't bounce it back to what the file describes. Run docker bouncer up when you want to roll forward. If you changed the file to match the undone revision, up finds nothing to change and the hold stays until an up creates replicas (a bounce, or a scale-up: the newest replica's invocation is the one that counts).
project shop: format 2.0 from bouncer v1.0.0 is newer than this CLI (v0.3.0) can safely change; upgrade docker-bouncer, or pass --ignore-format: a newer Bouncer stored the project in a format this one could misread. up and undo refuse with exit 2; refresh fails that project (exit 1) and goes on with the others; ps, history, logs, ls, stop and down work with a warning. Upgrade docker-bouncer. --ignore-format overrides the refusal, at your own risk. A newer minor format is fine: it only gets a warning.
project shop: format "2-beta" from bouncer v1.0.0 is not one this CLI understands; upgrade docker-bouncer, or pass --ignore-format: the format label isn't MAJOR.MINOR as this CLI knows it, so it is treated as newer: the same refusals and warnings as a newer major, and migrate refuses it.
project shop: format 0.4 is no longer read by this CLI; run docker bouncer down with bouncer v0.1.0, then up with this one: this CLI dropped reading that format. Take the project down with the version named, then up with this one (this deletes its revision history). ls and the other commands give this advice instead of the migrate hint: migrate can't read that format either.
project shop is at format none, this CLI writes 1.0; run docker bouncer migrate shop (a warning): the project was deployed by an older Bouncer. Everything keeps working; docker bouncer migrate shop re-bounces it once, with no downtime, so its replicas carry the current format.
An up with an unchanged compose file bounced because the image reference now names another image: a pull moved the tag (:latest, :1), or a rebuild made a new image ID. Each revision records the exact image (see How it works), so this is a new revision, and undo goes back to the previous image. To stay on one image, pin it in the file with @sha256:….
Upgrading to the docker-bouncer version that added the dev.cuza.bouncer.image label bounces every Service once, even with no image change, because its spec gains the label.
With the buildx builder and Docker's containerd image store, an unchanged rebuild gets a new image ID (BuildKit's provenance attestation changes), but not a new image manifest; Bouncer compares the manifest, so it does not bounce. One gap remains there: as soon as a rebuild moves the tag, the store drops the previous image, even while a replica still runs it, so undo of a build: Service fails with revision N ran image sha256:… which is no longer local. Give builds a versioned image: tag (image: registry/app:${VERSION}) to keep earlier builds around for undo. Likewise, after an unchanged rebuild the replicas keep the previous image ID; the next bounce pins the new one, and once no container uses the previous image a prune can remove it, so an undo to that revision fails with the same "no longer local; build or pull it again" error.
-
403on anUpgraderequest. Envoy passes WebSocket and the types listed inupgrade_typesonly; add the protocol'sUpgradetoken there. - Idle WebSockets. The proxy sets no idle timeout on upgraded connections, so a quiet WebSocket stays open until the app, the client or something in front (a load balancer, a TLS proxy) closes it. If they drop after a fixed idle time, look at those timeouts, or send pings.
-
During a bounce, a WebSocket stays on the replica that accepted it until that replica stops; draining waits for
drain_method_params.delay, then the replica is stopped and its connections close. Clients should reconnect.
-
Only a value inside an
env_filechanged. Keys from env files are stripped from the stored spec (so secrets never land in labels), and so is their effect on the spec hash. Change something else in the service, such as a label, to roll the new values out. -
Only
x-bouncersettings changed. They are not part of the replica spec; they apply to the next bounce. -
Only
deploy.replicaschanged. That scales without a bounce, by design. -
up SERVICEnamed a different Service. Only named Services are bounced. -
The Service's profile is not active. An
upwithout--profileleaves a profiled Service alone.
The TCP peer of every request is the proxy container. The proxy passes the caller on in headers:
-
X-Forwarded-For: Envoy appends the address it received the connection from, after any chain the caller sent (203.0.113.7in,203.0.113.7,<caller>out); -
X-Forwarded-Proto: kept when the caller sends it (a TLS-terminating proxy in front sendshttps), otherwise set tohttp; -
Hostis preserved; -
x-request-idis kept when the caller sends one, otherwise Envoy adds one; -
x-envoy-*control headers from callers (such asx-envoy-retry-on) are ignored.
For host-published ports the address Envoy sees is often the Docker network's gateway rather than the real client: Docker's userland proxy (and Docker Desktop or OrbStack port forwarding) opens a new connection from inside the network. To get the real client address, put a reverse proxy that sets X-Forwarded-For in front; its address is appended after it.
The proxy trusts one hop: a caller that reaches the published port directly can also set X-Forwarded-Proto and the earlier X-Forwarded-For entries, so the app should trust only the last entry unless a proxy in front controls those headers.
Plain docker compose up on the same project replaces the proxy with the app; see Operations. docker bouncer config output cannot be loaded by plain Compose either. Use the docker bouncer commands for Bouncer projects.