Not able to install the latest version (21.9.0) of Sentry on-premise (snuba-api error)

My installation steps:

  1. Clone the latest sentry on-premise release (21.9.0) from git - GitHub - getsentry/onpremise: Sentry On-Premise setup.
  2. If run ./install.sh then such error occurs:
Parsing command line ...

Setting up error handling ...

 Checking minimum requirements ...

Creating volumes for persistent storage ...
Created sentry-clickhouse.
Created sentry-data.
Created sentry-kafka.
Created sentry-postgres.
Created sentry-redis.
Created sentry-symbolicator.
Created sentry-zookeeper.

 Ensuring files from examples ...
../sentry/sentry.conf.py already exists, skipped creation.
../sentry/config.yml already exists, skipped creation.
../symbolicator/config.yml already exists, skipped creation.
../sentry/requirements.txt already exists, skipped creation.

 Generating secret key ...

Replacing TSDB ...

 Fetching and updating Docker images ...
Some service image(s) must be built from source by running:
    docker-compose build snuba-transactions-cleanup sentry-cleanup snuba-cleanup symbolicator-cleanup
nightly: Pulling from getsentry/sentry
Digest: sha256:ec96bf8e8016e321b6de0df9bdbe383f1d5eff3b220b626b67b887af2ba45fa5
Status: Image is up to date for getsentry/sentry:nightly
docker.io/getsentry/sentry:nightly

Building and tagging Docker images ...

smtp uses an image, skipping
memcached uses an image, skipping
redis uses an image, skipping
postgres uses an image, skipping
zookeeper uses an image, skipping
kafka uses an image, skipping
clickhouse uses an image, skipping
geoipupdate uses an image, skipping
snuba-api uses an image, skipping
snuba-consumer uses an image, skipping
snuba-outcomes-consumer uses an image, skipping
snuba-sessions-consumer uses an image, skipping
snuba-transactions-consumer uses an image, skipping
snuba-replacer uses an image, skipping
snuba-subscription-consumer-events uses an image, skipping
snuba-subscription-consumer-transactions uses an image, skipping
symbolicator uses an image, skipping
web uses an image, skipping
cron uses an image, skipping
worker uses an image, skipping
ingest-consumer uses an image, skipping
post-process-forwarder uses an image, skipping
subscription-consumer-events uses an image, skipping
subscription-consumer-transactions uses an image, skipping
relay uses an image, skipping
nginx uses an image, skipping
Building snuba-cleanup
Sending build context to Docker daemon  3.584kB

Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> f7f5de35779c
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
 ---> Using cache
 ---> df6cf45bf5ce
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> 033808e971d6
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Using cache
 ---> 006fffcb31b7
Successfully built 006fffcb31b7
Successfully tagged snuba-cleanup-onpremise-local:latest
Building snuba-transactions-cleanup
Sending build context to Docker daemon  3.584kB

Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> f7f5de35779c
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
 ---> Using cache
 ---> df6cf45bf5ce
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> 033808e971d6
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Using cache
 ---> 006fffcb31b7
Successfully built 006fffcb31b7
Successfully tagged snuba-cleanup-onpremise-local:latest
Building symbolicator-cleanup
Sending build context to Docker daemon  3.584kB

Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> edc2d3fc0580
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
 ---> Using cache
 ---> 918277b9952a
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> 0ece7b305c9e
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Using cache
 ---> f1f167f7be72
Successfully built f1f167f7be72
Successfully tagged symbolicator-cleanup-onpremise-local:latest
Building sentry-cleanup
Sending build context to Docker daemon  3.584kB

Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> c49845635d2a
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
 ---> Using cache
 ---> 77f547b7b4d7
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> 8c35cff3e365
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Using cache
 ---> 146666e33d5c
Successfully built 146666e33d5c
Successfully tagged sentry-cleanup-onpremise-local:latest

Docker images built.

 Turning things off ...
Removing network onpremise_default
Network onpremise_default not found.
Removing network sentry_onpremise_default
Network sentry_onpremise_default not found.

 Setting up Zookeeper ...
Creating network "sentry_onpremise_default" with the default driver
Creating volume "sentry_onpremise_sentry-secrets" with default driver
Creating volume "sentry_onpremise_sentry-smtp" with default driver
Creating volume "sentry_onpremise_sentry-zookeeper-log" with default driver
Creating volume "sentry_onpremise_sentry-kafka-log" with default driver
Creating volume "sentry_onpremise_sentry-smtp-log" with default driver
Creating volume "sentry_onpremise_sentry-clickhouse-log" with default driver
Creating sentry_onpremise_zookeeper_run ... 
Creating sentry_onpremise_zookeeper_run ... done

 Downloading and installing wal2json ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5417  100  5417    0     0  19066      0 --:--:-- --:--:-- --:--:-- 19141

 Bootstrapping and migrating Snuba ...
Creating sentry_onpremise_zookeeper_1 ... 
Creating sentry_onpremise_redis_1     ... 
Creating sentry_onpremise_clickhouse_1 ... 
Creating sentry_onpremise_redis_1      ... done
Creating sentry_onpremise_zookeeper_1  ... done
Creating sentry_onpremise_clickhouse_1 ... done
Creating sentry_onpremise_kafka_1      ... 
Creating sentry_onpremise_kafka_1      ... done

ERROR: for snuba-api  Container "31621580f32a" is unhealthy.
Encountered errors while bringing up the project.
An error occurred, caught SIGERR on line 3
Cleaning up...

If try to install old version of sentry - 21.6.3 then everything is fine and there is no errors during installation (but there is nginx 502 bad gateway error during capturing exceptions).

My environments details
OS: CentOS Linux release 7.9.2009 (Core)
Docker: 20.10.8
Docker-compose: 1.29.2

Can your run docker-compose logs snuba-api and share the output?

I am getting the same error when I ran the command you asked for this is what I got:

user@machine:~/onpremise-21.8.0$ sudo docker-compose logs snuba-api
Attaching to
user@machine:~/onpremise-21.9.0$ sudo docker-compose logs snuba-api
Attaching to

My environments details
OS: Ubuntu Server 20.04.3 LTS
Docker: 20.10.8, build 3967b7d
Docker-compose: 1.29.2

I’m afraid there’s something wrong with your machine or Docker system then as you should be able to get the logs even if the containers went down.

I have only really used docker as a service and never really had to do any debugging of it is there anything you could suggest me looking into?

You may look into your system logs. Typically this is caused by OOM-killer

This issue was fixed. The problem was related to file permissions.

  1. Add 777 for all installation files.
  2. Run ./install.sh - get new permission error.
  3. Add 777 for new created files.
  4. Do step 2 and 3 until everything will run successfully.

I know that it is not good solution but it is acceptable for me.