Service 'snuba-cleanup' failed to build:

I am deploying Sentry onpremise in a Linux Container, but failing towards the end with the following error.

Service 'snuba-cleanup' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*' returned a non-zero code: 100

I saw a similar post which blamed this on intermittent network connectivity, but I don’t suspect the same.

I’ll post the output from running install.sh below.

Checking minimum requirements...
Removing network onpremise_default
Network onpremise_default not found.
Removing network sentry_onpremise_default
Network sentry_onpremise_default not found.

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

sentry/sentry.conf.py already exists, skipped creation.
sentry/config.yml already exists, skipped creation.
sentry/requirements.txt already exists, skipped creation.

Building and tagging Docker images...

Pulling smtp                   ... 
Pulling memcached              ... 
Pulling redis                  ... 
Pulling postgres               ... 
Pulling zookeeper              ... 
Pulling kafka                  ... 
Pulling clickhouse             ... 
Pulling snuba-api              ... 
Pulling snuba-consumer         ... 
Pulling snuba-replacer         ... 
Pulling snuba-cleanup          ... 
Pulling symbolicator           ... 
Pulling symbolicator-cleanup   ... 
Pulling web                    ... 
Pulling cron                   ... 
Pulling worker                 ... 
Pulling post-process-forwarder ... 
Pulling sentry-cleanup         ... 
Pulling web                    ... done
Pulling sentry-cleanup         ... done
Pulling memcached              ... pulling from library/memcached
Pulling symbolicator           ... pulling from getsentry/symbolicator
Pulling symbolicator           ... digest: sha256:6a19bb4fc0e02fe94e...
Pulling symbolicator           ... status: image is up to date for g...
Pulling symbolicator           ... done
Pulling snuba-replacer         ... pulling from getsentry/snuba
Pulling snuba-replacer         ... digest: sha256:d3c8a32b8ebca04934...
Pulling snuba-replacer         ... status: image is up to date for g...
Pulling snuba-replacer         ... done
Pulling memcached              ... digest: sha256:6627e971255440a1bd...
Pulling memcached              ... status: image is up to date for m...
Pulling memcached              ... done
Pulling post-process-forwarder ... done
Pulling snuba-api              ... pulling from getsentry/snuba
Pulling postgres               ... pulling from library/postgres
Pulling snuba-api              ... digest: sha256:d3c8a32b8ebca04934...
Pulling snuba-api              ... status: image is up to date for g...
Pulling snuba-api              ... done
Pulling kafka                  ... pulling from confluentinc/cp-kafka
Pulling kafka                  ... digest: sha256:c5ff41b494329e9dea...
Pulling kafka                  ... status: image is up to date for c...
Pulling kafka                  ... done
Pulling postgres               ... digest: sha256:446a3cf0803fea88a3...
Pulling postgres               ... status: image is up to date for p...
Pulling postgres               ... done
Pulling snuba-consumer         ... pulling from getsentry/snuba
Pulling snuba-consumer         ... digest: sha256:d3c8a32b8ebca04934...
Pulling snuba-consumer         ... status: image is up to date for g...
Pulling snuba-consumer         ... done
Pulling redis                  ... pulling from library/redis
Pulling smtp                   ... pulling from tianon/exim4
Pulling smtp                   ... digest: sha256:f01923e8154add4b30...
Pulling smtp                   ... status: image is up to date for t...
Pulling smtp                   ... done
Pulling clickhouse             ... pulling from yandex/clickhouse-se...
Pulling clickhouse             ... digest: sha256:9cda4acf02b112f7c1...
Pulling clickhouse             ... status: image is up to date for y...
Pulling clickhouse             ... done
Pulling redis                  ... digest: sha256:cb9783b1c39bb34f8d...
Pulling redis                  ... status: image is up to date for r...
Pulling redis                  ... done
Pulling symbolicator-cleanup   ... done
Pulling zookeeper              ... pulling from confluentinc/cp-zook...
Pulling zookeeper              ... digest: sha256:c63871c17b038e1685...
Pulling zookeeper              ... status: image is up to date for c...
Pulling zookeeper              ... done
Pulling snuba-cleanup          ... done
Pulling worker                 ... done
Pulling cron                   ... done
Some service image(s) must be built from source by running:
    docker-compose build web sentry-cleanup post-process-forwarder symbolicator-cleanup snuba-cleanup worker cron
latest: Pulling from getsentry/sentry
8d691f585fa8: Already exists
3fd6980f9df6: Already exists
c4f890363b98: Already exists
b8cfb9853b0a: Already exists
4da5c0f982c3: Pulling fs layer
12ca7d17c44e: Pulling fs layer
635266aa2359: Pulling fs layer
f5ad0b6b5535: Pulling fs layer
2bf4d2ff07cc: Pulling fs layer
46bdc1030713: Pulling fs layer
0a31359ee5ce: Pulling fs layer
35dd9c6d9fdf: Pulling fs layer
aa7be7ac3ba7: Pulling fs layer
9ecc4b8c80d7: Pulling fs layer
35dd9c6d9fdf: Waiting
9ecc4b8c80d7: Waiting
aa7be7ac3ba7: Waiting
f5ad0b6b5535: Waiting
46bdc1030713: Waiting
0a31359ee5ce: Waiting
2bf4d2ff07cc: Waiting
4da5c0f982c3: Verifying Checksum
4da5c0f982c3: Download complete
635266aa2359: Verifying Checksum
635266aa2359: Download complete
12ca7d17c44e: Verifying Checksum
12ca7d17c44e: Download complete
2bf4d2ff07cc: Verifying Checksum
2bf4d2ff07cc: Download complete
46bdc1030713: Download complete
0a31359ee5ce: Verifying Checksum
0a31359ee5ce: Download complete
35dd9c6d9fdf: Verifying Checksum
35dd9c6d9fdf: Download complete
aa7be7ac3ba7: Verifying Checksum
aa7be7ac3ba7: Download complete
9ecc4b8c80d7: Verifying Checksum
9ecc4b8c80d7: Download complete
f5ad0b6b5535: Verifying Checksum
f5ad0b6b5535: Download complete
4da5c0f982c3: Pull complete
12ca7d17c44e: Pull complete
635266aa2359: Pull complete
f5ad0b6b5535: Pull complete
2bf4d2ff07cc: Pull complete
46bdc1030713: Pull complete
0a31359ee5ce: Pull complete
35dd9c6d9fdf: Pull complete
aa7be7ac3ba7: Pull complete
9ecc4b8c80d7: Pull complete
Digest: sha256:f40d71d816cd797ef0c2e90c4b296dd747b20e500d942f891c9181421068d114
Status: Downloaded newer image for getsentry/sentry:latest
Building web
Step 1/8 : ARG SENTRY_IMAGE
Step 2/8 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> de28dfff7098
Step 3/8 : WORKDIR /usr/src/sentry
 ---> Running in 8cff5f644e0e
Removing intermediate container 8cff5f644e0e
 ---> 2475bf49c417
Step 4/8 : ENV PYTHONPATH /usr/src/sentry
 ---> Running in 6ca5e7e309d0
Removing intermediate container 6ca5e7e309d0
 ---> 8f895b0554db
Step 5/8 : COPY . /usr/src/sentry
 ---> c68921ee135c
Step 6/8 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Running in 58392e4051e3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Removing intermediate container 58392e4051e3
 ---> e815588b54b8
Step 7/8 : RUN if [ -s setup.py ]; then pip install -e .; fi
 ---> Running in 1374d52f43eb
Removing intermediate container 1374d52f43eb
 ---> 4f38ea0e63c7
Step 8/8 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi 	&& if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
 ---> Running in eea3594be2c6
Removing intermediate container eea3594be2c6
 ---> 8bd2f27a8212

Successfully built 8bd2f27a8212
Successfully tagged sentry-onpremise-local:latest
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
snuba-api uses an image, skipping
snuba-consumer uses an image, skipping
snuba-replacer uses an image, skipping
symbolicator uses an image, skipping
Building snuba-cleanup          ... 
Building symbolicator-cleanup   ... 
Building web                    ... 
Building cron                   ... 
Building worker                 ... 
Building post-process-forwarder ... 
Building sentry-cleanup         ... 
Building sentry-cleanup
Building post-process-forwarder
Building cron
Building snuba-cleanup
Building symbolicator-cleanup
Step 1/8 : ARG SENTRY_IMAGE
Step 2/8 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> de28dfff7098
Step 3/8 : WORKDIR /usr/src/sentry
 ---> Using cache
 ---> 2475bf49c417
Step 4/8 : ENV PYTHONPATH /usr/src/sentry
 ---> Using cache
 ---> 8f895b0554db
Step 5/8 : COPY . /usr/src/sentry
 ---> Using cache
 ---> c68921ee135c
Step 6/8 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Using cache
 ---> e815588b54b8
Step 7/8 : RUN if [ -s setup.py ]; then pip install -e .; fi
 ---> Using cache
 ---> 4f38ea0e63c7
Step 8/8 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi 	&& if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
 ---> Using cache
 ---> 8bd2f27a8212

Successfully built 8bd2f27a8212
Step 1/8 : ARG SENTRY_IMAGE
Step 2/8 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Step 1/5 : ARG BASE_IMAGEStep 1/5 : ARG BASE_IMAGE

Step 2/5 : FROM ${BASE_IMAGE}Step 2/5 : FROM ${BASE_IMAGE}

Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
 ---> 8aa085e33145
 ---> de8bf0957f9b
 ---> 8bd2f27a8212
 ---> de28dfff7098
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*Successfully tagged sentry-onpremise-local:latest
Step 3/8 : WORKDIR /usr/src/sentry
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*

Building post-process-forwarder ... done

 ---> Using cache
Building web
 ---> Using cache
 ---> d838d3aba92c
 ---> 2475bf49c417
Step 4/5 : COPY entrypoint.sh /entrypoint.shStep 4/8 : ENV PYTHONPATH /usr/src/sentry

 ---> Using cache
 ---> ce15dcddeed6
 ---> Using cache
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"] ---> 8f895b0554db

Step 5/8 : COPY . /usr/src/sentry ---> Using cache

 ---> 1e7c21973a72

Successfully built 1e7c21973a72
 ---> Using cache
 ---> c68921ee135c
Step 6/8 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Using cache
 ---> e815588b54b8
Step 7/8 : RUN if [ -s setup.py ]; then pip install -e .; fi
 ---> Using cache
 ---> 4f38ea0e63c7
Step 8/8 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi 	&& if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
 ---> Using cache
 ---> 8bd2f27a8212

Successfully built 8bd2f27a8212
Step 1/8 : ARG SENTRY_IMAGE
Step 2/8 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
Successfully tagged symbolicator-cleanup-onpremise-local:latest
 ---> de28dfff7098
Building worker
Building symbolicator-cleanup   ... done
Successfully tagged sentry-onpremise-local:latest
Step 3/8 : WORKDIR /usr/src/sentry
 ---> Using cache
 ---> 2475bf49c417
Step 4/8 : ENV PYTHONPATH /usr/src/sentry
 ---> Using cache
 ---> 8f895b0554db
Building cron                   ... done
Step 5/8 : COPY . /usr/src/sentry
 ---> Using cache
 ---> c68921ee135c
Step 6/8 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Using cache
 ---> e815588b54b8
Step 7/8 : RUN if [ -s setup.py ]; then pip install -e .; fi
 ---> Using cache
 ---> 4f38ea0e63c7
Step 8/8 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi 	&& if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
 ---> Using cache
 ---> 8bd2f27a8212

Successfully built 8bd2f27a8212
Step 1/8 : ARG SENTRY_IMAGE
Step 2/8 : FROM ${SENTRY_IMAGE:-getsentry/sentry:latest}
 ---> de28dfff7098
Step 3/8 : WORKDIR /usr/src/sentry
 ---> Using cache
 ---> 2475bf49c417
Successfully tagged sentry-onpremise-local:latest
Step 4/8 : ENV PYTHONPATH /usr/src/sentry
 ---> Using cache
 ---> 8f895b0554db
Step 5/8 : COPY . /usr/src/sentry
 ---> Using cache
 ---> c68921ee135c
Step 6/8 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
Building web                    ... done
 ---> Using cache
 ---> e815588b54b8
Step 7/8 : RUN if [ -s setup.py ]; then pip install -e .; fi
 ---> Using cache
 ---> 4f38ea0e63c7
Step 8/8 : RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi 	&& if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi
 ---> Using cache
 ---> 8bd2f27a8212

Successfully built 8bd2f27a8212
Successfully tagged sentry-onpremise-local:latest
Building worker                 ... done
 ---> Running in 916a49eaf643
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 Packages [181 kB]
Err:3 http://deb.debian.org/debian buster InRelease
  Connection failed [IP: 151.101.12.204 80]
Get:4 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 303 kB in 60s (5022 B/s)
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Connection failed [IP: 151.101.12.204 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package cron is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'cron' has no installation candidate
Removing intermediate container 916a49eaf643
 ---> Running in cba36b5a4e6e
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [181 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 8332 kB in 32s (262 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  lsb-base sensible-utils
Suggested packages:
  anacron logrotate checksecurity
Recommended packages:
  default-mta | mail-transport-agent
The following NEW packages will be installed:
  cron lsb-base sensible-utils
0 upgraded, 3 newly installed, 0 to remove and 11 not upgraded.
Need to get 143 kB of archives.
After this operation, 383 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 sensible-utils all 0.0.12 [15.8 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 lsb-base all 10.2019051400 [28.4 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 cron amd64 3.0pl1-134+deb10u1 [99.0 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 143 kB in 30s (4763 B/s)
Selecting previously unselected package sensible-utils.
(Reading database ... 11918 files and directories currently installed.)
Preparing to unpack .../sensible-utils_0.0.12_all.deb ...
Unpacking sensible-utils (0.0.12) ...
Selecting previously unselected package lsb-base.
Preparing to unpack .../lsb-base_10.2019051400_all.deb ...
Unpacking lsb-base (10.2019051400) ...
Selecting previously unselected package cron.
Preparing to unpack .../cron_3.0pl1-134+deb10u1_amd64.deb ...
Unpacking cron (3.0pl1-134+deb10u1) ...
Setting up lsb-base (10.2019051400) ...
Setting up sensible-utils (0.0.12) ...
Setting up cron (3.0pl1-134+deb10u1) ...
Adding group `crontab' (GID 101) ...
Done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Removing intermediate container cba36b5a4e6e
 ---> d3a57ed5c91b
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
 ---> a398766c6541
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Running in 75d9d62f66b4
Removing intermediate container 75d9d62f66b4
 ---> c3aec809455e

Successfully built c3aec809455e
Successfully tagged sentry-cleanup-onpremise-local:latest
Building sentry-cleanup         ... done

ERROR: for snuba-cleanup  (<Service: snuba-cleanup>, "The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*' returned a non-zero code: 100")
Service 'snuba-cleanup' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*' returned a non-zero code: 100
Cleaning up...

Well.

W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Connection failed [IP: 151.101.12.204 80]

Is the issue. So still likely a temporary failure.

1 Like