getsentry / self-hosted

Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept
https://develop.sentry.dev/self-hosted/
Other
7.87k stars 1.77k forks source link

Document `reset.sh` and `docker prune` in the troubleshooting guide #1155

Open MWeesenaar opened 2 years ago

MWeesenaar commented 2 years ago

Version

21.11.0

Steps to Reproduce

  1. Download the latest release as described in the self-hosted documentation - which is at moment of writing: 21.11.0
  2. Unzip the package
  3. Run ./install.sh

(sorry that I cannot provide more information for reproduction rather than this.. :-) )

Versions used: docker --version: Docker version 20.10.10, build b485636 docker-compose --version: Docker Compose version v2.1.1 MacOS version: 12.0.1 (21A559)

docker images | grep -i sentry 
REPOSITORY                 TAG             IMAGE ID       CREATED         SIZE
getsentry/sentry           21.11.0         9e2f865efab0   2 days ago      939MB
getsentry/relay            21.11.0         bce2d9faf0cd   2 days ago      213MB
getsentry/snuba            21.11.0         3e4bbdd3643c   2 days ago      464MB

Expected Result

I expected the Docker images to be built.

Actual Result

#9 [snuba-cleanup-onpremise-local 2/3] RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
#9 sha256:422bbbeb8161f25e13c7c48b129087a0c14a41b364c36cfff46f8b274eddc912
#9 ...

#13 [sentry-cleanup-onpremise-local 1/3] FROM docker.io/getsentry/sentry:21.11.0
#13 sha256:6d8d6daa3f16d9805a81eabb73e250f94e308213d6538ac283de014153b589dd
#13 DONE 1.4s

#14 [sentry-cleanup-onpremise-local 2/3] RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
#14 sha256:f7838f839c9f2454c52fccbd20952352830d034e7038418e96c2c611e1808d61
#14 0.496 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
#14 0.498 Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
#14 0.518 Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
#14 0.604 Err:2 http://security.debian.org/debian-security buster/updates InRelease
#14 0.604   At least one invalid signature was encountered.
#14 0.682 Err:1 http://deb.debian.org/debian buster InRelease
#14 0.682   At least one invalid signature was encountered.
#14 0.798 Err:3 http://deb.debian.org/debian buster-updates InRelease
#14 0.798   At least one invalid signature was encountered.
#14 0.812 Reading package lists...
#14 0.832 W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
#14 0.832 E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
#14 0.832 W: GPG error: http://deb.debian.org/debian buster InRelease: At least one invalid signature was encountered.
#14 0.832 E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
#14 0.832 W: GPG error: http://deb.debian.org/debian buster-updates InRelease: At least one invalid signature was encountered.
#14 0.832 E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
#14 ERROR: executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*]: exit code: 100

#9 [snuba-cleanup-onpremise-local 2/3] RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
#9 sha256:422bbbeb8161f25e13c7c48b129087a0c14a41b364c36cfff46f8b274eddc912
#9 0.693 Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
#9 0.711 Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
#9 0.715 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
#9 0.798 Err:1 http://security.debian.org/debian-security bullseye-security InRelease
#9 0.798   At least one invalid signature was encountered.
#9 0.876 Err:2 http://deb.debian.org/debian bullseye InRelease
#9 0.876   At least one invalid signature was encountered.
#9 0.944 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#9 0.944   At least one invalid signature was encountered.
#9 0.952 Reading package lists...
#9 0.965 W: GPG error: http://security.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered.
#9 0.965 E: The repository 'http://security.debian.org/debian-security bullseye-security InRelease' is not signed.
#9 0.965 W: GPG error: http://deb.debian.org/debian bullseye InRelease: At least one invalid signature was encountered.
#9 0.965 E: The repository 'http://deb.debian.org/debian bullseye InRelease' is not signed.
#9 0.965 W: GPG error: http://deb.debian.org/debian bullseye-updates InRelease: At least one invalid signature was encountered.
#9 0.965 E: The repository 'http://deb.debian.org/debian bullseye-updates InRelease' is not signed.
#9 ERROR: executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*]: exit code: 100
#17 [symbolicator-cleanup-onpremise-local internal] load metadata for docker.io/getsentry/symbolicator:0.4.0
#17 sha256:8ae33edb12efccbc8f7900a4de18ebcbc4047dc4b3e0a071a340ec7f95d1ed15
#17 CANCELED
------
 > [snuba-cleanup-onpremise-local 2/3] RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*:
------
------
 > [sentry-cleanup-onpremise-local 2/3] RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*:
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*]: exit code: 100
An error occurred, caught SIGERR on line 4
Cleaning up...

18-11-2021 13:38CET: Added partial/relevant output for docker images

chadwhitacre commented 2 years ago

Seeing cron, symbolicator ... Is this possibly related to https://github.com/getsentry/onpremise/issues/1128?

MWeesenaar commented 2 years ago

Thanks for that link, @chadwhitacre . I dug a bit deeper into what that issue is referring to and what has changed. Since I use my Macbook quite heavily for development, I cleared my whole Docker environment ( docker system prune -a ) and ran ./install.sh again. It actually got further now, indicating that there might have been an older version of one of the underlying images.

I can atleast start using Sentry now 😛

Maybe a suggestion for a more permanent solution might be to use Docker build flags like --pull and/or --no-cache?

aminvakil commented 2 years ago

Maybe a suggestion for a more permanent solution might be to use Docker build flags like --pull and/or --no-cache?

That would lead to other issues IMHO, when users for any reason want to use their images cache, or want to build sentry in an environment with restricted network or something else.

Also I can't recall seeing these arguments in documentation of other services as well.

chadwhitacre commented 2 years ago

I can at least start using Sentry now 😛

That's progress. :-)

Maybe a suggestion for a more permanent solution might be to use Docker build flags like --pull and/or --no-cache?

I would want to understand the problem we're trying to solve more clearly before committing to this. If the problem is "I'm trying to install self-hosted Sentry in a high-churn development environment but running afoul of an inconsistent state," then I think we already have the reset.sh script as a solution. docker system prune -a also seems reasonable to me to expect one to run.

ghost commented 2 years ago

Seeing the reset.sh script, I do not think that might have solved my problem, since I had the stated problem and its related log/problems from attempt 1. Cleaner, as from a Sentry point of view, state was not possible.

Maybe it is sufficient to close this ticket without an application change, and add a few lines in the troubleshooting guide. Reproducing might be harder than I anticipated at first and the problem might have been environmentally-related, after all.

chadwhitacre commented 2 years ago

Sounds good. Maybe a sentence at the beginning of "Other"?