cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
Apache License 2.0
8.78k stars 776 forks source link

🐛 remote error: tls: bad certificate on previously working tunnel #1293

Closed philwinder closed 1 month ago

philwinder commented 1 month ago

Describe the bug Been using tunnels for years. Sometime this week cloudflared started crashlooping with:

remote error: tls: bad certificate

To Reproduce I created a new tunnel and I see the same problem. To reproduce, just create a new tunnel and hook it up to docker cloudflared.

If it's an issue with Cloudflare Tunnel:

  1. Tunnel ID : This is the original ID: b19fdf88-e5c8-4d51-941c-d27c0312fdcd
  2. cloudflared config:
    tunnel: b19fdf88-e5c8-4d51-941c-d27c0312fdcd
    credentials-file: /etc/cloudflared/creds/credentials.json
    metrics: 0.0.0.0:2000
    no-autoupdate: true
    ingress:
    - hostname: "*.XXXX.XXXX" # My dns name
      service: http://traefik.kube-system.svc.cluster.local
    - service: http_status:404

Environment and versions

Logs and errors

2024-07-13T16:54:35Z INF Starting tunnel tunnelID=b19fdf88-e5c8-4d51-941c-d27c0312fdcd
2024-07-13T16:54:35Z INF Version 
2024-07-13T16:54:35Z INF GOOS: linux, GOVersion: go1.15.7, GoArch: amd64
2024-07-13T16:54:35Z INF Settings: map[config:/etc/cloudflared/config/config.yaml cred-file:/etc/cloudflared/creds/credentials.json credentials-file:/etc/cloudflared/creds/credentials.json metrics:0.0.0.0:2000 no-autoupdate:true]
2024-07-13T16:54:35Z INF Generated Connector ID: 3024eafd-d5fc-44dc-9d3a-447ec83f2b6c
2024-07-13T16:54:35Z INF Initial protocol h2mux
2024-07-13T16:54:35Z INF Starting metrics server on [::]:2000/metrics
2024-07-13T16:54:35Z INF Starting Hello World server at 127.0.0.1:42227
2024-07-13T16:54:35Z ERR Connection failed error="remote error: tls: bad certificate" connIndex=0
2024-07-13T16:54:35Z ERR Serve tunnel error error="remote error: tls: bad certificate" connIndex=0
2024-07-13T16:54:35Z INF Tunnel server stopped
2024-07-13T16:54:35Z ERR Initiating shutdown error="remote error: tls: bad certificate"
2024-07-13T16:54:36Z INF Metrics server stopped
remote error: tls: bad certificate
philwinder commented 1 month ago

I think I fixed this by updating the container image to the most recent.