Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requested access to the resource is denied #3

Open
Zamana opened this issue May 23, 2024 · 5 comments
Open

Requested access to the resource is denied #3

Zamana opened this issue May 23, 2024 · 5 comments

Comments

@Zamana
Copy link

Zamana commented May 23, 2024

Hi!

I'm trying to install your project, but I'm getting the following error after "docker-compose up -d":

`Pulling powerhole-pdns-admin (powerhole:admin)...

ERROR: pull access denied for powerhole, repository does not exist or may require 'docker login': denied: requested access to the resource is denied`

Can you help me with this?

Thanks.
Regards.

@noxPHX
Copy link
Owner

noxPHX commented May 24, 2024

Hello !

Make sure to thouroughly read the README as it contains important instructions prior to execute the containers.
For instance the image you reference needs to first be built with the build.sh script.

Let me know if you encounter any problem.

Regards,
Nox

@Zamana
Copy link
Author

Zamana commented May 24, 2024

Hi!

Thanks for replying.

Actually, the problem was in the docker itself. I was using the docker stock version (from Debian repositories). After removing and installing from the docker.com, the error is now in the "docker compose up -d" phase:

root@powerhole:~/Power-Hole# docker compose up -d
[+] Running 35/35
 ✔ powerhole-pdns-auth-db Pulled                                                                                                                                                25.6s 
   ✔ 09f376ebb190 Pull complete                                                                                                                                                  5.1s 
   ✔ 0073ad29fa0d Pull complete                                                                                                                                                  5.2s 
   ✔ 0de26d616f1f Pull complete                                                                                                                                                  5.4s 
   ✔ bf9ac1916a4f Pull complete                                                                                                                                                  5.5s 
   ✔ 86761c4a52a0 Pull complete                                                                                                                                                  6.0s 
   ✔ f7b2865caf71 Pull complete                                                                                                                                                  6.1s 
   ✔ b34d7669106d Pull complete                                                                                                                                                  6.2s 
   ✔ b24b834dff71 Pull complete                                                                                                                                                  6.2s 
   ✔ 34a221fe6652 Pull complete                                                                                                                                                 24.0s 
   ✔ 3373f066ae4e Pull complete                                                                                                                                                 24.1s 
   ✔ 24f474a1424c Pull complete                                                                                                                                                 24.1s 
   ✔ f161dc7c149b Pull complete                                                                                                                                                 24.1s 
   ✔ 946b6e741b0e Pull complete                                                                                                                                                 24.2s 
   ✔ efb99a6e3550 Pull complete                                                                                                                                                 24.2s 
 ✔ powerhole-pdns-admin-db Pulled                                                                                                                                               25.6s 
 ✔ powerhole-pihole Pulled                                                                                                                                                      39.8s 
   ✔ 6177a7f9989f Pull complete                                                                                                                                                 24.0s 
   ✔ 12e0b6e17084 Pull complete                                                                                                                                                 27.3s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                 33.6s 
   ✔ 7feb7a5b0967 Pull complete                                                                                                                                                 33.8s 
   ✔ 6c3e5580ee2b Pull complete                                                                                                                                                 33.9s 
   ✔ f46eb00722d3 Pull complete                                                                                                                                                 34.0s 
   ✔ 28aca6ff6ec8 Pull complete                                                                                                                                                 35.3s 
   ✔ 57830b374493 Pull complete                                                                                                                                                 36.3s 
   ✔ 0889a21457e8 Pull complete                                                                                                                                                 37.5s 
 ✔ powerhole-nginx Pulled                                                                                                                                                       13.4s 
   ✔ 13808c22b207 Pull complete                                                                                                                                                 10.3s 
   ✔ 8751d4444391 Pull complete                                                                                                                                                 11.8s 
   ✔ 4fa9b5c68426 Pull complete                                                                                                                                                 11.9s 
   ✔ 039376619ff8 Pull complete                                                                                                                                                 11.9s 
   ✔ 4a37e4089696 Pull complete                                                                                                                                                 11.9s 
   ✔ 937d7b44a8ec Pull complete                                                                                                                                                 11.9s 
   ✔ 56f1bed713de Pull complete                                                                                                                                                 12.0s 
   ✔ aeed4735b0fe Pull complete                                                                                                                                                 12.0s 
[+] Running 20/20
 ✔ Network powerhole-pdns-admin-db         Created                                                                                                                               0.6s 
 ✔ Network powerhole-nginx-admin           Created                                                                                                                               0.4s 
 ✔ Network powerhole-pdns-admin            Created                                                                                                                               0.3s 
 ✔ Network powerhole-pdns-recursor         Created                                                                                                                               0.4s 
 ✔ Network powerhole-pdns-authoritative    Created                                                                                                                               0.4s 
 ✔ Network powerhole-pdns-forwarder        Created                                                                                                                               0.6s 
 ✔ Network powerhole-nginx-pihole          Created                                                                                                                               0.4s 
 ✔ Network powerhole-pdns-auth-db          Created                                                                                                                               0.4s 
 ✔ Volume "power-hole_db_auth"             Created                                                                                                                               0.1s 
 ✔ Volume "power-hole_db_admin"            Created                                                                                                                               0.1s 
 ✔ Volume "power-hole_pihole"              Created                                                                                                                               0.1s 
 ✔ Volume "power-hole_dnsmasq"             Created                                                                                                                               0.1s 
 ✔ Container powerhole-pdns-admin-db       Healthy                                                                                                                              20.3s 
 ✔ Container powerhole-pdns-auth-db        Healthy                                                                                                                              19.4s 
 ✔ Container powerhole-pdns-authoritative  Healthy                                                                                                                              46.1s 
 ✘ Container powerhole-pdns-admin          Error                                                                                                                               107.8s 
 ✔ Container powerhole-pdns-recursor       Healthy                                                                                                                              76.0s 
 ✔ Container powerhole-pdns-forwarder      Healthy                                                                                                                             106.8s 
 ✔ Container powerhole-pihole              Healthy                                                                                                                             137.7s 
 ✔ Container powerhole-nginx               Created                                                                                                                               0.1s 
dependency failed to start: container powerhole-pdns-admin is unhealthy

Do you know what could possibly going wrong here?

Thanks.
Regards.

@noxPHX
Copy link
Owner

noxPHX commented May 24, 2024

Indeed I'd recommend using the Compose plugin bundled with Docker rather than the legacy docker-compose binary.

From your screen it looks like the container powerhole-pdns-admin could not start properly. You should have a look or share with me the logs of the container "powerhole-pdns-admin": docker logs powerhole-pdns-admin. It will help you to identify the cause of the error.

Nox

@Zamana
Copy link
Author

Zamana commented May 24, 2024

Ok. Here are the running dockers:

CONTAINER ID   IMAGE                                COMMAND                  CREATED       STATUS                          PORTS                                                                                  NAMES
534e7ad8b68f   nginxinc/nginx-unprivileged:1.25.4   "/docker-entrypoint.…"   2 hours ago   Created                                                                                                                powerhole-nginx
41fa6a185ab8   pihole/pihole:2024.05.0              "/s6-init"               2 hours ago   Up 2 hours (healthy)            0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, :::53->53/tcp, :::53->53/udp, 67/udp, 80/tcp   powerhole-pihole
b0b190525c8d   powerhole:forwarder                  "pdns_recursor"          2 hours ago   Up 2 hours (healthy)                                                                                                   powerhole-pdns-forwarder
7540b662757b   powerhole:admin                      "entrypoint.sh gunic…"   2 hours ago   Restarting (1) 36 seconds ago                                                                                          powerhole-pdns-admin
65dc6a4c6502   powerhole:recursor                   "pdns_recursor"          2 hours ago   Up 2 hours (healthy)                                                                                                   powerhole-pdns-recursor
ec1b75f7cfe9   powerhole:authoritative              "pdns_server"            2 hours ago   Up 2 hours (healthy)                                                                                                   powerhole-pdns-authoritative
2a0b0911f71d   postgres:13                          "docker-entrypoint.s…"   2 hours ago   Up About a minute (healthy)                                                                                            2a0b0911f71d_powerhole-pdns-admin-db
14829d1636d9   postgres:13                          "docker-entrypoint.s…"   2 hours ago   Up About a minute (healthy)                                                                                            14829d1636d9_powerhole-pdns-auth-db

And the log is attached.
powerhole-pdns-admin.txt

By the way, I don't think I'm using the docker-compose binary. I'm using "docker compose". Is that ok?

@noxPHX
Copy link
Owner

noxPHX commented May 28, 2024

It looks like there is a typo in the "database URI" used by powerhole-pdns-admin to connect to its database.
If you take a look at the logs line 36 you can see a new line is present in the database name.

The container powerhole-pdns-admin used the env var SQLALCHEMY_DATABASE_URI_FILE to connect to the database. This env var points to a file mounted as a secret as specified in the README: echo "postgresql://powerhole_admin:$(cat admin_db_password.txt)@powerhole-pdns-admin-db/powerhole_admin" > db_uri.txt

Please double check this file to make sure it does not contain any extra character.
Remember: No new line must be present in the db_uri.txt file, consider truncating it: truncate -s -1 db_uri.txt

And yes, docker compose is the new and recommend way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants