initializer-failed (Pro)
Docker Compose (docker compose):
service "init" didn't complete successfully: exit 1Kubernetes, helm 3:
Error: job is failed: init3/r-initializer-1-0-0Kubernetes, helm 4:
Error: resource Job/init/r-initializer-1-0-0 not ready. status: Failed, message: Job Failed. failed: 1/1On your cluster the Job is <release>-initializer-<version> in the install’s namespace.
dojo-deploy reports Hint: initializer-failed in the start phase on Docker Compose, or the install or upgrade phase on Kubernetes, when it saw the initializer fail: the init container exited without completing and its output was saved, or the initializer Job ended Failed. When the initializer’s output shows a migration history error, the hint is migration-history-inconsistent instead.
Cause
DefectDojo’s initializer, which runs the database migrations, failed.
Confirm
Read the initializer’s output. Its last lines name the failure.
Docker Compose: the full output is saved under the install location’s
logs/directory, in a file namedinit-failure-<date>_<time>.log. Thestartphase’s error names the file, and the install log holds its last lines.sudo tail -n 50 /opt/dojo/logs/init-failure-*.log # /opt/dojo is the default location docker inspect --format '{{.State.Status}} {{.State.ExitCode}}' initKubernetes: dojo-deploy reads the Job’s output when helm ends and writes it to the log named on the
Install log:orUpgrade log:line. The Job removes itself soon after it ends; while it is still there:kubectl get jobs -n <namespace> kubectl logs job/<release>-initializer-<version> -n <namespace> --tail=50
Recover
Fix what the initializer’s last lines name. If it exited with code 137 or its pod shows OOMKilled, see The initializer is killed for running out of memory. If they show a migration history error, restore the database snapshot that matches this release (see migration-history-inconsistent). Then run the command on the To resume: line. If the cause is not clear, send DefectDojo support a support bundle, which includes the saved initializer output.