Tunnel·续
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/cloudflare-one/networks/connectors/cloudflare-tunnel/configure-tunnels/origin-parameters/):
```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/cloudflare-one/networks/connectors/cloudflare-tunnel/configure-tunnels/origin-parameters/). 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/cloudflare-one/networks/connectors/cloudflare-tunnel/monitor-tunnels/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/cloudflare-one/networks/connectors/cloudflare-tunnel/availability/ulimits/) 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.
---
## More Tunnel resources
For more information, refer to the full Tunnel troubleshooting guide.
[Full Tunnel troubleshooting guide ❯](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/troubleshoot-tunnels/)
Was this helpful?
YesNo
## On this page
[Docs](https://developers.cloudflare.com/)
```json
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/cloudflare-one/troubleshooting/tunnel/#page","headline":"Tunnel","description":"Tunnel for Zero Trust.","url":"https://developers.cloudflare.com/cloudflare-one/troubleshooting/tunnel/","inLanguage":"en","image":"https://developers.cloudflare.com/cloudflare-one/troubleshooting/tunnel/og.png?v=55ad55c7ab9d5e27","dateModified":"2026-09-02","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/"}}
description: Cloudflare One Client for Zero Trust. title: Cloudflare One Client image: https://developers.cloudflare.com/cloudflare-one/troubleshooting/warp-client/og.png?v=ac442acb788a02de
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/cloudflare-one/llms.txt
Use this file to discover all available pages before exploring further.
