================================================================================ CLOUDFLARE TUNNEL CONFIGURATION - OPERATIONAL STATUS REPORT ================================================================================ Date: 2025-11-25 Tunnel Name: archie-ui-dev Domain: app-dev.heyarchie.com Status: OPERATIONAL ================================================================================ 1. TUNNEL PROCESS STATUS ================================================================================ Process ID: 827701 Command: cloudflared tunnel --config /home/stuart/.cloudflared/config-app-dev.yml run archie-ui-dev Memory: 39 MB CPU: 0.2% Status: Running in background (nohup) ================================================================================ 2. CONFIGURATION DETAILS ================================================================================ Config File: /home/stuart/.cloudflared/config-app-dev.yml Credentials: /home/stuart/.cloudflared/a9f55e3d-783c-464a-ae68-c5f10ab840b7.json Transport: QUIC (UDP-based, lower latency) Log Level: Debug ================================================================================ 3. INGRESS ROUTING RULES ================================================================================ Rule 1 - API Endpoints (Priority: Highest) Hostname: app-dev.heyarchie.com Path Pattern: /api/* Backend Service: http://localhost:8000 (FastAPI) Status: ACTIVE Rule 2 - Health Check Endpoint Hostname: app-dev.heyarchie.com Path: /health Backend Service: http://localhost:8000 (FastAPI) Status: ACTIVE Rule 3 - API Documentation Hostname: app-dev.heyarchie.com Paths: /docs, /openapi.json Backend Service: http://localhost:8000 (FastAPI) Status: ACTIVE Rule 4 - WebSocket Support Hostname: app-dev.heyarchie.com Path Pattern: /ws/* Backend Service: ws://localhost:8000 (WebSocket) Status: ACTIVE Rule 5 - Frontend Routes (Default) Hostname: app-dev.heyarchie.com Path: /* (catch-all) Backend Service: http://localhost:3000 (Vite) Status: ACTIVE Rule 6 - Unmapped Requests Service: http_status:404 Returns: 404 Not Found ================================================================================ 4. CONNECTIVITY TEST RESULTS ================================================================================ Test 1: Backend Health Endpoint (Direct) Endpoint: https://app-dev.heyarchie.com/health Request: GET /health Ingress Rule: Rule 2 (originService=http://localhost:8000) Response Status: 200 OK Response Body: {"status":"healthy","version":"0.1.0","timestamp":"2025-11-25T17:40:04.930443","uptime_seconds":1896.71} Result: SUCCESS Test 2: Frontend (Default Route) Endpoint: https://app-dev.heyarchie.com/ Request: GET / Ingress Rule: Rule 5 (originService=http://localhost:3000) Response Status: 200 OK Response: HTML page (Vite frontend) Result: SUCCESS Test 3: API Path Routing Endpoint: https://app-dev.heyarchie.com/api/health Request: GET /api/health Ingress Rule: Rule 1 (originService=http://localhost:8000) Response Status: 404 Not Found (Expected - no /api/health endpoint on backend) Response: {"error":true,"status_code":404,"message":"Not Found",...} Result: SUCCESS (Routing verified, backend handling request) ================================================================================ 5. BACKEND SERVICE STATUS ================================================================================ Frontend (Vite Dev Server) Port: 3000 Status: Running Verification: curl http://localhost:3000 returns HTML Latency: Sub-100ms Backend API (FastAPI) Port: 8000 Status: Running Health Check: {"status":"healthy","version":"0.1.0","uptime_seconds":1896.71} Verification: curl http://localhost:8000/health returns 200 OK Latency: Sub-50ms ================================================================================ 6. TUNNEL CONNECTION DETAILS ================================================================================ Active Connections: 4 (QUIC) Connection 1: id=764349be-4ada-476c-b5d5-6f7eeafeca42, location=iad10 Connection 2: id=0b78a240-3a46-4eaa-97ad-0005e3ff2df4, location=iad08 Connection 3: id=47ecaec4-3f27-4dfc-a9e2-89b21a470041, location=iad16 Connection 4: id=0fd768a0-1828-4290-b583-169c008f8de8, location=iad05 Edge Discovery: Working Resolved 20 edge addresses (IPv4 and IPv6) QUIC MTU Negotiation: Successful (1375 bytes) Metrics Server: Active Endpoint: 127.0.0.1:20241/metrics ================================================================================ 7. EXACT COMMANDS EXECUTED ================================================================================ Start Tunnel (Background Process): $ cd /home/stuart && nohup cloudflared tunnel --config /home/stuart/.cloudflared/config-app-dev.yml run archie-ui-dev > /home/stuart/.cloudflared/config-app-dev.log 2>&1 & Verify Running: $ ps aux | grep cloudflared | grep -v grep Test Health Endpoint: $ curl https://app-dev.heyarchie.com/health Test Frontend: $ curl https://app-dev.heyarchie.com/ Test API Routing: $ curl https://app-dev.heyarchie.com/api/health View Tunnel Logs: $ tail -f /home/stuart/.cloudflared/config-app-dev.log ================================================================================ 8. CONFIGURATION FILE CONTENT ================================================================================ Location: /home/stuart/.cloudflared/config-app-dev.yml tunnel: a9f55e3d-783c-464a-ae68-c5f10ab840b7 credentials-file: /home/stuart/.cloudflared/a9f55e3d-783c-464a-ae68-c5f10ab840b7.json # Tunnel configuration loglevel: debug transport-layer: quic ingress: # API routes go to backend on port 8000 - hostname: app-dev.heyarchie.com path: /api/* service: http://localhost:8000 # Health check endpoints - hostname: app-dev.heyarchie.com path: /health service: http://localhost:8000 # API documentation endpoints - hostname: app-dev.heyarchie.com path: /docs service: http://localhost:8000 - hostname: app-dev.heyarchie.com path: /openapi.json service: http://localhost:8000 # WebSocket routes for backend - hostname: app-dev.heyarchie.com path: /ws/* service: ws://localhost:8000 # Everything else goes to frontend Vite server on port 3000 - hostname: app-dev.heyarchie.com service: http://localhost:3000 # Catch-all for unmapped requests - service: http_status:404 ================================================================================ 9. SUMMARY ================================================================================ The Cloudflare tunnel is now fully operational. The error 530 has been resolved. Changes Made: 1. Updated configuration with proper ingress rules (highest to lowest priority) 2. Added explicit logging (debug level) for troubleshooting 3. Added transport-layer QUIC configuration 4. Organized rules with clear comments 5. Restarted tunnel with enhanced logging What's Working: ✓ Frontend Vite (port 3000) accessible via https://app-dev.heyarchie.com/ ✓ Backend API (port 8000) accessible via https://app-dev.heyarchie.com/api/* ✓ Health endpoints responding correctly ✓ Path-based routing functioning correctly ✓ WebSocket support configured for /ws/* paths ✓ Four redundant QUIC connections to Cloudflare edge ✓ Metrics collection active Next Steps (Optional): - Monitor logs periodically: tail -f /home/stuart/.cloudflared/config-app-dev.log - Add error page handling via Cloudflare dashboard - Enable rate limiting on Cloudflare dashboard - Setup monitoring alerts Log File Location: Real-time logs: /home/stuart/.cloudflared/config-app-dev.log ================================================================================