testdasi / pihole-dot-doh

Official pihole docker both DoT (DNS over TLS) and DoH (DNS over HTTPS). Built for both Raspberry Pi and AMD64.
GNU General Public License v3.0
40 stars 23 forks source link

cloudflared not found #5

Open perrin opened 3 years ago

perrin commented 3 years ago

I updated my docker to latest [s210520] and I was no longer able do to DNS resolution. Looking at the docker logs, I found the following lines repeating

Starting stubby
[04:35:52.882933] STUBBY: Read config from file /config/stubby.yml
Starting cloudflared
./run: line 7: /usr/local/bin/cloudflared: No such file or directory
Stopping stubby
Stopping cloudflared
cloudflared: no process found

I entered the docker shell and "find" wasn't able to find the executable. Reverting the docker to s210506 resolved the issue and everything worked as expected.

rickscherer commented 3 years ago

had same exact issue. no time to triage so had to revert.

dcd commented 3 years ago

https://github.com/testdasi/pihole-base-buster-plus/pull/1

Swagnoor19 commented 3 years ago

@dcd How could we do this in Unraid? I tried looking in the template and the appdata files but couldnt find where I could make similar changes.

suckerface commented 2 years ago

@Swagnoor19 I just spent the evening trying to get this sorted. Will be a quick-ish fix for now, I'll work on massaging it into something for a PR later.

  1. SSH/open a terminal on your UnRAID host
  2. Connect to docker instance shell: docker exec -it Pihole-DoT-DoH /bin/bash
  3. Download the cloudflaared binary - curl -L -H "Accept: application/octet-stream" https://api.github.com/repos/cloudflare/cloudflared/releases/assets/48626359 -o cloudflared-linux-amd64.deb (this is specifically for the 2021.11.0 release)
  4. Install the binary - dpkg -i cloudflared-linux-amd64.deb

This should get rid of the spam in your logs. You can verify it's in the proper location (/usr/local/bin/cloudflared) by running which cloudflared

Hope this helps!

suckerface commented 2 years ago

To further clarify, the issue is related to the PR listed above. While changing the wget command to curl -o helps avoid the issue that wget isn't installed, it's pulling the file from equinox.io, which shut down and deleted all accounts and binaries on Sept 30th, 2021, so there's no cloudflared binary where the install.sh script is trying to pull from.

Unfortunately, pulling the release from GitHub via API is a bit of a chore, as it needs the release asset_id (48626359 for 2021.11.0 above), and the cloudflare repo doesn't use a "latest" tag or anything for their releases, so automating a script to pull the latest isn't going to be as straightforward as it could be.

suckerface commented 2 years ago

Created PR testdasi/pihole-base-buster-plus/pull/2 to pull most recent binary from Cloudflare directly, as well as add fix to change wget to curl and apt install to dpkg -I