Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

cloudflare-tunnel-troubleshootcloudflare 隧道故障排除

Agent Skill

cloudflare-tunnel-troubleshoot 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

242

周安装

10

GitHub Stars

1

下载量

79
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cloudflare-tunnel-troubleshoot(cloudflare 隧道故障排除)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/cloudflare-tunnel-troubleshoot
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-tunnel-troubleshoot
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-tunnel-troubleshoot

简介

诊断 Cloudflare Tunnel 连接故障,检查容器状态与最近注册记录。

  • 提供 docker logs 查看错误、重启服务与验证隧道活跃性的命令。
  • 涵盖 token 失效、网络阻断、端口冲突等典型问题解决方案。
  • 支持多服务共存时的命名空间隔离与 compose 文件管理。
  • 遇到持续断开时应检查防火墙规则与 cloudflared 版本是否为最新。

SKILL.md

Troubleshoot Cloudflare Tunnel Skill

Systematic diagnosis and resolution of Cloudflare Tunnel connectivity issues that prevent remote access to services.

Quick Start

Quick diagnostic for tunnel issues:

# Check cloudflared container status
docker ps | grep cloudflared

# Check recent tunnel registrations (should be within 10 minutes)
docker logs cloudflared --tail 100 | grep "Registered tunnel"

# Check for errors
docker logs cloudflared --tail 50 | grep -i error

# Restart if stuck
docker compose -f /home/dawiddutoit/projects/network/docker-compose.yml restart cloudflared

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Instructions

- 3.1 Check Cloudflared Container Status - 3.2 Verify Tunnel Token Configuration - 3.3 Check Recent Tunnel Registrations - 3.4 Analyze Tunnel Logs for Errors - 3.5 Verify Tunnel in Cloudflare Dashboard - 3.6 Test Remote Access - 3.7 Apply Fix

  1. Supporting Files
  2. Expected Outcomes
  3. Requirements
  4. Red Flags to Avoid

When to Use This Skill

Explicit Triggers:

  • "Tunnel not connecting"
  • "Tunnel down"
  • "Error 1033"
  • "Remote access not working"
  • "Fix Cloudflare Tunnel"
  • "Cloudflared not working"

Implicit Triggers:

  • Services work locally but not remotely
  • Cloudflare dashboard shows tunnel as disconnected
  • 502 Bad Gateway when accessing from internet
  • Cloudflared container in restart loop

Debugging Triggers:

  • "Why isn't remote access working?"
  • "Why is tunnel disconnected?"
  • "What is Error 1033?"

What This Skill Does

  1. Checks Container - Verifies cloudflared container is running
  2. Validates Token - Confirms CLOUDFLARE_TUNNEL_TOKEN is set
  3. Checks Registrations - Verifies tunnel has registered recently (within 10 min)
  4. Analyzes Logs - Searches for Error 1033, QUIC issues, connection failures
  5. Checks Dashboard - Verifies tunnel status in Cloudflare Zero Trust
  6. Tests Access - Attempts remote connection to verify tunnel routing
  7. Provides Fix - Gives specific recovery commands

Instructions

3.1 Check Cloudflared Container Status

docker ps | grep cloudflared

Expected: Container status "Up" with uptime > 1 minute

Check container health:

docker inspect cloudflared --format='{{.State.Status}}: {{.State.Health.Status}}'

If not running or unhealthy:

# Check why it stopped
docker logs cloudflared --tail 100

# Restart
docker compose -f /home/dawiddutoit/projects/network/docker-compose.yml up -d cloudflared

If in restart loop:

  • Token likely invalid or missing
  • Network connectivity issue
  • Proceed to step 3.2

3.2 Verify Tunnel Token Configuration

Check token is set in environment:

docker exec cloudflared env | grep TUNNEL_TOKEN

Expected: Shows long base64-encoded token

If empty or missing:

  1. Check.env file:
grep CLOUDFLARE_TUNNEL_TOKEN /home/dawiddutoit/projects/network/.env
  1. Verify docker-compose.yml passes it:
grep -A5 "cloudflared:" /home/dawiddutoit/projects/network/docker-compose.yml | grep TUNNEL_TOKEN
  1. Get new token from Cloudflare dashboard:

- Go to: https://one.dash.cloudflare.com → Access → Tunnels - Click on tunnel → Configure - Copy token from command

  1. Update.env and recreate container:
# Edit .env with new token
nano /home/dawiddutoit/projects/network/.env

# Recreate container
docker compose -f /home/dawiddutoit/projects/network/docker-compose.yml up -d --force-recreate cloudflared

3.3 Check Recent Tunnel Registrations

Healthy tunnel registers connections every few minutes:

# Check recent registrations (last 100 lines)
docker logs cloudflared --tail 100 | grep "Registered tunnel"

# Check timestamp of most recent registration
docker logs cloudflared --tail 100 | grep "Registered tunnel" | tail -1

Expected: Registration within last 10 minutes

If no recent registrations (older than 10 minutes):

  • Tunnel is stuck or disconnected
  • QUIC connection may have failed
  • Network connectivity issue

Check QUIC connection health:

docker logs cloudflared --tail 100 | grep -i quic

3.4 Analyze Tunnel Logs for Errors

Search for common error patterns:

# Check for Error 1033 (tunnel disconnected)
docker logs cloudflared --tail 100 | grep "1033"

# Check for general errors
docker logs cloudflared --tail 100 | grep -i error

# Check for authentication issues
docker logs cloudflared --tail 100 | grep -i "auth\|unauthorized\|forbidden"

# Check for network issues
docker logs cloudflared --tail 100 | grep -i "connect\|timeout\|dial"

Common error patterns:

ErrorMeaningFix
Error 1033Tunnel disconnected/stuckRestart cloudflared container
context deadline exceededNetwork timeoutCheck internet connectivity
unauthorizedInvalid tunnel tokenGet new token from dashboard
failed to connect to edgeCan't reach CloudflareCheck firewall/network
no such hostDNS resolution failureCheck DNS settings

3.5 Verify Tunnel in Cloudflare Dashboard

Check tunnel status in Cloudflare Zero Trust:

  1. Go to: https://one.dash.cloudflare.com
  2. Navigate to: Access → Tunnels
  3. Find your tunnel in list

Expected status: "Healthy" with green indicator

If "Down" or "Unhealthy":

  • Tunnel not connected from server side
  • Proceed to restart (step 3.7)

Check tunnel routes:

  1. Click tunnel name → Configure
  2. Verify Public Hostname routes are configured
  3. Expected routes:

- pihole.temet.ai → https://caddy:443 - ha.temet.ai → https://caddy:443 - jaeger.temet.ai → https://caddy:443 - etc.

3.6 Test Remote Access

Test accessing a service from internet (not local WiFi):

From mobile (using cellular data, not WiFi):

https://pihole.temet.ai

Expected: Cloudflare Access login page appears (or service if already authenticated)

Alternatively, use external proxy:

# Test from external service
curl -I --connect-timeout 10 https://pihole.temet.ai

If connection fails:

  • 502 Bad Gateway → Tunnel not routing correctly
  • Timeout → Tunnel not connected
  • Connection refused → Cloudflared not running
  • SSL error → Certificate issue (different skill)

3.7 Apply Fix

Fix A: Stuck Tunnel (most common)

Restart cloudflared container:

docker compose -f /home/dawiddutoit/projects/network/docker-compose.yml restart cloudflared

Wait 30 seconds, then verify:

docker logs cloudflared --tail 20 | grep "Registered tunnel"

Expected: Fresh registrations appearing

Fix B: Invalid Token

Get new token and recreate container:

# 1. Get new token from dashboard:
#    https://one.dash.cloudflare.com → Access → Tunnels → Configure

# 2. Update .env
nano /home/dawiddutoit/projects/network/.env
# Add: CLOUDFLARE_TUNNEL_TOKEN="new-token-here"

# 3. Recreate container
docker compose -f /home/dawiddutoit/projects/network/docker-compose.yml up -d --force-recreate cloudflared

# 4. Verify
docker logs cloudflared --tail 20

Fix C: Network Connectivity Issue

Check internet connectivity:

# Test connectivity to Cloudflare
docker exec cloudflared ping -c 3 1.1.1.1

# Test DNS resolution
docker exec cloudflared nslookup cloudflare.com

# Check container network
docker network inspect network_default

If network issues found, may need to recreate Docker network (see Docker network troubleshooting).

Fix D: Complete Tunnel Reset

If all else fails, full reset:

# Stop all services
cd /home/dawiddutoit/projects/network && \
docker compose down

# Recreate network
docker network rm network_default
docker network create network_default

# Start services
docker compose up -d

# Monitor tunnel connection
docker logs cloudflared -f

Watch for "Registered tunnel" messages appearing.

Supporting Files

FilePurpose
references/reference.mdCloudflare Tunnel architecture, Error 1033 details, QUIC protocol
examples/examples.mdExample log outputs, common scenarios

Expected Outcomes

Success:

  • Cloudflared container running and healthy
  • Recent tunnel registrations (within 10 minutes)
  • Tunnel shows "Healthy" in Cloudflare dashboard
  • Remote access works with OAuth prompt
  • No Error 1033 in logs

Partial Success:

  • Tunnel connecting but routes not configured (add routes in dashboard)
  • Tunnel working but intermittent (network instability)

Failure Indicators:

  • Cloudflared container not running or restarting
  • No tunnel registrations in logs
  • Error 1033 persists after restart
  • Remote access returns 502 Bad Gateway

Requirements

  • Docker running with cloudflared container
  • Valid Cloudflare Tunnel token
  • Internet connectivity from server
  • Cloudflare Zero Trust account
  • Tunnel configured in Cloudflare dashboard

Red Flags to Avoid

  • Do not delete tunnel in Cloudflare dashboard (creates orphaned token)
  • Do not expose ports 80/443 if tunnel not working (security risk)
  • Do not skip checking logs before restart (miss root cause)
  • Do not restart tunnel repeatedly (causes rate limiting)
  • Do not test remote access from local WiFi (use cellular/external)
  • Do not confuse tunnel token with API token (different credentials)
  • Do not modify tunnel routes without updating Caddyfile

Notes

  • Tunnel registrations should occur every few minutes (QUIC keep-alive)
  • Error 1033 typically indicates stuck/stale tunnel process
  • Tunnel uses outbound QUIC connection (no inbound ports needed)
  • Maximum tunnel downtime before auto-disconnect: ~10 minutes
  • Automated monitoring (infrastructure-monitor.sh) detects stuck tunnels
  • Tunnel routes are configured in Cloudflare dashboard, not locally
  • Use infrastructure-health-check skill for comprehensive diagnostics

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.2%
按下载量换算29

Claude

31.12%
按下载量换算25

Cursor

17.03%
按下载量换算13

Gemini CLI

8.66%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills