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.89k stars 1.77k forks source link

Project setup > failed to solve: sentry-self-hosted-local: pull access denied #2641

Closed joechron closed 5 months ago

joechron commented 11 months ago

Self-Hosted Version

21.7.0

CPU Architecture

x86_64

Docker Version

20.10.24

Docker Compose Version

2.17.2

Steps to Reproduce

  1. Clone repo to local directory
  2. run ./install.sh --skip-user-creation
  3. Receive error:
#2 [internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#2 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: sentry-self-hosted-local: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Error in install/build-docker-images.sh:8.
'$dcb --force-rm "$service"' exited with status 17
-> ./install.sh:main:29
--> install/build-docker-images.sh:source:8

Expected Result

I expect to be able to get sentry running locally by following the readme steps.

Actual Result

#2 [internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#2 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: sentry-self-hosted-local: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Error in install/build-docker-images.sh:8.
'$dcb --force-rm "$service"' exited with status 17
-> ./install.sh:main:29
--> install/build-docker-images.sh:source:8

Event ID

No response

azaslavsky commented 11 months ago

Authorization issues like this are almost always caused by local network, firewall, or security configurations. This test runs okay on our CI, which implies that barring any interferences, we're able to pull with no problems in the general case.

getsantry[bot] commented 10 months ago

This issue 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 remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

xunjianxiang commented 10 months ago

I have the same issue~~ don't know how to fix it image

itDjango commented 10 months ago

I also encountered the same problem and tried many methods, but still couldn't solve it

azaslavsky commented 10 months ago

Curious if the solution this user tried will help in your case: https://github.com/getsentry/self-hosted/issues/2563.

joechron commented 10 months ago

Curious if the solution this user tried will help in your case: #2563.

@azaslavsky No, it did not. That is a different issue.

itDjango commented 10 months ago

Curious if the solution this user tried will help in your case: #2563.

image

I hope someone has solved this problem and I can learn from it. Thank you

azaslavsky commented 10 months ago

So another issue that could cause this is an OOM - either docker ran out of allocated memory, or your VM that's hosting it did. Not guaranteed that this is the root cause, but this is often what happens when you get an unexpected EOF while pulling down the (very large) dependencies. Can you monitor memory while running the script?

azaslavsky commented 10 months ago

Also, can you try this advice: https://github.com/getsentry/self-hosted/issues/2691#issuecomment-1886596255

getsantry[bot] commented 9 months ago

This issue 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 remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

ZsBT commented 9 months ago

Same here, it says

#2 [sentry-cleanup internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#2 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [sentry-cleanup internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: sentry-self-hosted-local: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Error in install/build-docker-images.sh:9.
'$dcb --force-rm "$service"' exited with status 17
-> ./install.sh:main:29
--> install/build-docker-images.sh:source:9

Docker version 25.0.2, build 29cf629

No network issues, my VPS has direct internet access.

azaslavsky commented 9 months ago

Does this approach help? https://github.com/getsentry/self-hosted/issues/2557#issuecomment-1824711505

ZsBT commented 9 months ago

Yes @azaslavsky , thank you for the hint. However, I'd like to stick to the buildkit, so I'll wait for a stable release.

getsantry[bot] commented 8 months ago

This issue 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 remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

ZsBT commented 8 months ago

I'm afraid the waiting for community tag should be removed, as an undocumented workaround is not enough for making the build work. Also, as buildkit will be mandatory soon, the repo should be fixed to support it. Opinions?

azaslavsky commented 8 months ago

We'll think about what to do here. Especially with buildkit becoming mandatory, this is probably something we'll need to lok at further. I don't immediately have a good reason why buildkit would cause this to fail...

pquerner commented 6 months ago

I'm also affected.

export DOCKER_BUILDKIT=0 does not work for me.

Docker version 26.1.1, build 4cf5afa
Linux 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

I'm trying to run 24.4.2 but it also fails (with a previously successful running) with 23.11.0. I've no changes in the .env file nor docker-compose.yml file (or any other file) and only switch to a different tag to upgrade/start/install.

$ git status
HEAD detached at 24.4.2
nothing to commit, working tree clean

(ran bash ./install.sh)

$ docker compose up
[+] Running 24/24
 ! ingest-profiles Warning                       pull access denied for sentry-self-hosted-local, repository does not exist or may req...                          1.3s
 ! generic-metrics-consumer Warning              pull access denied for sentry-self-hosted-local, repository does not exist o...                                   1.3s
 ! events-consumer Warning                       pull access denied for sentry-self-hosted-local, repository does not exist or may req...                          1.3s
 ! billing-metrics-consumer Warning              pull access denied for sentry-self-hosted-local, repository does not exist o...                                   1.3s
 ! post-process-forwarder-issue-platform Warning pull access denied for sentry-self-hosted-local, repository doe...                                                1.3s
 ! sentry-cleanup Warning                        pull access denied for sentry-cleanup-self-hosted-local, repository does not exist or ...                         1.4s
 ! clickhouse Warning                            pull access denied for clickhouse-self-hosted-local, repository does not exist or may requ...                     1.3s
 ! ingest-monitors Warning                       pull access denied for sentry-self-hosted-local, repository does not exist or may req...                          1.3s
 ! attachments-consumer Warning                  pull access denied for sentry-self-hosted-local, repository does not exist or ma...                               1.3s
 ! ingest-replay-recordings Warning              pull access denied for sentry-self-hosted-local, repository does not exist o...                                   1.3s
 ! transactions-consumer Warning                 pull access denied for sentry-self-hosted-local, repository does not exist or m...                                1.3s
 ! post-process-forwarder-errors Warning         pull access denied for sentry-self-hosted-local, repository does not ex...                                        1.3s
 ! subscription-consumer-generic-metrics Warning pull access denied for sentry-self-hosted-local, repository doe...                                                1.3s
 ! worker Warning                                pull access denied for sentry-self-hosted-local, repository does not exist or may require 'doc...                 1.3s
 ! symbolicator-cleanup Warning                  pull access denied for symbolicator-cleanup-self-hosted-local, repository does n...                               1.3s
 ! vroom-cleanup Warning                         pull access denied for vroom-cleanup-self-hosted-local, repository does not exist or ma...                        1.4s
 ! cron Warning                                  pull access denied for sentry-self-hosted-local, repository does not exist or may require 'docke...               1.6s
 ! post-process-forwarder-transactions Warning   pull access denied for sentry-self-hosted-local, repository does ...                                              1.3s
 ! subscription-consumer-transactions Warning    pull access denied for sentry-self-hosted-local, repository does n...                                             1.3s
 ! ingest-occurrences Warning                    pull access denied for sentry-self-hosted-local, repository does not exist or may ...                             1.4s
 ! subscription-consumer-metrics Warning         pull access denied for sentry-self-hosted-local, repository does not ex...                                        1.3s
 ! web Warning                                   pull access denied for sentry-self-hosted-local, repository does not exist or may require 'docker...              1.3s
 ! metrics-consumer Warning                      pull access denied for sentry-self-hosted-local, repository does not exist or may re...                           1.3s
 ! subscription-consumer-events Warning          pull access denied for sentry-self-hosted-local, repository does not exi...                                       1.3s
Sending build context to Docker daemon     756B
Sending build context to Docker daemon     756B
Sending build context to Docker daemon     697B
Step 1/3 : ARG BASE_IMAGE
Step 2/3 : FROM ${BASE_IMAGE}
base name (${BASE_IMAGE}) should not be blank
$ bash ./install.sh
â–¶ Parsing command line ...

â–¶ Detecting Docker platform
Detected Docker platform is linux/amd64

â–¶ Initializing Docker Compose ...

â–¶ Setting up error handling ...
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
            environment-variable.

Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM debian:bookworm-slim
bookworm-slim: Pulling from library/debian
b0a0cf830b12: Already exists
Digest: sha256:155280b00ee0133250f7159b567a07d7cd03b1645714c3a7458b2287b0ca83cb
Status: Downloaded newer image for debian:bookworm-slim
 ---> d5f1e9a5dd4f
Step 2/4 : LABEL MAINTAINER="oss@sentry.io"
 ---> Running in 6d25796b46ca
 ---> Removed intermediate container 6d25796b46ca
 ---> 0b541c81d7cf
Step 3/4 : RUN set -x   && apt-get update   && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq   && apt-get clean   && rm -rf /var/lib/apt/lists/*
 ---> Running in faca26e9c90b
+ apt-get update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8786 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [157 kB]
Fetched 9212 kB in 2s (5743 kB/s)
Reading package lists...
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libjq1 libonig5
The following NEW packages will be installed:
  jq libjq1 libonig5
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 388 kB of archives.
After this operation, 1165 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libonig5 amd64 6.9.8-1 [188 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libjq1 amd64 1.6-2.1 [135 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 jq amd64 1.6-2.1 [64.9 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 388 kB in 0s (6139 kB/s)
Selecting previously unselected package libonig5:amd64.
(Reading database ... 6090 files and directories currently installed.)
Preparing to unpack .../libonig5_6.9.8-1_amd64.deb ...
Unpacking libonig5:amd64 (6.9.8-1) ...
Selecting previously unselected package libjq1:amd64.
Preparing to unpack .../libjq1_1.6-2.1_amd64.deb ...
Unpacking libjq1:amd64 (1.6-2.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../archives/jq_1.6-2.1_amd64.deb ...
Unpacking jq (1.6-2.1) ...
Setting up libonig5:amd64 (6.9.8-1) ...
Setting up libjq1:amd64 (1.6-2.1) ...
Setting up jq (1.6-2.1) ...
Processing triggers for libc-bin (2.36-9+deb12u6) ...
+ apt-get clean
+ rm -rf /var/lib/apt/lists/auxfiles /var/lib/apt/lists/deb.debian.org_debian-security_dists_bookworm-security_InRelease /var/lib/apt/lists/deb.debian.org_debian-security_dists_bookworm-security_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-updates_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-updates_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/lock /var/lib/apt/lists/partial
 ---> Removed intermediate container faca26e9c90b
 ---> 471978b3a6c1
Step 4/4 : ENTRYPOINT ["jq"]
 ---> Running in b0a47ac743dd
 ---> Removed intermediate container b0a47ac743dd
 ---> 434b192d1b2a
Successfully built 434b192d1b2a
Successfully tagged sentry-self-hosted-jq-local:latest

Hey, so ... we would love to automatically find out about issues with your
Sentry instance so that we can improve the product. Turns out there is an app
for that, called Sentry. Would you be willing to let us automatically send data
about your instance upstream to Sentry for development and debugging purposes?

  y / yes / 1
  n / no / 0

(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,
so that we can be in this together.)

Here's the info we may collect:

  - OS username
  - IP address
  - install log
  - runtime errors
  - performance data

Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy.

y or n? n

Understood. To avoid this prompt in the future, use one of these flags:

  --report-self-hosted-issues
  --no-report-self-hosted-issues

or set the REPORT_SELF_HOSTED_ISSUES environment variable:

  REPORT_SELF_HOSTED_ISSUES=1 to send data
  REPORT_SELF_HOSTED_ISSUES=0 to not send data

â–¶ Checking for latest commit ...
skipped

â–¶ Checking minimum requirements ...
Found Docker version 26.1.1
Found Docker Compose version 2.27.0

â–¶ Turning things off ...

â–¶ 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.

â–¶ Checking memcached backend ...
MemcachedCache found in sentry/sentry.conf.py, you should switch to PyMemcacheCache.
See:
  https://develop.sentry.dev/self-hosted/releases/#breaking-changes
$ free
               total        used        free      shared  buff/cache   available
Mem:        30798284     9934104    18252696      393996     2611484    20068840
Swap:              0           0           0
azaslavsky commented 6 months ago

Curious what happens if you run docker compose build before running the install.sh script.

pquerner commented 6 months ago
$ docker compose build
[+] Building 0.2s (11/19)                                                                                                                                docker:default
 => [vroom-cleanup internal] load build definition from Dockerfile                                                                                                 0.1s
 => => transferring dockerfile: 469B                                                                                                                               0.0s
 => [symbolicator-cleanup internal] load build definition from Dockerfile                                                                                          0.0s
 => => transferring dockerfile: 469B                                                                                                                               0.0s
 => [clickhouse internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 71B                                                                                                                                0.0s
 => [symbolicator-cleanup internal] load metadata for docker.io/getsentry/symbolicator:24.4.2                                                                      0.0s
 => [vroom-cleanup internal] load metadata for docker.io/getsentry/vroom:24.4.2                                                                                    0.0s
 => [vroom-cleanup internal] load .dockerignore                                                                                                                    0.1s
 => => transferring context: 2B                                                                                                                                    0.0s
 => [symbolicator-cleanup internal] load .dockerignore                                                                                                             0.1s
 => => transferring context: 2B                                                                                                                                    0.0s
 => [vroom-cleanup internal] load build context                                                                                                                    0.0s
 => => transferring context: 35B                                                                                                                                   0.0s
 => [vroom-cleanup 1/5] FROM docker.io/getsentry/vroom:24.4.2                                                                                                      0.0s
 => CANCELED [symbolicator-cleanup internal] load build context                                                                                                    0.0s
 => => transferring context:                                                                                                                                       0.0s
 => [symbolicator-cleanup 1/5] FROM docker.io/getsentry/symbolicator:24.4.2                                                                                        0.0s
failed to solve: base name (${BASE_IMAGE}) should not be blank
$ docker compose --verbose build
TRAC[0000] Docker Desktop integration not enabled
DEBU[0000] using default config store "/root/.docker/buildx"
[+] Building 0.1s (4/4) FINISHED                                                                                                                         docker:default
 => [clickhouse internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 71B                                                                                                                                0.0s
 => [vroom-cleanup internal] load build definition from Dockerfile                                                                                                 0.0s
 => => transferring dockerfile: 469B                                                                                                                               0.0s
 => [vroom-cleanup internal] load metadata for docker.io/getsentry/vroom:24.4.2                                                                                    0.0s
 => CANCELED [vroom-cleanup internal] load .dockerignore                                                                                                           0.0s
DEBU[0000] using default config store "/root/.docker/buildx"
DEBU[0000] using default config store "/root/.docker/buildx"
DEBU[0000] using default config store "/root/.docker/buildx"
DEBU[0000] serving grpc connection
DEBU[0000] stopping session                              span="load buildkit capabilities"
DEBU[0000] serving grpc connection
DEBU[0000] stopping session                              span="load buildkit capabilities"
DEBU[0000] serving grpc connection
DEBU[0000] stopping session                              span="load buildkit capabilities"
DEBU[0000] serving grpc connection
DEBU[0000] stopping session
DEBU[0000] serving grpc connection
DEBU[0000] stopping session
DEBU[0000] serving grpc connection
DEBU[0000] stopping session
DEBU[0000] serving grpc connection
DEBU[0000] serving grpc connection
DEBU[0000] stopping session
DEBU[0000] stopping session
failed to solve: base name (${BASE_IMAGE}) should not be blank
azaslavsky commented 6 months ago

Hmmm, yeah, that makes sense. I'm really not sure what could be happening - we're unable to replicate this on any of our local instances.

pquerner commented 6 months ago

Okay, thanks for looking at it anyways. I'll try to replicate on other hardware. (Just wierd that its happening all of the sudden. Maybe some wierd docker update...)

pquerner commented 6 months ago

I deleted my old folder (no git changes) and git clone a fresh one. Same directory name. Then install.sh, then docker compose up and now its working..

not sure why.. git detected no changes. mh..

getsantry[bot] commented 5 months ago

This issue 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 remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀