Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/spectrum/gotchas.md
1## Common Issues23### Connection Timeouts45**Problem:** Connections fail or timeout6**Cause:** Origin firewall blocking Cloudflare IPs, origin service not running, incorrect DNS7**Solution:**81. Verify origin firewall allows Cloudflare IP ranges92. Check origin service running on correct port103. Ensure DNS record is CNAME (not A/AAAA)114. Verify origin IP/hostname is correct1213```bash14# Test connectivity15nc -zv app.example.com 2216dig app.example.com17```1819### Client IP Showing Cloudflare IP2021**Problem:** Origin logs show Cloudflare IPs not real client IPs22**Cause:** Proxy Protocol not enabled or origin not configured23**Solution:**24```typescript25// Enable in Spectrum app26const app = await client.spectrum.apps.create({27// ...28proxy_protocol: 'v1', // TCP: v1/v2; UDP: simple29});30```3132**Origin config:**33- **nginx**: `listen 22 proxy_protocol;`34- **HAProxy**: `bind :22 accept-proxy`3536### TLS Errors3738**Problem:** TLS handshake failures, 525 errors39**Cause:** TLS mode mismatch4041| Error | TLS Mode | Problem | Solution |42|-------|----------|---------|----------|43| Connection refused | `full`/`strict` | Origin not TLS | Use `tls: "off"` or enable TLS |44| 525 cert invalid | `strict` | Self-signed cert | Use `tls: "full"` or valid cert |45| Handshake timeout | `flexible` | Origin expects TLS | Use `tls: "full"` |4647**Debug:**48```bash49openssl s_client -connect app.example.com:443 -showcerts50```5152### SMTP Reverse DNS5354**Problem:** Email servers reject SMTP via Spectrum55**Cause:** Spectrum IPs lack PTR (reverse DNS) records56**Impact:** Many mail servers require valid rDNS for anti-spam5758**Solution:**59- Outbound SMTP: NOT recommended through Spectrum60- Inbound SMTP: Use Cloudflare Email Routing61- Internal relay: Whitelist Spectrum IPs on destination6263### Proxy Protocol Compatibility6465**Problem:** Connection works but app behaves incorrectly66**Cause:** Origin doesn't support Proxy Protocol6768**Solution:**691. Verify origin supports version (v1: widely supported, v2: HAProxy 1.5+/nginx 1.11+)702. Test with `proxy_protocol: 'off'` first713. Configure origin to parse headers7273**nginx TCP:**74```nginx75stream {76server {77listen 22 proxy_protocol;78proxy_pass backend:22;79}80}81```8283**HAProxy:**84```85frontend ft_ssh86bind :22 accept-proxy87```8889### Analytics Data Retention9091**Problem:** Historical data not available92**Cause:** Retention varies by plan9394| Plan | Real-time | Historical |95|------|-----------|------------|96| Pro | Last hour | ❌ |97| Business | Last hour | Limited |98| Enterprise | Last hour | 90+ days |99100**Solution:** Query within retention window or export to external system101102### Enterprise-Only Features103104**Problem:** Feature unavailable/errors105**Cause:** Requires Enterprise plan106107**Enterprise-only:**108- Port ranges (`tcp/25565-25575`)109- All TCP/UDP ports (Pro/Business: selected only)110- Extended analytics retention111- Advanced load balancing112113### IPv6 Considerations114115**Problem:** IPv6 clients can't connect or origin doesn't support IPv6116**Solution:** Configure `edge_ips.connectivity`117118```typescript119const app = await client.spectrum.apps.create({120// ...121edge_ips: {122type: 'dynamic',123connectivity: 'ipv4', // Options: 'all', 'ipv4', 'ipv6'124},125});126```127128**Options:**129- `all`: Dual-stack (default, requires origin support both)130- `ipv4`: IPv4 only (use if origin lacks IPv6)131- `ipv6`: IPv6 only (rare)132133## Limits134135| Resource | Pro/Business | Enterprise |136|----------|--------------|------------|137| Max apps | ~10-15 | 100+ |138| Protocols | Selected | All TCP/UDP |139| Port ranges | ❌ | ✅ |140| Analytics | ~1 hour | 90+ days |141142## See Also143144- [patterns.md](patterns.md) - Protocol examples145- [configuration.md](configuration.md) - TLS/Proxy setup146