cloudflare / cloudflare/cloudflared
cloudflared config directory moved from /usr/local/bin/cloudflared to /usr/bin/cloudflared
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
In the latest update of the rpm package for RHEL version 2022.12.1 (https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-x86_64.rpm) the path for the cloudflared start config was moved from /usr/local/bin/cloudflared to /usr/bin/cloudflared. For those who use the cloudflared.service the "ExecStart" argument was previously set to /usr/local/bin/cloudflared and after updating to the latest version the service will fail to start with the following error:
```
INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
INF Version 2022.12.1
INF GOOS: linux, GOVersion: go1.19.3, GoArch: amd64
INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/as-a-service/
INF Cannot determine default origin certificate path. No file cert.pem in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared] originCertPath=
ERR You need to specify the origin certificate path with --origincert option, or set TUNNEL_ORIGIN_CERT environment variable. See https://developers.cloudflare.com/argo-tunnel/reference/arguments/ for more information. originCertPath=
ERR Couldn't start tunnel error="Error getting origin cert: client didn't specify origincert path when running from terminal"
```
**To Reproduce**
Steps to reproduce the behavior:
1. Update cloudflared (ex: curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-x86_64.rpm -o cf.rpm)
2. sudo yum install ./cf.rpm
3. sudo systemctl start cloudflared
**Expected behavior**
I would expect the location of the config file to not change out of the blue. This change is not documented and results in a total DNS failure.
**Environment and versions**
- OS: AlmaLinux 9.1
- Architecture: Intel 64 bit
- Version: 2022.12.1
**Logs and errors**
```
INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
INF Version 2022.12.1
INF GOOS: linux, GOVersion: go1.19.3, GoArch: amd64
INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/as-a-service/
INF Cannot determine default origin certificate path. No file cert.pem in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared] originCertPath=
ERR You need to specify the origin certificate path with --origincert option, or set TUNNEL_ORIGIN_CERT environment variable. See https://developers.cloudflare.com/argo-tunnel/reference/arguments/ for more information. originCertPath=
ERR Couldn't start tunnel error="Error getting origin cert: client didn't specify origincert path when running from terminal"
```
Contributor guide
Assessment
This issue has not been assessed yet.