Self-hosted (AWS)

Self-hosted troubleshooting

Exit codes and the errors seen during real installs, with the fix for each.

Deployment
Self-hosted
Area
Operate

Every command is safe to run again, and every error names its fix in error.nextAction, so start by running the same command a second time.

Before you start

You supplyExampleComes from
The command that faileddiakrin self-hosted deploy --env diakrin.envYour terminal
The exit code7echo $? right after the command

Find where an installation stands:

sh
diakrin self-hosted status --env diakrin.env

You should see a phase (infrastructure-incomplete, awaiting-dns, infrastructure-ready or deployed) and the next command to run.

Exit codes

ExitMeaningDo this
0DoneNothing
1It ran and failed, or doctor found a problemRead error.nextAction and run the same command again
2Invalid input or a missing preconditionFix diakrin.env or the flag named in the message
3AWS credentials are missing or expiredSign in again (aws sso login), then rerun
4AWS denied a callGrant the permission named in the message
5Conflict with what is installedDo what nextAction says. Never force through a mismatch
6Network, throttling or timeoutRun the same command again
7Waiting on a DNS recordAdd the record, then run the same command again

Install

You seeIt meansDo this
awaiting-dns (exit 7)A certificate record is missing at the DNS providerRun diakrin self-hosted dns --env diakrin.env, add what it lists, then run infra up again
ACCOUNT_MISMATCH (exit 5)The AWS session is in another account than DIAKRIN_ACCOUNT_IDSign in to the right account
REGISTRY_AUTH (exit 3)The image registry refused a tokenCheck network access to the registry, then rerun deploy
IMAGE_COPY (exit 6)A network error while copying imagesRun deploy again; copied layers are skipped
IAM_NOT_READY or "ECS was unable to assume the role"A new IAM role has not propagated yetWait two minutes and run the same command again
TASK_FAILEDA one-off task such as migrations failedRead the log lines in the message
CLI_TOO_OLD or RELEASE_TOO_OLDThe release needs a newer CLIRun the install command again to update the CLI
TERRAFORM_STATE_UNSAVEDThe state was not saved after a network errorRun the same infra up command again; do not edit state by hand

After deploy

You seeIt meansDo this
doctor reports Console from the internet failingThe host record is missing, or CloudFront cannot reach the load balancerRun diakrin self-hosted dns, then diakrin self-hosted status
https://<host>/setup shows "not found"The request did not ask for HTMLOpen it in a browser, not with curl
doctor warns that GitHub source ranges changedGitHub published new rangesRun diakrin self-hosted doctor --fix
Webhook returns HTTP 403 from outside GitHubThe firewall blocked it, which is correctSend the webhook from GitHub only
rollback leaves the API restartingYou rolled back with CLI older than 0.1.7Update the CLI, then run rollback again

Remove

You seeIt meansDo this
DESTROY_INCOMPLETE (exit 1)Part of the removal failed; the records are keptRun the same destroy command again
Resources still listed by the AWS tag searchThe tag index lags behind deletionsCheck each service; the CLI does this for you

Next

Return to Operate your installation.

Next stepOperate your installation →