Troubleshooting Experimental

Every velyr-pack error message, and the build, runtime and rollout failures you can hit.

Manifest errors#

Every velyr-pack command validates the whole manifest first and prints one line on stderr. The prefix tells you where the problem is: process "<name>", or env "<env>": service "<name>".

MessageCause and fix
velyr.toml: unknown key processes.web.helthA key that does not exist, usually a typo. The path points at it.
process "web": needs a lowercase name and a commandThe name has uppercase letters or underscores, or command is missing or empty.
process "web": health needs path and porthealth without path, or with a port of 0 or less.
process "web": health.start_period: time: unknown unit " min" in duration "1 min"Durations use Go syntax: 60s, 2m, 1m30s. Same for grace.
env "production": file is requiredEvery env needs the stack file it writes to.
env "production": image must be dockerfile or cnbAny other value for image.
env "production": extends "app": must be a YAML alias like *worker-baseservice_extends and deploy_extends take aliases with the *.
env "production": service "Web": invalid or duplicate nameService names are lowercase letters, digits and hyphens, unique in the env.
env "production": service "web": set exactly one of process or commandBoth or neither were set.
env "production": service "web": unknown process "api"The process is not declared in [processes].
env "production": service "web": a cnb image runs declared processes only: use processRaw command in an env with image = "cnb". Declare a process instead; a catch-all artisan process covers one-off commands (recipe).
env "production": service "web": args only apply to a processargs together with a raw command. Put the arguments in the command.
env "production": service "web": cpus "": set it on the service or the env, like "0.5"No CPU limit on the service or the env, or not a number.
env "production": service "web": memory "1Gi": set it on the service or the env, like 512MNo memory limit, or Kubernetes units. Use K, M or G.
env "production": service "web": scale.source must be one of [kafka list stream caddy cpu]Unknown autoscaler source.
env "production": service "web": scale needs 1 <= min <= max and non-negative target and conn_weightInvalid scale bounds.

compose errors#

MessageCause and fix
unknown env "staging"No [envs.staging] in the manifest. Env names are case-sensitive.
open stack.yml: no such file or directoryThe env's file does not exist. It is resolved relative to velyr.toml, not the current directory.
stack.yml: missing "# velyr:begin" ... "# velyr:end" block under services:The markers are missing, out of order, or not indented exactly two spaces at the start of a line.
stack.yml is out of date: run velyr-pack compose productionFrom -check: the file differs from what the manifest renders. Run the command it names and commit the result.
usage: velyr-pack compose [-f velyr.toml] [-check] <env> ...Wrong arguments. Flags go before the env name: compose -check production.

If -check fails in CI but passes locally, check that both use the same velyr-pack release: a newer renderer can produce a different block.

Build failures#

No buildpack groups passed detection. The app has no composer.json at the build path, or it does not list laravel/framework under require. Check --path and that project.toml does not exclude composer.json.

composer install fails with a PHP version requirement. The builder's PHP does not satisfy composer.json or composer.lock. Pick the builder tag for the right PHP minor (-php8.4, -php8.5).

composer install fails on a missing extension. The images ship a fixed list of extensions. Open an issue, or build your own stack images.

route:cache fails. Routes are cached at build time with a throwaway environment and no database. A route file that reads the database or a required environment variable breaks here; move that logic out of the route files.

Invalid Procfile entry or Duplicate Procfile process. Only without velyr.toml: each Procfile line must be name: command, with unique names.

The page loads without CSS or JS. The builder does not build front-end assets. Run npm run build before pack build and make sure public/build is not excluded in project.toml.

Runtime failures#

The container exits right away with Invalid environment assignment in /config/common.env at line N. A line in a mounted config or secret is not KEY=VALUE. See the file format.

A value has quotes in it. Files are read literally: APP_NAME="Shop" sets "Shop" with the quotes. Remove the quotes.

A variable from environment: is ignored. The same key is in /config/common.env or /run/secrets/app_secrets, which take precedence.

permission denied reading /run/secrets/app_secrets. The secret is mounted with a restrictive mode for root. Mount it with uid: "33" and gid: "33", see Mounting them in Swarm.

Config changes need a restart, or the app uses stale values. Something cached the config. The image itself never does; check for a config:cache in a boot script and redeploy so it runs again with the new environment.

AUTORUN_* variables do nothing. The serversideup entrypoint does not run in a CNB image. Move that work to a boot script.

Thousands of zombie processes. The service runs without init: true, so the app is PID 1. Every generated service has it; a hand-written one may not.

Tasks restart with exit code 137. The container hit its memory limit and the kernel killed a process. Raise memory on the service, and remember the peak includes child processes.

Rollout failures#

docker service inspect shows rollback_completed. The new web task did not become healthy within start_period, or failed within the monitor window. Look at the failed task:

console
$ docker service ps --no-trunc shop_web
$ docker inspect --format '{{json .State.Health}}' <container>

Common causes: the app takes longer than start_period to boot (raise it), the health route needs a database that is not reachable from the new task, or the port in health does not match the port in the command.

The service is paused. The rollback itself failed. Swarm stops there instead of looping. Fix the cause, then deploy again, or run docker service update --rollback <service>.

The deploy job passed, but the old version still runs. docker stack deploy returns before the rollout. Wait for the rollout in the pipeline.

Swarm cannot schedule the new web task. start-first needs room for one extra task during the update. Free CPU and memory on the node, or lower the limits.

A worker consumed the same message twice during a deploy. Not from the rollout order: workers stop before their replacement starts. Check grace: a job killed after the grace period is retried by the queue.