Troubleshooting (27)·续
Origin service URL points to the wrong port
If the port in your tunnel route does not match the port your service is listening on, cloudflared will log a connection refused error for that port. Double-check the service URL in your ingress rule and compare it against the port your application is bound to.
cloudflared cannot validate the origin certificate
If the origin presents a TLS certificate that cloudflared cannot verify, the logs will show an error similar to:
error="x509: certificate is valid for example.com, not localhost"
This error indicates that the certificate does not cover the service hostname. An x509: certificate signed by unknown authority error instead indicates that cloudflared does not trust the certificate authority.
To resolve, use one of the following approaches:
- Set
originServerNameto the hostname on the origin certificate in your tunnel route. If you are using a locally-managed tunnel, here is an example of a configuration file:
ingress:
- hostname: app.example.com
service: https://localhost:443
originRequest:
originServerName: app.example.com
```
- Provide the CA certificate using [`caPool`](https://developers.cloudflare.com/tunnel/reference/origin-parameters/#capool):
```yml
ingress:
- hostname: app.example.com
service: https://localhost:443
originRequest:
caPool: /path/to/ca-cert.pem
```
- As a temporary last resort, disable TLS verification with [`noTLSVerify`](https://developers.cloudflare.com/tunnel/reference/origin-parameters/#notlsverify). Turn it off after resolving the certificate issue.
```yml
ingress:
- hostname: app.example.com
service: https://localhost:443
originRequest:
noTLSVerify: true
```
## A published application returns `ERR_TOO_MANY_REDIRECTS`.
This error can occur when the origin redirects HTTP requests to HTTPS but the published application route uses an `http://` `Service URL`. Each request reaches the origin over HTTP and receives the same redirect.
To choose the correct service URL and origin settings, refer to [Troubleshoot HTTPS origins](https://developers.cloudflare.com/tunnel/troubleshooting/https-origins/). If the redirect chain alternates between HTTP and HTTPS, also refer to [ERR\_TOO\_MANY\_REDIRECTS](https://developers.cloudflare.com/ssl/troubleshooting/too-many-redirects/).
## `cloudflared access` shows an error `websocket: bad handshake`.
This means that your `cloudflared access` client is unable to reach your `cloudflared tunnel` origin. To diagnose this, look at the `cloudflared tunnel` logs. A common root cause is that the `cloudflared tunnel` is unable to proxy to your origin (for example, because the ingress is misconfigured, the origin is down, or the origin HTTPS certificate cannot be validated by `cloudflared tunnel`). If `cloudflared tunnel` has no logs, it means Cloudflare's network is not able to route the websocket traffic to it.
There are several possible root causes behind this error:
- Your `cloudflared tunnel` is either not running or not connected to Cloudflare's network.
- WebSockets are not [enabled](https://developers.cloudflare.com/network/websockets/#enable-websockets).
- Your Cloudflare account has Universal SSL enabled but your SSL/TLS encryption mode is set to **Off (not secure)**. To resolve, go to **SSL/TLS** > **Overview** in the Cloudflare dashboard and set your SSL/TLS encryption mode to **Flexible**, **Full**, or **Full (strict)**.
- Your requests are blocked by [Super Bot Fight Mode](https://developers.cloudflare.com/bots/get-started/super-bot-fight-mode/). To resolve, make sure you set **Definitely automated** to *Allow* in the bot fight mode settings.
- Your SSH or RDP Access application has the [Binding Cookie](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/authorization-cookie/#binding-cookie) enabled. To disable the cookie, go to **Access controls** > **Applications** and edit the application settings.
- One or more [Workers routes](https://developers.cloudflare.com/workers/configuration/routing/routes/) are overlapping with the tunnel hostname, and the Workers do not properly handle the traffic. To resolve, either exclude your tunnel from the Worker route by not defining a route that includes the tunnel's hostname, or update your Worker to only handle specific paths and forward all other requests to the origin (for example, by using `return fetch(req)`).
## Tunnel connections fail with SSL error.
If `cloudflared` returns error `error="remote error: tls: handshake failure"`, check to make sure the hostname in question is covered by a SSL certificate. If using a multi-level subdomain, an [advanced certificate](https://developers.cloudflare.com/ssl/edge-certificates/advanced-certificate-manager/) may be required as the Universal SSL will not cover more than one level of subdomain. This may surface in the browser as `ERR_SSL_VERSION_OR_CIPHER_MISMATCH`.
## Tunnel connections fail with `Too many open files` error.
If your [Cloudflare Tunnel logs](https://developers.cloudflare.com/tunnel/observability/#logs) return a `socket: too many open files` error, it means that `cloudflared` has exhausted the open files limit on your machine. The maximum number of open files, or file descriptors, is an operating system setting that determines how many files a process is allowed to open. To increase the open file limit, you will need to [configure ulimit settings](https://developers.cloudflare.com/tunnel/platform/system-requirements/#ulimits-linux-and-macos) on the machine running `cloudflared`.
## I see `failed to sufficiently increase receive buffer size` in my cloudflared logs.
This buffer size increase is reported by the [quic-go library ↗︎](https://github.com/quic-go/quic-go) leveraged by [cloudflared ↗︎](https://github.com/cloudflare/cloudflared). You can learn more about the log message in the [quic-go repository ↗︎](https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes). This log message is generally not impactful and can be safely ignored when troubleshooting. However, if you have deployed `cloudflared` within a unique, high-bandwidth environment then buffer size can be manually overridden for testing purposes.
To set the maximum receive buffer size on Linux:
1. Create a new file under `/etc/sysctl.d/`:
```sh
sudo vi 98-core-rmem-max.conf
```
2. In the file, define the desired buffer size:
```txt
net.core.rmem_max=2500000
```
3. Reboot the host machine running `cloudflared`.
4. To validate that these changes have taken effect, use the `grep` command:
```sh
sudo sysctl -a | grep net.core.rmem_max
```
```sh
net.core.rmem_max = 2500000
```
## Cloudflare Tunnel is buffering my streaming response instead of streaming it live.
Proxied traffic through Cloudflare Tunnel is buffered by default unless the origin server includes the `Content-Type: text/event-stream` response header. This header tells `cloudflared` to stream data as it arrives instead of buffering the entire response.
## Cloudflare Tunnel fails to connect through Palo Alto Networks Next-Generation Firewall
Cloudflare recently became aware of a change in Palo Alto Networks Next Generation Firewall (NGFW) App-ID database version 9128 that affects the requirements for permitting Cloudflare Tunnel and Cloudflare One Client traffic.
Palo Alto Networks Next Generation Firewall (NGFW) detects both Cloudflare Tunnel (`cloudflared`) and the Cloudflare One Client (WARP with Zero Trust) as `cloudflare-warp`, regardless of the App-ID database version. There is currently no separate App-ID for `cloudflared`.
This issue is likely to impact the Cloudflare One Client and WARP client, because Palo Alto Networks NGFW identifies their traffic as `cloudflare-warp`.
This section focuses on Cloudflare Tunnel (`cloudflared`) connecting to Cloudflare over QUIC (UDP port `7844`).
Starting with App-ID database version 9128 (released on July 27, 2026), NGFW changed the requirements for permitting this traffic. App-ID database version 9128 and later requires you to explicitly allow the `quic-base` application in addition to the previously required App-IDs and their dependencies.
To restore connectivity, either revert the App-ID database or explicitly allow the required applications and UDP port.
### Option 1: Revert the App-ID database
Revert to App-ID database version 9127 and disable automatic App-ID updates until Palo Alto Networks provides a permanent resolution.
If you revert the App-ID database, treat this as a temporary mitigation and coordinate with your security team. Re-enable automatic updates once Palo Alto Networks provides a permanent resolution.
### Option 2: Configure an explicit firewall policy
#### Create a custom service for UDP port 7844
1. In PAN-OS, go to **Objects** > **Services**.
2. Create a service with the following settings:
| Setting | Value |
| --- | --- |
| Name | `cloudflared_7844_udp` |
| Description | Optional |
| Protocol | UDP |
| Destination Port | `7844` |
| Source Port | Leave blank |
| Session Timeout | Inherit from application |
3. Select **OK**.
#### Create or update a firewall rule
1. Go to **Policies**.
2. Create or modify a **universal** or **interzone** firewall rule.
3. Configure the **Source** and **Destination** criteria to match the relevant traffic flows in your environment:
- **Source**: Select the appropriate Source Zone and/or Source Address.
- **Destination**: Select the appropriate Destination Zone and/or Destination Address.
4. Under **Application**, add all of the following applications:
- `cloudflare-warp`
- `quic-base`
5. Under **Service/URL Category**, add the custom service `cloudflared_7844_udp`.
6. Set the rule **Action** to **Allow**.
7. Enable logging according to your organization's security policy.
8. Commit the policy change, then verify that Cloudflare Tunnel can establish and maintain connections through the firewall.
## How do I contact support?
For the fastest possible troubleshooting, ensure your support ticket includes comprehensive details. The more context you provide, the faster your issue can be identified and resolved.
To ensure efficient resolution when [contacting support](https://developers.cloudflare.com/support/contacting-cloudflare-support/), include as much relevant detail as possible in your ticket:
- Context: Briefly describe the scenario or use case (for example, where the user was, what they were trying to do).
- Reproduction steps: Describe the steps you took to reproduce the issue during troubleshhooting.
- Timestamps: Be specific and include the exact time and time zone when the issue occurred.
- Troubleshooting attempts: Outline any troubleshooting steps or changes already attempted to resolve the issue.
- Tunnel ID and tunnel name.
- `cloudflared` version (run `cloudflared --version`).
- How the tunnel was set up (locally-managed or remotely-managed via the dashboard).
- Tunnel logs: Include the [logs from your local machine](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/monitor-tunnels/logs/#view-logs-on-your-local-machine).
- Tunnel diagnostic logs: Include [tunnel diagnostic logs](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/troubleshoot-tunnels/diag-logs/).
Write a detailed ticket to resolve your issue faster
Avoid vague descriptions and include scenario, timestamps, and steps taken to troubleshoot the issue. Refer to the following example:
Acme Corp attempted to establish a tunnel connection on October 30, 2025, at approximately 3:45 PM UTC. DNS resolution and TCP connectivity tests passed, but the `cloudflared` daemon logs showed `failed to sufficiently increase receive buffer size` errors. The tunnel diagnostic logs collected at 3:50 PM UTC are attached, along with the output from the DNS and network connectivity pre-checks.
### Collect debug logs
To capture verbose output for troubleshooting:
- **Locally-managed tunnels**: Run `cloudflared` with the `--loglevel debug` flag:
```sh
cloudflared tunnel --loglevel debug run
```
To persist logs to a file, add the `--logfile` flag:
```sh
cloudflared tunnel --loglevel debug --logfile /var/log/cloudflared/cloudflared.log run
```
- **Remotely-managed tunnels** (created via the dashboard): Configure logging in the tunnel's [run parameters](https://developers.cloudflare.com/tunnel/reference/run-parameters/#loglevel). You can also stream logs in real time using the [remote log streaming](https://developers.cloudflare.com/tunnel/observability/#remote-log-streaming) feature.
Attach the debug logs when contacting support — refer to the checklist above for the full list of information to include.
Was this helpful?
YesNo
## On this page
[Docs](https://developers.cloudflare.com/)
```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/tunnel/troubleshooting/#page","headline":"Troubleshooting","description":"Resolve common Cloudflare Tunnel connection and configuration issues.","url":"https://developers.cloudflare.com/tunnel/troubleshooting/","inLanguage":"en","image":"https://developers.cloudflare.com/tunnel/troubleshooting/og.png?v=bbf58d2607cabecc","dateModified":"2026-09-11","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Debugging"]}
description: Troubleshoot Cloudflare Tunnel HTTPS origins, including Let's Encrypt certificates, service URLs, SSL/TLS modes, and redirect loops. title: Troubleshoot HTTPS origins with Cloudflare Tunnel image: https://developers.cloudflare.com/tunnel/troubleshooting/https-origins/og.png?v=375252adae432ee7
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/tunnel/llms.txt
Use this file to discover all available pages before exploring further.
