self-hosted
self-hosted copied to clipboard
Fix fresh install of self-hosted for ARM by removing the --platform parameter
Fresh install of self-hosted was throwing an exception here on my M1 macbook pro:
▶ Setting up / migrating database …
...
Container sentry-self-hosted-clickhouse-1 Healthy
Container sentry-self-hosted-kafka-1 Healthy
Container sentry-self-hosted-kafka-1 Healthy
Container sentry-self-hosted-kafka-1 Healthy
Container sentry-self-hosted-redis-1 Healthy
Container sentry-self-hosted-clickhouse-1 Healthy
Container sentry-self-hosted-clickhouse-1 Healthy
Container sentry-self-hosted-clickhouse-1 Healthy
Container sentry-self-hosted-snuba-sessions-consumer-1 Starting
Container sentry-self-hosted-snuba-subscription-consumer-events-1 Starting
Container sentry-self-hosted-snuba-outcomes-consumer-1 Starting
Container sentry-self-hosted-snuba-transactions-consumer-1 Starting
Container sentry-self-hosted-snuba-api-1 Starting
Container sentry-self-hosted-snuba-consumer-1 Starting
Container sentry-self-hosted-snuba-subscription-consumer-transactions-1 Starting
Container sentry-self-hosted-snuba-replacer-1 Starting
Container sentry-self-hosted-snuba-outcomes-consumer-1 Started
Container sentry-self-hosted-snuba-api-1 Started
Container sentry-self-hosted-snuba-subscription-consumer-events-1 Started
Container sentry-self-hosted-snuba-transactions-consumer-1 Started
Container sentry-self-hosted-snuba-subscription-consumer-transactions-1 Started
Container sentry-self-hosted-snuba-sessions-consumer-1 Started
Container sentry-self-hosted-snuba-replacer-1 Started
Container sentry-self-hosted-snuba-consumer-1 Started
Error response from daemon: image with reference sentry-self-hosted-local was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
This is happening in the installation process because certain images are only available for linux/amd64 and the platform parameter here forces us to look for a linux/arm64 image, eventually erroring out. For M1 macs, I don't think we can confidently assume the platform to be linux/arm64 as long as we are running linux/amd64 single arch images. For multi-arch images, docker should automatically pull in the image that matches the current OS and architecture.
Github thread here for more context on a similar scenario: https://github.com/docker/for-linux/issues/1170#issuecomment-784209110
Docker multi-arch support: https://docs.docker.com/desktop/multi-arch/
Follow up on https://github.com/getsentry/self-hosted/pull/1538
certain images are only available for
linux/amd64as long as we are runninglinux/amd64single arch images
Which images? Do we control them or are they third-party or ... ?
Can you link where/why the platform option was added in the first place? What problem was it intended to solve and why are we confident that we're not regressing with this?
For more context, the images that I'm encountering issues with are from snuba, which doesn't support arm64 at the moment.
error stack trace from ethanhs:
▶ Parsing command line ...
▶ Detecting Docker platform
Detected Docker platform is linux/arm64
▶ Initializing Docker Compose ...
▶ Setting up error handling ...
▶ Checking for latest commit ...
▶ Checking minimum requirements ...
Found Docker version 20.10.16
Found Docker Compose version 2.6.0
▶ Turning things off ...
Warning: No resource found to remove for project "sentry-self-hosted".
Warning: No resource found to remove for project "sentry_onpremise".
▶ 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.
▶ Ensuring Relay credentials ...
../relay/config.yml already exists, skipped creation.
../relay/credentials.json already exists, skipped creation.
▶ Generating secret key ...
▶ Replacing TSDB ...
▶ Fetching and updating Docker images ...
nightly: Pulling from getsentry/sentry
Digest: sha256:4c7cb27216d71cd3b75124fa2b8aefbced45dedef1b68195a397c4d5c0818dd5
Status: Image is up to date for getsentry/sentry:nightly
docker.io/getsentry/sentry:nightly
▶ Building and tagging Docker images ...
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/getsentry/sentry:nightly
#3 DONE 1.3s
#4 [internal] load build context
#4 transferring context: 297B done
#4 DONE 0.0s
#5 [1/4] FROM docker.io/getsentry/sentry:nightly@sha256:4c7cb27216d71cd3b75124fa2b8aefbced45dedef1b68195a397c4d5c0818dd5
#5 resolve docker.io/getsentry/sentry:nightly@sha256:4c7cb27216d71cd3b75124fa2b8aefbced45dedef1b68195a397c4d5c0818dd5 done
#5 DONE 0.1s
#6 [2/4] COPY . /usr/src/sentry
#6 DONE 0.0s
#7 [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi
#7 DONE 0.1s
#8 [4/4] RUN if [ -s /usr/src/sentry/requirements.txt ]; then echo "sentry/requirements.txt is deprecated, use sentry/enhance-image.sh - see https://github.com/getsentry/self-hosted#enhance-sentry-image"; pip install -r /usr/src/sentry/requirements.txt; fi
#8 DONE 0.2s
#9 exporting to image
#9 exporting layers 0.0s done
#9 writing image sha256:f85f3f90054e98bb7ae74552d270bc120417764eff3378cd1d290f0414309e62 done
#9 naming to docker.io/library/sentry-self-hosted-local done
#9 DONE 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
#1 [symbolicator-cleanup-self-hosted-local internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [sentry-self-hosted-local internal] load build definition from Dockerfile
#2 transferring dockerfile: 32B done
#2 DONE 0.0s
#3 [snuba-cleanup-self-hosted-local internal] load build definition from Dockerfile
#3 transferring dockerfile: 32B done
#3 DONE 0.0s
#4 [clickhouse-self-hosted-local internal] load build definition from Dockerfile
#4 transferring dockerfile: 31B done
#4 DONE 0.0s
#5 [sentry-cleanup-self-hosted-local internal] load build definition from Dockerfile
#5 transferring dockerfile: 32B done
#5 DONE 0.0s
#6 [sentry-self-hosted-local internal] load .dockerignore
#6 transferring context: 2B done
#6 DONE 0.0s
#7 [sentry-cleanup-self-hosted-local internal] load .dockerignore
#7 transferring context: 2B done
#7 DONE 0.0s
#8 [clickhouse-self-hosted-local internal] load .dockerignore
#8 transferring context: 2B done
#8 DONE 0.0s
#9 [symbolicator-cleanup-self-hosted-local internal] load .dockerignore
#9 transferring context: 2B done
#9 DONE 0.0s
#10 [snuba-cleanup-self-hosted-local internal] load .dockerignore
#10 transferring context: 2B done
#10 DONE 0.0s
#11 [symbolicator-cleanup-self-hosted-local internal] load metadata for docker.io/getsentry/symbolicator:nightly
#11 ...
#12 [clickhouse-self-hosted-local internal] load metadata for docker.io/altinity/clickhouse-server:21.6.1.6734-testing-arm
#12 DONE 0.0s
#13 [clickhouse-self-hosted-local 1/1] FROM docker.io/altinity/clickhouse-server:21.6.1.6734-testing-arm
#13 CACHED
#14 [clickhouse-self-hosted-local] exporting to image
#14 exporting layers done
#14 writing image sha256:74114ee4566dcca9906a2d4442990eef4af07d3c7f973f46d0ea605503dadce2 done
#14 naming to docker.io/library/clickhouse-self-hosted-local done
#14 DONE 0.0s
#15 [sentry-self-hosted-local internal] load metadata for docker.io/getsentry/sentry:nightly
#15 DONE 0.2s
#16 [sentry-self-hosted-local 1/4] FROM docker.io/getsentry/sentry:nightly@sha256:4c7cb27216d71cd3b75124fa2b8aefbced45dedef1b68195a397c4d5c0818dd5
#16 DONE 0.0s
#17 [sentry-self-hosted-local internal] load build context
#17 transferring context: 297B done
#17 DONE 0.0s
#18 [sentry-self-hosted-local 3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi
#18 CACHED
#19 [sentry-self-hosted-local 2/4] COPY . /usr/src/sentry
#19 CACHED
#20 [sentry-self-hosted-local 4/4] RUN if [ -s /usr/src/sentry/requirements.txt ]; then echo "sentry/requirements.txt is deprecated, use sentry/enhance-image.sh - see https://github.com/getsentry/self-hosted#enhance-sentry-image"; pip install -r /usr/src/sentry/requirements.txt; fi
#20 CACHED
#14 [sentry-self-hosted-local] exporting to image
#14 exporting layers done
#14 writing image sha256:f85f3f90054e98bb7ae74552d270bc120417764eff3378cd1d290f0414309e62 done
#14 naming to docker.io/library/sentry-self-hosted-local done
#14 DONE 0.0s
#21 [snuba-cleanup-self-hosted-local internal] load metadata for docker.io/getsentry/snuba:nightly
#21 CANCELED
#22 [sentry-cleanup-self-hosted-local internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#22 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
#11 [symbolicator-cleanup-self-hosted-local internal] load metadata for docker.io/getsentry/symbolicator:nightly
#11 CANCELED
------
> [sentry-cleanup-self-hosted-local internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
An error occurred, caught SIGERR on line 7
Cleaning up..
I ran this in a clean clone and got:
------
> [sentry-cleanup-self-hosted-local internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
An error occurred, caught SIGERR on line 7
Cleaning up...
https://gist.github.com/chadwhitacre/27c0fc14b082e2a769a167113a092081
noting that there is a PR here to build an arm64 image for sentry that may help
https://github.com/getsentry/sentry/pull/38180
This pull request has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Note from @hubertdeng123 ... this does propagate into our self-hosted dogfood instance, so we can see if others are hitting this.
note here: I'm using M1 Max and others are using M1 Pro