Giter Site home page Giter Site logo

Comments (83)

xyzulu avatar xyzulu commented on May 17, 2024 23

Here: https://bin.equinox.io/a/4SUTAEmvqzB/cloudflared-2018.7.2-linux-arm.tar.gz

from cloudflared.

cemtes avatar cemtes commented on May 17, 2024 22

Recompiled binaries are available here https://hobin.ca/cloudflared/ . I can confirm that 2019.8.1 runs fine on my Raspberry Pi Zero. I installed using the normal method in the cloudflared docs but replaced

wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz

with

wget https://hobin.ca/cloudflared/releases/2019.8.1/cloudflared_2019.8.1_arm.tar.gz

Hope this helps others.

EDIT: I'm just passing along a solution I found, I had no part in generating these files and don't take any credit for them.

from cloudflared.

 avatar commented on May 17, 2024 19

Same on Raspberry Pi Zero and Raspberry Pi Zero W.

from cloudflared.

hobindar avatar hobindar commented on May 17, 2024 18

It would be great if the author of those binaries shared how they got it to compile. I tried compiling it for my Raspberry Pi 1B, with my limited knowledge of golang, to no avail.

@Limeth Author of those binaries here. Building the binaries for ARMv6 is rather straightforward. You just have to make sure you have a C cross-compiler for ARM, such as gcc-arm-linux-gnueabi for Debian-based systems. Then set the following environment variables...

GOOS=linux
GOARCH=arm
GOARM=6
CGO_ENABLED=1
CC=arm-linux-gnueabi-gcc # This should be your ARM C cross-compiler

Now just build it...

go build -v "-ldflags=-X 'main.Version=${version}' -X 'main.BuildTime=${date}'" github.com/cloudflare/cloudflared/cmd/cloudflared

...where ${version} is the version of Cloudflared and ${date} is the current time.

Then just bundle the resulting executable however you want.

Thanks to @meliurwen for pointing me here from reddit.

Edit: Rather than building it with go build ..., you should be able to use their Makefile as well. I'm building it the way described above, however. Also worth noting, if you build on your Pi itself, you could probably skip the environment variables (the defaults target your build machine).

Last edit: Quick word on reproducibility, in case anyone is trying to reproduce these binaries byte-for-byte for the sake of auditing. Go builds are only reproducible if built with the same GOPATH and GOROOT. So those values for me (as of version 2019.8.3) are...

GOPATH=/home/hobindar/go
GOROOT=/usr/lib/go-1.13

You'll obviously also need to use the same version and date string that I used. You can get this string by running cloudflared version, which will print out a line like cloudflared version foo (built bar). In this example, foo is the version string and bar is the date string.

More information about byte-for-byte reproducibility in Go can be found here: https://blog.filippo.io/reproducing-go-binaries-byte-by-byte/

Last edit for real: The following (mentioned in an earlier comment) will grab version 2019.8.1...

wget https://hobin.ca/cloudflared/releases/2019.8.1/cloudflared_2019.8.1_arm.tar.gz

You could, however, grab the latest (regardless of version) using...

wget https://hobin.ca/cloudflared/latest?type=tar

...replacing "tar" with the package type of your choice (i.e. "deb", "rpm", or "tar").

This more closely mimics the behavior of the equinox link in their documentation (by grabbing latest).

from cloudflared.

TownLake avatar TownLake commented on May 17, 2024 8

Hi from Cloudflare. We've made some improvements to packaging and DoH issues. That said, we still haven't been able to track down the cause of the issues with Raspberry Pi devices. I know it's frustrating.

We have the PiHole DoH issues on our list, but don't have an ETA yet when you could expect a fix. We'll update this thread and the related ones when we do. Thanks for the patience and feedback - apologies for the delay here.

from cloudflared.

reshnm avatar reshnm commented on May 17, 2024 6

If anyone is interested, I have created a Dockerfile for building cloudflared on my Mac.
https://github.com/reshnm/cloudflared-build

You can build cloudflared by calling ./build.sh <version>
e.g. ./build.sh 2019.11.3

from cloudflared.

timothybrown avatar timothybrown commented on May 17, 2024 5

@sssilver Since there has been a new release, does that mean this issue is fixed?

Does not appear to have been fixed. I tried the current release today and itโ€™s still segfaulting.

from cloudflared.

meliurwen avatar meliurwen commented on May 17, 2024 5

I see many people started to use the binaries linked by @cemtes and I'm a little worried.
The author of those binaries (reddit username probably DTHCND) didn't provide documentation to reproduce its build process.

Please be really careful and if possible restrain from using untrusted or unknown binary blobs.

Especially for tools like cloudflared, where one of its core features is privacy and distrust of the actors handling/forwarding your DNS requests between you and the Cloudflare's servers.
Using those binaries, unless for whatever reason you trust this person, makes the use of this tool almost (if not completely) pointless.

from cloudflared.

sssilver avatar sssilver commented on May 17, 2024 4

Hi,

The next cloudflared release will be built with Go 1.11.

from cloudflared.

hobindar avatar hobindar commented on May 17, 2024 4

Who maintains this?

That would be me.

I mean, this is supposed to use a secure protocol to make queries, how safe is this build archive?

In my opinion, it's definitely safe. I left a comment earlier in this thread about how to build it yourself. If you follow all the instructions in that comment, I believe the resulting binaries should be bit-for-bit identical, allowing you to verify that I did not do anything malicious in my builds. If you ever find they are not identical, let me know and we can investigate why.

The main page doesn't makes me feel precisely comfortable.

Haha, yeah, I should probably change that page at some point. That's just a page that I hacked together many years ago to try out viewport units, back when viewport units were a brand new thing (and while I was still a university student). I'll replace the page when I think of something worthwhile to replace it with.

CC: @brbergami

from cloudflared.

xyzulu avatar xyzulu commented on May 17, 2024 3

Exactly the same issue as well. It's also being reported elsewhere.
Reverting to 2018.7.2 works..

the issue is 2018.7.3

from cloudflared.

cvocvo avatar cvocvo commented on May 17, 2024 2

+1 for same issue on a RPi Model B; 2018-7.2 works but I keep randomly running into this (#23) same error with 2018-7.2.
failed to connect to an HTTPS backend and then have to reboot the Pi.

Would love to get this fixed to try a later version of Cloudflared that hopefully resolves that problem :)

from cloudflared.

harishvishwakarma avatar harishvishwakarma commented on May 17, 2024 2

Still happening in Pi 2 Model B

from cloudflared.

 avatar commented on May 17, 2024 1

@xyzulu how do you revert to 2018.7.2? I can't find the binaries for download.

from cloudflared.

Trikolon avatar Trikolon commented on May 17, 2024 1

cloudflared version 2019.4.1 (built 2019-04-19-2152 UTC) (official binary download))
Works on Raspberry Pi 3b+

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024 1

I think the segfault issue is due to released cloudflared being built on a later ARM processor, or cross compiled. The latest current version (2019.5.0) works fine on a Pi 3 B+, whether it stops working after a while (#23), I don't know, didn't test it for long enough, but segfault on a Pi 1B (BCM2835).
I installed go1.12.5 linux/arm on the Pi 1B and built from source, release 2019.5.0 plus a few commits (babcd9f), this appears to work, but stops working after a while (#23), it appears to run out of file handles.

Jun  3 06:33:14 jennifer cloudflared[261]: time="2019-06-03T06:33:14Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.1.1.1/dns-query: dial tcp 1.1.1.1:443: socket: too many open files"
Jun  3 06:33:14 jennifer cloudflared[261]: time="2019-06-03T06:33:14Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.0.0.1/dns-query: dial tcp 1.0.0.1:443: socket: too many open files"
Jun  3 06:33:14 jennifer cloudflared[261]: time="2019-06-03T06:33:14Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.1.1.1/dns-query: dial tcp 1.1.1.1:443: socket: too many open files"
Jun  3 06:33:14 jennifer cloudflared[261]: time="2019-06-03T06:33:14Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.0.0.1/dns-query: dial tcp 1.0.0.1:443: socket: too many open files"

Update:
Having looked at the Makefile, I built version 2019.5.0 using it...

pi@jennifer:~ $ cd gocode/src/github.com/cloudflare/cloudflared/
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ git checkout 2019.5.0
Note: checking out '2019.5.0'.
...
HEAD is now at 4bff1ef... Release 2019.5.0
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ export PATH=$PATH:/usr/local/go/bin
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ export GOPATH=~/gocode
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ go clean
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ make cloudflared
go build -v -ldflags='-X "main.Version=2019.5.0" -X "main.BuildTime=2019-06-03-1717 UTC"' github.com/cloudflare/cloudflared/cmd/cloudflared
pi@jennifer:~/gocode/src/github.com/cloudflare/cloudflared $ ./cloudflared -v
cloudflared version 2019.5.0 (built 2019-06-03-1717 UTC)

This version may be ok, it's now been running for several hours including a Pi reboot and a router reboot.

from cloudflared.

pmarella2 avatar pmarella2 commented on May 17, 2024 1

Anyone have any method to get it working on RPi Zero? I tried downloading different versions and they work without giving a segmentation fault. But, if I restart my RPi or after a while, it just stops working.

from cloudflared.

timothybrown avatar timothybrown commented on May 17, 2024 1

@cemtes Thanks! Works great on my Pi B+!

from cloudflared.

timothybrown avatar timothybrown commented on May 17, 2024 1

@meliurwen For what itโ€™s worth, this was my first thought as well, so Iโ€™ve been keeping an eye on the system I installed them on over the last two weeks. So far they havenโ€™t made a single network request outside of the Cloudflare DNS servers and theyโ€™re not secretly storing requests to disk. Obviously this is not a through audit, but based on that and a bit of background on the person who made them available, I feel theyโ€™re safe.

Obviously everyone should make up their own mind and do their own testing (for all you know I could be in on it) and I do agree with the point youโ€™re making. If you do use these I would recommend setting up a system to monitor outbound network traffic so you can make sure theyโ€™re not doing anything nefarious.

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024 1

It's possible to compile it on a Pi 1B, you need to install a recent version of the Go compiler, clone the cloudflared repository, checkout the release you want, and use the Makefile. See my comment above #38 (comment). The version from Raspbian may not be recent enough.

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024 1

I used go1.12.5 linux/arm. I think that was the latest at the time.

Edit: You will probably need to increase the swap size.

from cloudflared.

nolanlawson avatar nolanlawson commented on May 17, 2024 1

Update: I got it working! See complete steps below. ๐Ÿ™‚

Original comment, click to view

I'm not able to follow the instructions from @hobindar. When I build the cloudflared binary and run it on my Raspberry Pi Zero, it prints:

-bash: ./cloudflared: cannot execute binary file: Exec format error

I'm trying to build this on Ubuntu 18.04 amd64. Here are my steps to reproduce:

  • Install Go for Ubuntu as described on the Golang wiki
  • go version prints go version go1.13.3 linux/amd64
  • sudo apt install gcc-arm-linux-gnueabi
  • set the following env variables:
version=2018.12.1
date=$(date)
GOOS=linux
GOARCH=arm
GOARM=6
CGO_ENABLED=1
CC=arm-linux-gnueabi-gcc

Download the cloudflared source and put it where Go can find it:

git clone [email protected]:cloudflare/cloudflared.git ~/go/src/github.com/cloudflare/cloudflared

Build:

go build -v "-ldflags=-X 'main.Version=${version}' -X 'main.BuildTime=${date}'" github.com/cloudflare/cloudflared/cmd/cloudflared

But when I copy this to my Pi and run it, I get the error above. Hopefully someone can use my instructions, tweak them slightly, and figure out how to build this correctly. ๐Ÿ™‚

On Ubuntu 18.04, here's how I managed to compile cloudflared for my Raspberry Pi Zero W:

Install Go for Ubuntu as described on the Golang wiki.

Check go version, it should print go version go1.13.3 linux/amd64.

Run the following:

# install required CC
sudo apt install gcc-arm-linux-gnueabi

# clone cloudflared source where Go can find it
git clone [email protected]:cloudflare/cloudflared.git ~/go/src/github.com/cloudflare/cloudflared

# build (will create cloudflared binary in current directory)
version=2018.12.1 date=$(date) GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=1 CC=arm-linux-gnueabi-gcc go build -v "-ldflags=-X 'main.Version=${version}' -X 'main.BuildTime=${date}'" github.com/cloudflare/cloudflared/cmd/cloudflared

Then copy the cloudflared file to your Pi (e.g. with SSH) and run ./cloudflared -v to make sure it's working.

My mistake before was that I forgot to export the env variables, or to pass them in on the same line where I run the go build command. So it was just building for Linux amd64 instead of for the Pi's architecture. Thanks @hobindar!

from cloudflared.

marcelloinfoweb avatar marcelloinfoweb commented on May 17, 2024 1

Some problem raspberry pi zero W.

What Solution?

from cloudflared.

SnufflesC137 avatar SnufflesC137 commented on May 17, 2024 1

Still happening pi b+

from cloudflared.

brbergami avatar brbergami commented on May 17, 2024 1

I can confirm this issue still happens. I'm using a Zero W. Had to find a 2018 build that works. But if you diff, there's a ton of commits added (which I guess includes features and bug fixes), can't be 2 years and this still persist.

root@DietPi:~# uname -a
Linux DietPi 5.4.79+ #1373 Mon Nov 23 13:18:15 GMT 2020 armv6l GNU/Linux
root@DietPi:~# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
root@DietPi:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 1423.06
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2835
Revision        : 9000c1
Serial          : 000000001ea488ff
Model           : Raspberry Pi Zero W Rev 1.1

Working build: b2b46a483505babd15743d3743728ebf5a1b82ed8e47093a2009ae6e48c83034

from cloudflared.

Pulikutti avatar Pulikutti commented on May 17, 2024

Same on Pi Zero W. reverted to 2018.6.2

Program received signal SIGSEGV, Segmentation fault.
0x00060ea0 in runtime.moduledataverify1 (datap=0x36333b31) at /usr/local/go/src/runtime/symtab.go:517

from cloudflared.

angussidney avatar angussidney commented on May 17, 2024

I have also reproduced this issue on my Raspberry Pi Model 1B (rev 2). Reverting to 2018.7.2 as xyzulu suggested works.

from cloudflared.

rix1337 avatar rix1337 commented on May 17, 2024

Same issue, same device

from cloudflared.

dullroar avatar dullroar commented on May 17, 2024

+1 on all of the above, including falling back to 2018-7.2 works.

from cloudflared.

tconnz avatar tconnz commented on May 17, 2024

Same issue here on RPi B - Segmentation Fault.

EDIT- 2018-7.2 only works if copied to usr/local/bin and then chmod +x is run.

from cloudflared.

CBielstein avatar CBielstein commented on May 17, 2024

Same issue with a Raspberry Pi model A. Falling back to 2018-7.2 worked without any further steps.

from cloudflared.

silvether avatar silvether commented on May 17, 2024

+1
Can repro on Raspberry Pi 1 B+ with Raspbian Minimal

from cloudflared.

jmvermeulen avatar jmvermeulen commented on May 17, 2024

Same here on Pi 2.

from cloudflared.

Chlorus avatar Chlorus commented on May 17, 2024

+1 for a Raspberry Pi 1 Model B+, haven't tried reverting to an older version yet.

from cloudflared.

double-fault avatar double-fault commented on May 17, 2024

Falling back to 2018-7.2 does work on a Raspberry Pi Zero W.

from cloudflared.

joehillen avatar joehillen commented on May 17, 2024

I ended up building from source on my Pi Zero W, and it works like a charm. Had to add an extra swapfile in order for the build process to have enough RAM.

I suspect cloudflare's ARM build instance is to blame.

from cloudflared.

ravvle avatar ravvle commented on May 17, 2024

I also had this issue on the Pi Zero W, building from source fixed this for me. I had to add extra swap space to compile properly. Thanks @joehillen

Note: I compiled using Go 1.11.5. I noticed the build config seems to use the 1.9 stream which doesn't receive patches any more.

from cloudflared.

dsadsa897897r avatar dsadsa897897r commented on May 17, 2024

What command is needed to compile using Go?

sudo apt-get install golang
export GOPATH=$HOME/go
go install github.com/cloudflare/cloudflared/cmd/cloudflared

from cloudflared.

hexdra avatar hexdra commented on May 17, 2024

Same error on Pi B Version 2019.2.1.
2018.7.2 works.

from cloudflared.

ArniDagur avatar ArniDagur commented on May 17, 2024

@sssilver Since there has been a new release, does that mean this issue is fixed?

from cloudflared.

cleanev avatar cleanev commented on May 17, 2024

Same issue on RPiZeroW with latest Rasberry Pi Stretch with all updates and name showing - Linux ZeroPiHole-I 4.19.42+ #1219 Tue May 14 21:16:38 BST 2019 armv6l GNU/Linux

Latest version 2019.4.1 only works with RPi3B+

pi@ZeroPiHole-I:~ $ dig yahoo.com

; <<>> DiG 9.10.3-P4-Raspbian <<>> yahoo.com
;; global options: +cmd
;; connection timed out; no servers could be reached
pi@ZeroPiHole-I:~ $ dig @127.0.0.1 -p 5053 yahoo.com

; <<>> DiG 9.10.3-P4-Raspbian <<>> @127.0.0.1 -p 5053 yahoo.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
pi@ZeroPiHole-I:~ $ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=55 time=23.9 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=55 time=26.9 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 23.930/25.415/26.900/1.485 ms

Name resolution with 2018.7.2 does not work at all

I referenced this article when setting up DoH - https://docs.pi-hole.net/guides/dns-over-https/

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024

Version 2019.5.0 built with go1.12.5 on a Pi 1B as in previous post eventually failed due to running out of file handles after about a week...

Jun 10 08:27:44 jennifer cloudflared[1286]: time="2019-06-10T08:27:44Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.1.1.1/dns-query: dial tcp 1.1.1.1:443: socket: too many open files"
Jun 10 08:27:44 jennifer cloudflared[1286]: time="2019-06-10T08:27:44Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post https://1.0.0.1/dns-query: dial tcp 1.0.0.1:443: socket: too many open files"

from cloudflared.

lightswitch05 avatar lightswitch05 commented on May 17, 2024

Just checking in that the issue continues with version 2019.6.0

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024

The latest version from https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz gives an instant segfault on a Pi 1B. I can't tell the version because it won't run.

pi@jennifer:~/cd $ tar xzvf cloudflared-stable-linux-arm.tgz
cloudflared
pi@jennifer:~/cd $ ./cloudflared
Segmentation fault

Update: Version 2019.6.0 builds and runs OK on a PI 1B using go1.12.5 linux/arm, downloading an amazing long list of stuff from various sources.

pi@jennifer:~/go/src/github.com/cloudflare/cloudflared $ git checkout 2019.6.0
Note: checking out '2019.6.0'.
...
HEAD is now at acd17f6... Release 2019.6.0
pi@jennifer:~/go/src/github.com/cloudflare/cloudflared $ export GOPATH=~/go
pi@jennifer:~/go/src/github.com/cloudflare/cloudflared $ export PATH=$PATH:/usr/local/go/bin
pi@jennifer:~/go/src/github.com/cloudflare/cloudflared $ make cloudflared
go build -v -ldflags='-X "main.Version=2019.6.0" -X "main.BuildTime=2019-06-21-1621 UTC"' github.com/cloudflare/cloudflared/cmd/cloudflared
... Amazing long list of stuff from various sources ...
pi@jennifer:~/go/src/github.com/cloudflare/cloudflared $ ./cloudflared -v
cloudflared version 2019.6.0 (built 2019-06-21-1621 UTC)

from cloudflared.

cleanev avatar cleanev commented on May 17, 2024

Somewhere I found a tgz file that was compiled for 32 bit Pi, I am assuming those are zero, zero w, a and some older ones? Upon checking the version I have is 2019.5.0 that works perfectly fine on ZeroW.
Canโ€™t seem to find the original post or url that hosted the file, however I do have a copy that I can share. I am not sure how to attach it here. Let me know if someone has a website where I can upload

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024

I have on soak test on a Pi 1B an old version I got from here: https://web.archive.org/web/20180419005946/https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz, linked from here: https://web.archive.org/web/20180524132333/https://developers.cloudflare.com/argo-tunnel/downloads, which is version 2018.4.6. It's third choice, so it may take a while to fail if it's going to.

A recent version built from source using a recent Go compiler seems to fail after a while as above.

from cloudflared.

lightswitch05 avatar lightswitch05 commented on May 17, 2024

@pmarella2 disable auto-update in your config yaml: no-autoupdate: true

from cloudflared.

maximal avatar maximal commented on May 17, 2024

Same issue.

from cloudflared.

billthefarmer avatar billthefarmer commented on May 17, 2024

I found that any version of cloudflared flaky on a Pi 1B, either an old build or a rebuilt recent version, in that it stops working after a while. I then tried DNSCrypt-Proxy, which also stopped working after a while. The common factor appears to be that they are both written in Go. I then tried unbound, which works and has the advantage that it's already in the Raspbian repository.

from cloudflared.

mheland avatar mheland commented on May 17, 2024

@cemtes Thank you, stable on Pi 1B

pi@raspberrypi:/var/log $ cloudflared --v
cloudflared version 2019.8.1 (built 2019-08-07-0625 UTC)

from cloudflared.

tckb avatar tckb commented on May 17, 2024

@cemtes thanks this one works

from cloudflared.

mheland avatar mheland commented on May 17, 2024

Agree @meliurwen - I switched to DNS-crypt Proxy, easy to install / configure, light on resources and can run DoH with cloudflared. This guide is up to date: https://itchy.nl/raspberry-pi-3-with-openvpn-pihole-dnscrypt

from cloudflared.

Limeth avatar Limeth commented on May 17, 2024

It would be great if the author of those binaries shared how they got it to compile. I tried compiling it for my Raspberry Pi 1B, with my limited knowledge of golang, to no avail.

from cloudflared.

maximal avatar maximal commented on May 17, 2024

@billthefarmer, which version of Go do we need?

from cloudflared.

maximal avatar maximal commented on May 17, 2024

Confirmed. It compiles and works successfully when is built by Go of latest version.

from cloudflared.

aaa118 avatar aaa118 commented on May 17, 2024

Recompiled binaries are available here https://hobin.ca/cloudflared/ . I can confirm that 2019.8.1 runs fine on my Raspberry Pi Zero. I installed using the normal method in the cloudflared docs but replaced

wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz

with

wget https://hobin.ca/cloudflared/releases/2019.8.1/cloudflared_2019.8.1_arm.tar.gz

Hope this helps others.

EDIT: I'm just passing along a solution I found, I had no part in generating these files and don't take any credit for them.

This is the only solution which worked for me on pi zero

from cloudflared.

Chlorus avatar Chlorus commented on May 17, 2024

FWIW, I got tired of waiting for a fix upstream & just switched to dnscrypt-proxy, which supports DoH now & is a lot more flexible in the config.

from cloudflared.

mbanders avatar mbanders commented on May 17, 2024

@nolanlawson Question about when you ran the following command:

version=2018.12.1 date=$(date) GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=1 CC=arm-linux-gnueabi-gcc go build -v "-ldflags=-X 'main.Version=${version}' -X 'main.BuildTime=${date}'" github.com/cloudflare/cloudflared/cmd/cloudflared

Does version have to be set to an available release from the following list? https://github.com/cloudflare/cloudflared/releasesj

That way it picks the right code to compile?

from cloudflared.

hobindar avatar hobindar commented on May 17, 2024

@mbanders It does not need to be from that list. Both version and date are only used to populate the version information that is printed when running cloudflared version.

from cloudflared.

mbanders avatar mbanders commented on May 17, 2024

@hobindar Thanks. Out of curiosity, have you tried to compile on the raspberry pi itself? Or does it just take too long? And what would be the command to compile on the raspberry pi itself?

from cloudflared.

hasmar04 avatar hasmar04 commented on May 17, 2024

@marcelloinfoweb
I used the binaries from @hobindar and this fixed my problem. Just substituted his link into these instructions and haven't had any problems (except for issue #23 , but I think that is unrelated).

from cloudflared.

charminULTRA avatar charminULTRA commented on May 17, 2024

Still happening on Pi Zero W current version as of this date.

from cloudflared.

charminULTRA avatar charminULTRA commented on May 17, 2024

What command is needed to compile using Go?

sudo apt-get install golang
export GOPATH=$HOME/go
go install github.com/cloudflare/cloudflared/cmd/cloudflared

This no longer works, it's not located there anymore.

from cloudflared.

charminULTRA avatar charminULTRA commented on May 17, 2024

Here: https://bin.equinox.io/a/4SUTAEmvqzB/cloudflared-2018.7.2-linux-arm.tar.gz

This still works.

from cloudflared.

deggers avatar deggers commented on May 17, 2024

Some problem raspberry pi zero W.

What Solution?

#38 (comment) still works on my rpi zero like from him suggestest. Just fetched with wget from hobin the latest

from cloudflared.

queeup avatar queeup commented on May 17, 2024

Still happening in the pi 1B with latest version (2020.6.5)

from cloudflared.

balu100 avatar balu100 commented on May 17, 2024

Still happening on Model B Rev 2

from cloudflared.

joehillen avatar joehillen commented on May 17, 2024

Since Cloudflare seems to ignore this issues. I've switched to NextDNS. It works great. Highly recommend it.

from cloudflared.

abishekmuthian avatar abishekmuthian commented on May 17, 2024

I found that any version of cloudflared flaky on a Pi 1B, either an old build or a rebuilt recent version, in that it stops working after a while. I then tried DNSCrypt-Proxy, which also stopped working after a while. The common factor appears to be that they are both written in Go. I then tried unbound, which works and has the advantage that it's already in the Raspbian repository.

I recommend unbound as well as a remedy for issues with cloudflared on 32-bit ARM, as even if there is no segmentation fault in the natively built package, it stops working after a while. Here is a nice guide for setting it up on Pi Hole - https://bartonbytes.com/posts/configure-pi-hole-for-dns-over-tls/.

Using unbound for DNS over TLS specifically for secondary Pi Hole (as it's mostly the case for using older RPi) is especially useful as we can specify other encrypted DNS providers here as a fallback when Cloudflare goes down.

from cloudflared.

yolofy avatar yolofy commented on May 17, 2024

Same here:

Linux pizero1 5.4.79+ #1373 Mon Nov 23 13:18:15 GMT 2020 armv6l GNU/Linux

Architecture:        armv6l
Byte Order:          Little Endian
CPU(s):              1
On-line CPU(s) list: 0
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           1
Vendor ID:           ARM
Model:               7
Model name:          ARM1176
Stepping:            r0p7
CPU max MHz:         1000.0000
CPU min MHz:         700.0000
BogoMIPS:            697.95
Flags:               half thumb fastmult vfp edsp java tls

model name	: ARMv6-compatible processor rev 7 (v6l)
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2835
Revision	: 9000c1
Model		: Raspberry Pi Zero W Rev 1.1

from cloudflared.

brbergami avatar brbergami commented on May 17, 2024

@sssilver Is there any kind of testing for armv6 or that's blocking the ticket? I could test it for some fix, but I have no way to compile to that architecture. PM me if you need a hand testing binaries.

from cloudflared.

FridayJew avatar FridayJew commented on May 17, 2024

Same on rpi 1B , i use this https://hobin.ca/cloudflared/ builds for fix problem. Thanks for this!

from cloudflared.

brbergami avatar brbergami commented on May 17, 2024

Same on rpi 1B , i use this https://hobin.ca/cloudflared/ builds for fix problem. Thanks for this!

Who maintains this? I mean, this is supposed to use a secure protocol to make queries, how safe is this build archive?
The main page doesn't makes me feel precisely comfortable.

from cloudflared.

brbergami avatar brbergami commented on May 17, 2024

@hobindar Thanks for clarifying.
Regarding building them by myself, I would love that, but on the device seems quite overkill to clone a repo, Golang and build, and outside I tried to achieve this using a VM and Arm Arch linux, quite a big deal..

'Lil big question there: In which these builds differs from the ones we can find in here? I can see that those are model targeted. Is just pull and build or some manual tweaking is done to deal with something extra?

from cloudflared.

hobindar avatar hobindar commented on May 17, 2024

Is just pull and build or some manual tweaking is done to deal with something extra?

There's no changes other than what's in that comment. It's just clone, tell go to build for ARMv6 and which cross-compiler to use, and build. No changes to source code, the binaries spat out by go, nor anything else.

from cloudflared.

FridayJew avatar FridayJew commented on May 17, 2024

'Lil big question there: In which these builds differs from the ones we can find in here?

these builds working on rpi 1b. Official build for rpi can be installed but not started.

from cloudflared.

brbergami avatar brbergami commented on May 17, 2024

It's just clone, tell go to build for ARMv6 and which cross-compiler to use, and build.

Any nice guide to follow/recommend? Not a golang person tbh.

these builds working on rpi 1b. Official build for rpi can be installed but not started.

Will try for the sake of curiosity. Thanks!

from cloudflared.

titanicshark avatar titanicshark commented on May 17, 2024

Here's how to install 2018.7.2

cd ~
wget https://bin.equinox.io/a/4SUTAEmvqzB/cloudflared-2018.7.2-linux-arm.tar.gz
mkdir argo-tunnel
tar -xvzf cloudflared-2018.7.2-linux-arm.tar.gz -C ./argo-tunnel
rm cloudflared-2018.7.2-linux-arm.tar.gz
cd argo-tunnel
./cloudflared --version

from cloudflared.

cshorler avatar cshorler commented on May 17, 2024

Same issue on: Raspberry Pi Model B Rev 2 (/proc/cpuinfo)

On trying to compile from source, I think the golang version is too old in Debian Buster (reading some errors) - so I compiled the golang backports dpkg source version to ensure no ABI issue on the machine as I haven't set up or tested a cross compiler yet. This took more than one attempt and several attempts for tests to pass, and they never did during the build process so I overrided to create the deb anyway and manually verified the failing tests (due to timeout). I probably should have checked if Raspbian did anything to that package prior to starting... too late!

go version go1.14 linux/arm

Then compiling cloudflared
go install -work -v -buildmode=pie ./cmd/cloudflared

and I have a working executable... although I'm new to cloudflared, so I haven't really got to the stage of testing anything yet.

Did anyone else do this? Are my build settings different from the release package? can we git bisect? (once I have a cross compiler working... this is far too slow on the Pi!)

from cloudflared.

cshorler avatar cshorler commented on May 17, 2024

the reason this fails is the released executable is compiled to Debian armhf standards which are incompatible with the first Pi - you can see this with readelf -A

for the current release:

pi@raspberrypi:~/Downloads $ readelf -A ./cloudflared
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: int
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6

note v7 and vfpv3, earlier Pi only have v6 and vfpv2.

here's the equivalent dump from my compilation result:

pi@raspberrypi:~/Downloads $ readelf -A /usr/local/bin/cloudflared 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "6"
  Tag_CPU_arch: v6
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_FP_arch: VFPv2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: int
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6

from cloudflared.

FrancisTurner avatar FrancisTurner commented on May 17, 2024

Who maintains this?

That would be me.

I mean, this is supposed to use a secure protocol to make queries, how safe is this build archive?

In my opinion, it's definitely safe. I left a comment earlier in this thread about how to build it yourself. If you follow all the instructions in that comment, I believe the resulting binaries should be bit-for-bit identical, allowing you to verify that I did not do anything malicious in my builds. If you ever find they are not identical, let me know and we can investigate why.
CC: @brbergami

FWIW I have created a script that will check and update the armv6 cloudflared by scraping your page

https://gist.github.com/FrancisTurner/f8d53c40a201bc28328a0e8742d710dc

If you would like me to use a different way to get the data please ping me.

Usage is fairly obvious and it can be run in (root) cron as all the paths are fully specified - I added a documentation page https://francisturner.github.io/checkv6cfd.html

It assumes that cloudflared is in /usr/local/bin/ and if you ran cloudflared install to add it as a systemd service it will correctly restart that service with the new binary. Note that in such a case you will want to have disabled the systemd cloudflared-update service and timer because they pull from the cloudflare source and give you the dreaded segfault when they update.

from cloudflared.

IndraGunawan avatar IndraGunawan commented on May 17, 2024

looks like there is something wrong with the build on hobin.ca/cloudflared hence i created a build repository for armv6 cloudflared https://github.com/indragunawan/cloudflared-armv6 (no code changes and all flows are publicly accessible)

check here for the latest release https://github.com/IndraGunawan/cloudflared-armv6/releases/latest

from cloudflared.

hobindar avatar hobindar commented on May 17, 2024

looks like there is something wrong with the build on hobin.ca/cloudflared

Sorry about that, I hadn't noticed the new builds on https://hobin.ca/cloudflared weren't being built properly.

They should all be working now. It was just a matter of updating the version of Go that is used by the build.

from cloudflared.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.