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

Why does docker-compose up-d report errors pull access denied for sentry-cleanup-self-hosted-local, repository does not exist or may require 'docker login': denied: requested access to the resource i…?? #3036

Closed chenqiang915 closed 2 months ago

chenqiang915 commented 6 months ago

Environment

SaaS (https://sentry.io/)

What are you trying to accomplish?

Normal download image installation

How are you getting stuck?

20240509-170528

Where in the product are you?

Unknown

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 6 months ago

Assigning to @getsentry/support for routing ⏲️

chenqiang915 commented 6 months ago

version 24.4.2

chenqiang915 commented 6 months ago

WX20240510-133044@2x I according to the https://develop.sentry.dev/self-hosted/ provides the method of operation, carry out docker - compose up - d report to pull the mirror

aldy505 commented 6 months ago

Hello, a few questions:

  1. Did you do sudo ./install.sh and sudo docker compose up -d in order? Or did you just do docker compose up -d?
  2. Assuming you're from China, do you happen to access Docker Hub through some sort of proxy? If yes, can you pull each of the Docker images beforehand, and disables the proxy after everything's pulled? Should be:

    images=(
     "getsentry/sentry:24.4.2"
     "getsentry/snuba:24.4.2"
     "getsentry/relay:24.4.2"
     "getsentry/symbolicator:24.4.2"
     "getsentry/vroom:24.4.2"
     "tianon/exim4"
     "memcached:1.6.26-alpine"
     "redis:6.2.14-alpine"
     "postgres:14.11-alpine"
     "confluentinc/cp-zookeeper:7.6.1"
     "confluentinc/cp-kafka:7.6.1"
     "altinity/clickhouse-server:21.8.13.1.altinitystable"
     "ghcr.io/maxmind/geoipupdate:v6.1.0"
     "busybox"
     "getsentry/sentry-cli"
     "jq"
    )
    for i in "${images[@]}"; do
     sudo docker pull "$i"
    done
    
    # Then run `sudo ./install.sh` and `sudo docker compose up -d` after that.

    I don't know how you'd be able to enable/disable your proxy. You'll have to figure that out on your own.

chenqiang915 commented 6 months ago

您好,请教几个问题:

  1. 你按顺序做了sudo ./install.shsudo docker compose up -d?还是你刚刚做了docker compose up -d
  2. 假设您来自中国,您是否碰巧通过某种代理访问 Docker Hub?如果是,您可以预先拉取每个 Docker 映像,并在拉取所有内容后取消代理吗?应该:

    images=(
     "getsentry/sentry:24.4.2"
     "getsentry/snuba:24.4.2"
     "getsentry/relay:24.4.2"
     "getsentry/symbolicator:24.4.2"
     "getsentry/vroom:24.4.2"
     "tianon/exim4"
     "memcached:1.6.26-alpine"
     "redis:6.2.14-alpine"
     "postgres:14.11-alpine"
     "confluentinc/cp-zookeeper:7.6.1"
     "confluentinc/cp-kafka:7.6.1"
     "altinity/clickhouse-server:21.8.13.1.altinitystable"
     "ghcr.io/maxmind/geoipupdate:v6.1.0"
     "busybox"
     "getsentry/sentry-cli"
     "jq"
    )
    for i in "${images[@]}"; do
     sudo docker pull "$i"
    done
    
    # Then run `sudo ./install.sh` and `sudo docker compose up -d` after that.

    我不知道你如何启用/取消代理。你必须自己解决这个问题。

I executed it in the following order sudo ./install.sh sudo docker compose up -d

chenqiang915 commented 6 months ago

您好,请教几个问题:

  1. 你按顺序做了sudo ./install.shsudo docker compose up -d?还是你刚刚做了docker compose up -d
  2. 假设您来自中国,您是否碰巧通过某种代理访问 Docker Hub?如果是,您可以预先拉取每个 Docker 映像,并在拉取所有内容后取消代理吗?应该:

    images=(
     "getsentry/sentry:24.4.2"
     "getsentry/snuba:24.4.2"
     "getsentry/relay:24.4.2"
     "getsentry/symbolicator:24.4.2"
     "getsentry/vroom:24.4.2"
     "tianon/exim4"
     "memcached:1.6.26-alpine"
     "redis:6.2.14-alpine"
     "postgres:14.11-alpine"
     "confluentinc/cp-zookeeper:7.6.1"
     "confluentinc/cp-kafka:7.6.1"
     "altinity/clickhouse-server:21.8.13.1.altinitystable"
     "ghcr.io/maxmind/geoipupdate:v6.1.0"
     "busybox"
     "getsentry/sentry-cli"
     "jq"
    )
    for i in "${images[@]}"; do
     sudo docker pull "$i"
    done
    
    # Then run `sudo ./install.sh` and `sudo docker compose up -d` after that.

    我不知道你如何启用/取消代理。你必须自己解决这个问题。

* I am from China, similar to this configuration BASE_IMAGE recognition seems to have a problem, the default pull vroom-cleanup-self-hosted-local, but in fact docker.hub does not have this mirroring, so directly reported pull access is rejected, vroom-cleanup-self-hosted-local, the repository does not exist or may need'docker login ': Rejected: The requested resource is, and I am sure to execute docker pull getsentry/vroom: 24.4.2 can pull successfully, I did not open the proxy

aldy505 commented 6 months ago

Similar to this configuration BASE_IMAGE not recognized, default to pull the vroom-cleanup-self-hosted-local, but in fact docker.hub does not have this mirroring, so directly report pull access denied for vroom-cleanup-self-hosted-local, repository does not exist or may require'docker login ': denied: requested access to the resource is

Yes, some of the containers should be built by the Dockerfile provided on each directory. All you need to do is just pull the base image as I've listed before. After you pull every of those Docker image, you should disable your Docker proxy mirroring in order for your server not to pull new images from the Docker mirror.

chenqiang915 commented 6 months ago

Similar to this configuration BASE_IMAGE not recognized, default to pull the vroom-cleanup-self-hosted-local, but in fact docker.hub does not have this mirroring, so directly report pull access denied for vroom-cleanup-self-hosted-local, repository does not exist or may require'docker login ': denied: requested access to the resource is

Yes, some of the containers should be built by the Dockerfile provided on each directory. All you need to do is just pull the base image as I've listed before. After you pull every of those Docker image, you should disable your Docker proxy mirroring in order for your server not to pull new images from the Docker mirror.

My/etc/docker/daemon.json only has the following content, and no docker proxy is configured { "data-root": "/data/docker" }

chenqiang915 commented 6 months ago

Hello, a few questions:

  1. Did you do sudo ./install.sh and sudo docker compose up -d in order? Or did you just do docker compose up -d?
  2. Assuming you're from China, do you happen to access Docker Hub through some sort of proxy? If yes, can you pull each of the Docker images beforehand, and disables the proxy after everything's pulled? Should be:

    images=(
     "getsentry/sentry:24.4.2"
     "getsentry/snuba:24.4.2"
     "getsentry/relay:24.4.2"
     "getsentry/symbolicator:24.4.2"
     "getsentry/vroom:24.4.2"
     "tianon/exim4"
     "memcached:1.6.26-alpine"
     "redis:6.2.14-alpine"
     "postgres:14.11-alpine"
     "confluentinc/cp-zookeeper:7.6.1"
     "confluentinc/cp-kafka:7.6.1"
     "altinity/clickhouse-server:21.8.13.1.altinitystable"
     "ghcr.io/maxmind/geoipupdate:v6.1.0"
     "busybox"
     "getsentry/sentry-cli"
     "jq"
    )
    for i in "${images[@]}"; do
     sudo docker pull "$i"
    done
    
    # Then run `sudo ./install.sh` and `sudo docker compose up -d` after that.

    I don't know how you'd be able to enable/disable your proxy. You'll have to figure that out on your own.

I seem to have solved this problem. My local environment umask is 027, which causes the directory permissions of my git clone code file to be incorrect. I feel your reply

aldy505 commented 6 months ago

So.. did the installation process finished successfully?

chenqiang915 commented 6 months ago

那么..安装过程成功完成了吗?

The test host was successful, and I am ready to try it in production.

ngudbhav commented 6 months ago

We are also facing this issue.

We are running Sentry on Elastic Beanstalk, and the thing is we cannot configure much of the behaviour of the Docker platform. Even if I use ./install.sh, EB will still remove the already built images and then run docker compose up -d which will try to pull everything again. Now the issue for us is intermittent. If it fails once, I run docker image prune and then restart the deployment only to see it succeed.

aldy505 commented 6 months ago

We are also facing this issue.

We are running Sentry on Elastic Beanstalk, and the thing is we cannot configure much of the behaviour of the Docker platform. Even if I use ./install.sh, EB will still remove the already built images and then run docker compose up -d which will try to pull everything again. Now the issue for us is intermittent. If it fails once, I run docker image prune and then restart the deployment only to see it succeed.

@ngudbhav I don't think that's something we can help either. The self-hosted sentry is aimed for a plain old VM with regular Docker installed.

pquerner commented 6 months ago

Duplicate of #2641

(I am also facing the issue)

The script with pulling the images almost worked:

24.4.2: Pulling from getsentry/sentry
8a1e25ce7c4f: Already exists
1103112ebfc4: Already exists
b4b80ef7128d: Already exists
cc7f04ac52f8: Already exists
87b8bf94a2ac: Already exists
cf2abe2be582: Pull complete
623802d8e606: Pull complete
9ff5aa5bd2e0: Pull complete
2b01977a7b2b: Pull complete
37656909de38: Pull complete
37acdab7acb6: Pull complete
3db6a601b668: Pull complete
3ebebcc7228f: Pull complete
37a4e641149f: Pull complete
Digest: sha256:a6c517727d47934735acb58a4b909a0c0b8d90cba7fc89d0ae282a15515dff79
Status: Downloaded newer image for getsentry/sentry:24.4.2
docker.io/getsentry/sentry:24.4.2
24.4.2: Pulling from getsentry/snuba
Digest: sha256:9db46467347c748d7bb0945f25b888583855beae8d4afb800af5808313bb2630
Status: Image is up to date for getsentry/snuba:24.4.2
docker.io/getsentry/snuba:24.4.2
24.4.2: Pulling from getsentry/relay
Digest: sha256:97b0946ed0ecd879ea1cc18ae524be44f12af0e131d9eaa4799f18f1a126b381
Status: Image is up to date for getsentry/relay:24.4.2
docker.io/getsentry/relay:24.4.2
24.4.2: Pulling from getsentry/symbolicator
Digest: sha256:ca06ec716690b0f274c6aaa35d46cf2a2d15bf60d5efa218e93df46985e0a616
Status: Image is up to date for getsentry/symbolicator:24.4.2
docker.io/getsentry/symbolicator:24.4.2
24.4.2: Pulling from getsentry/vroom
Digest: sha256:731114e6bdcc63cd216de1af7d701b6c61890cd955e632a9bc5d9946ac33980b
Status: Image is up to date for getsentry/vroom:24.4.2
docker.io/getsentry/vroom:24.4.2
Using default tag: latest
latest: Pulling from tianon/exim4
Digest: sha256:3d48570bf9fe46fb8921983a61599dfeb49774d4a474856faa372c476e014fdd
Status: Image is up to date for tianon/exim4:latest
docker.io/tianon/exim4:latest
1.6.26-alpine: Pulling from library/memcached
Digest: sha256:8906e7654a202d07e6b1bd6a1382b309e718feb9084987c365337ec8161ccaab
Status: Image is up to date for memcached:1.6.26-alpine
docker.io/library/memcached:1.6.26-alpine
6.2.14-alpine: Pulling from library/redis
Digest: sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
Status: Image is up to date for redis:6.2.14-alpine
docker.io/library/redis:6.2.14-alpine
14.11-alpine: Pulling from library/postgres
Digest: sha256:36ac395a179b1a85d528670839d9e5787a690ec672ee9ff087ada5ddd8db798a
Status: Image is up to date for postgres:14.11-alpine
docker.io/library/postgres:14.11-alpine
7.6.1: Pulling from confluentinc/cp-zookeeper
22ebf0e44c85: Pull complete
00b33c871d26: Pull complete
6b11e56702ad: Pull complete
53d69aa7d3fc: Pull complete
a3ab11953ef9: Pull complete
91ef9543149d: Pull complete
2ec4f59af178: Pull complete
8b7e81cd5ef1: Pull complete
c52916c1316e: Pull complete
7a1cb9ad7f75: Pull complete
0a92c7dea7af: Pull complete
Digest: sha256:4dc780642bfc5ec3a2d4901e2ff1f9ddef7f7c5c0b793e1e2911cbfb4e3a3214
Status: Downloaded newer image for confluentinc/cp-zookeeper:7.6.1
docker.io/confluentinc/cp-zookeeper:7.6.1
7.6.1: Pulling from confluentinc/cp-kafka
22ebf0e44c85: Already exists
00b33c871d26: Already exists
6b11e56702ad: Already exists
53d69aa7d3fc: Already exists
a3ab11953ef9: Already exists
91ef9543149d: Already exists
2ec4f59af178: Already exists
8b7e81cd5ef1: Already exists
c52916c1316e: Already exists
d93f69e96600: Pull complete
bbb9d15c45a1: Pull complete
Digest: sha256:620734d9fc0bb1f9886932e5baf33806074469f40e3fe246a3fdbb59309535fa
Status: Downloaded newer image for confluentinc/cp-kafka:7.6.1
docker.io/confluentinc/cp-kafka:7.6.1
21.8.13.1.altinitystable: Pulling from altinity/clickhouse-server
ea362f368469: Pull complete
b6f27831e97f: Pull complete
fbac3df9a8f6: Pull complete
1b4e2546b533: Pull complete
f6eb5ef541f1: Pull complete
0b55d80e9b3f: Pull complete
5103b83a0bb1: Pull complete
Digest: sha256:125d2ea49c298515c46784d202a2bd4dde05157c85a76517afc2567f262ab335
Status: Downloaded newer image for altinity/clickhouse-server:21.8.13.1.altinitystable
docker.io/altinity/clickhouse-server:21.8.13.1.altinitystable
v6.1.0: Pulling from maxmind/geoipupdate
Digest: sha256:cdd36d36c2e1d353a990a48e5a36d42ee75089d5d9064d80d36d90c147fd2606
Status: Image is up to date for ghcr.io/maxmind/geoipupdate:v6.1.0
ghcr.io/maxmind/geoipupdate:v6.1.0
Using default tag: latest
latest: Pulling from library/busybox
ec562eabd705: Pull complete
Digest: sha256:5eef5ed34e1e1ff0a4ae850395cbf665c4de6b4b83a32a0bc7bcb998e24e7bbb
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest
Using default tag: latest
latest: Pulling from getsentry/sentry-cli
f7dab3ab2d6e: Pull complete
8bd10b77a777: Pull complete
80aeafe5b1af: Pull complete
e75529525eaf: Pull complete
6bec41c299c0: Pull complete
Digest: sha256:6cfda146ed0dc4572335073ac9c232875a5e5ea0d3f3407508ad94f155d484ae
Status: Downloaded newer image for getsentry/sentry-cli:latest
docker.io/getsentry/sentry-cli:latest
Using default tag: latest
Error response from daemon: pull access denied for jq, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Then I executed install.sh, then 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.4s
 ! post-process-forwarder-errors Warning         pull access denied for sentry-self-hosted-local, repository does not ex...                                        1.3s
 ! ingest-replay-recordings Warning              pull access denied for sentry-self-hosted-local, repository does not exist o...                                   1.6s
 ! generic-metrics-consumer 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.4s
 ! events-consumer Warning                       pull access denied for sentry-self-hosted-local, repository does not exist or may req...                          1.4s
 ! subscription-consumer-transactions Warning    pull access denied for sentry-self-hosted-local, repository does n...                                             1.4s
 ! clickhouse Warning                            pull access denied for clickhouse-self-hosted-local, repository does not exist or may requ...                     1.4s
 ! worker Warning                                pull access denied for sentry-self-hosted-local, repository does not exist or may require 'doc...                 1.3s
 ! post-process-forwarder-transactions Warning   pull access denied for sentry-self-hosted-local, repository does ...                                              1.4s
 ! subscription-consumer-generic-metrics Warning pull access denied for sentry-self-hosted-local, repository doe...                                                1.4s
 ! attachments-consumer Warning                  pull access denied for sentry-self-hosted-local, repository does not exist or ma...                               1.3s
 ! subscription-consumer-metrics Warning         pull access denied for sentry-self-hosted-local, repository does not ex...                                        1.4s
 ! ingest-monitors Warning                       pull access denied for sentry-self-hosted-local, repository does not exist or may req...                          1.3s
 ! web Warning                                   pull access denied for sentry-self-hosted-local, repository does not exist or may require 'docker...              1.4s
 ! cron Warning                                  pull access denied for sentry-self-hosted-local, repository does not exist or may require 'docke...               1.3s
 ! sentry-cleanup Warning                        pull access denied for sentry-cleanup-self-hosted-local, repository does not exist or ...                         1.4s
 ! symbolicator-cleanup Warning                  pull access denied for symbolicator-cleanup-self-hosted-local, repository does n...                               1.3s
 ! post-process-forwarder-issue-platform Warning pull access denied for sentry-self-hosted-local, repository doe...                                                1.3s
 ! ingest-occurrences Warning                    pull access denied for sentry-self-hosted-local, repository does not exist or may ...                             1.3s
 ! vroom-cleanup Warning                         pull access denied for vroom-cleanup-self-hosted-local, repository does not exist or ma...                        1.5s
 ! billing-metrics-consumer Warning              pull access denied for sentry-self-hosted-local, repository does not exist o...                                   1.3s
 ! metrics-consumer Warning                      pull access denied for sentry-self-hosted-local, repository does not exist or may re...                           1.4s
 ! subscription-consumer-events Warning          pull access denied for sentry-self-hosted-local, repository does not exi...                                       1.3s
[+] Building 0.5s (14/19)                                                                                                                                docker:default
 => [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
 => [vroom-cleanup internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                    0.0s
 => [symbolicator-cleanup internal] load build definition from Dockerfile                                                                                          0.0s
 => => transferring dockerfile: 469B                                                                                                                               0.0s
 => [vroom-cleanup 1/5] FROM docker.io/getsentry/vroom:24.4.2                                                                                                      0.0s
 => [vroom-cleanup internal] load build context                                                                                                                    0.0s
 => => transferring context: 35B                                                                                                                                   0.0s
 => [vroom-cleanup 2/5] RUN if [ -n "${http_proxy}" ]; then echo "Acquire::http::proxy "${http_proxy}";" >> /etc/apt/apt.conf; fi                                  0.4s
 => [symbolicator-cleanup internal] load metadata for docker.io/getsentry/symbolicator:24.4.2                                                                      0.0s
 => [symbolicator-cleanup internal] load .dockerignore                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                    0.0s
 => [clickhouse internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 71B                                                                                                                                0.0s
 => [symbolicator-cleanup 1/5] FROM docker.io/getsentry/symbolicator:24.4.2                                                                                        0.0s
 => [symbolicator-cleanup internal] load build context                                                                                                             0.0s
 => => transferring context: 658B                                                                                                                                  0.0s
 => CACHED [symbolicator-cleanup 2/5] RUN if [ -n "${http_proxy}" ]; then echo "Acquire::http::proxy "${http_proxy}";" >> /etc/apt/apt.conf; fi                    0.0s
 => [symbolicator-cleanup 3/5] RUN if [ -n "${https_proxy}" ]; then echo "Acquire::https::proxy "${https_proxy}";" >> /etc/apt/apt.conf; fi                        0.5s
failed to solve: base name (${BASE_IMAGE}) should not be blank
aldy505 commented 5 months ago

I got this error a while ago on a Debian 12 server while migrating from 24.4.2 to 24.5.0. What I did was:

  1. Run sudo ./install.sh, got "pull access denied..."
  2. Run sudo apt update && sudo apt upgrade -y, it turns out there's an update on Docker.
  3. Run sudo docker compose down, to make sure no container is running.
  4. Run sudo ./install.sh again, then directly do sudo docker compose up -d.

I don't know what caused this, but probably this is a Docker issue, not a specific self-hosted issue.

*PS. My Docker is not rootless, so I need to use sudo for executing Docker commands.

nicolasThal commented 4 months ago

Hi,

I encountered a similar issue :

I was in version 24.1.0 and I wanted to upgrade it. After following the documentation protocol (install.sh, then docker compose up -d), I had the same issue.

I tested it on multiple version between 24.1.2 and 24.6.0.

Each time I noticed that the image sentry-self-hosted-local was missing from my computer.

Even when I launch the install.sh in the version 24.1.0 then in another version, the image is missing.

To solve my issue, I had to checkout the 24.1.0 version, launch the install.sh script, then checkout in the version 24.1.2 and launch docker compose up -d.

I do not know if my modification can help you solve the issue.

iulian0512 commented 2 months ago

occurs also in 24.8.0, i solved it by installing on a fresh machine then manually copied the missing docker images.

shawe commented 2 months ago

occurs also in 24.8.0, i solved it by installing on a fresh machine then manually copied the missing docker images.

Happens to me too, can you explain what exactly do?

pquerner commented 2 months ago

git clone again and restart over. Either in the same directory (delete first) or a new one.

shawe commented 2 months ago

git clone again and restart over. Either in the same directory (delete first) or a new one.

I clone it for first time some minutes ago only. Really is this needed?

pquerner commented 2 months ago

For me that helped. I had a finished installation and upgrade was impossible because of this issue. I deleted the folder, git clone again (same folder name) - checked out same version (that I had previously installed) and then it worked (I could even upgrade to a newer version then).

If that doesnt fix it, then I dont know what can help you, sorry.

silentsee commented 2 months ago

The 24.1.2 release will change the memcached backend from django.core.cache.backends.memcached.MemcachedCache to django.core.cache.backends.memcached.PyMemcacheCache. This will require changing the CACHES setting in your sentry.conf.py file in a manner similar to what is seen here. In particular, the OPTIONS API for PyMemcacheCache is different from that of MemcachedCache, and may require changes depending on how it has been configured.

aldy505 commented 2 months ago

Seems like everyone got this fixed already. I'm going to close the issue. If you (readers from the future) are experiencing this and don't find any solution that fits you, feel free to create a new issue.