cloudflare / cloudflare/cloudflared

🐛Calibre-Web errors in CF tunnel

Open
#1,387 0 comments 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I'm running calibre-web in docker alongside a cloudflared container. Calibre-web works perfectly on the LAN and also works behind nginx proxy manager with LetsEncrypt certs. However, when I access through my public domain and the cloudflare tunnel I get errors when trying use the "read in browser" and "send ebook to kindle" functions. Either nothing happens (send to kindle) or the new window opens but remains blank (read in browser). Calibre-web gives no errors. This setup has been working correctly for several years and I'm not sure when the issue started.

**To Reproduce**
Steps to reproduce the behavior:
1. Spin up Calibre-Web container and set up a public hostname in zero trust
2. Log in, browse to any book, click the "read in browser" button
3. See error

If it's an issue with Cloudflare Tunnel:
5. cloudflared config (compose):

` cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared
command: tunnel run --token
restart: unless-stopped`

**Expected behavior**
The new window should display the ebook contents or the button should queue up the book for emailing.

**Environment and versions**
- OS: Ubuntu 22.04.5 LTS
- Architecture: x64
- Docker: latest
- Cloudflared:latest
- Calibre-web:latest

**Logs and errors**
This is the only error that I can see in the tunnel and calibre-web logs:

`ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp LAN-IP:8083: connect: connection refused" connIndex=1 event=1 ingressRule=1 originService=LAN-IP:8083`

**Additional context**
All my config is pretty basic. I even tried spinning up fresh containers for the tunnel and calibre-web with all default settings and still get the same error. I've also tried turning off compression and chunked encoding.

Any help with diagnosing or fixes to try would be greatly appreciated!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.