3.9 KiB
3.9 KiB
Troubleshooting Guide
Authentication Issues
403 Forbidden from CloudFront
Symptoms:
- All login URL attempts return 403 Forbidden
- Error message mentions "CloudFront" or "distribution is not configured to allow the HTTP request method"
Possible Causes:
- IP Address Restrictions: Your IP address may not be whitelisted in the Omada Cloud controller
- Regional Restrictions: The endpoint may only be accessible from certain regions
- CloudFront Configuration: CloudFront CDN may be blocking POST requests (only allows cacheable GET requests)
- Endpoint Changes: The API endpoint structure may have changed
Solutions:
-
Verify Your IP is Whitelisted
- Contact TP-Link/Omada support to whitelist your IP address
- Check if your organization has IP restrictions configured
-
Check Regional Access
- Verify that
OMADA_CONTROLLER_BASEmatches your region - EU:
https://euw1-omada-controller.tplinkcloud.com - US:
https://usw1-omada-controller.tplinkcloud.com - Asia:
https://ap1-omada-controller.tplinkcloud.com
- Verify that
-
Use OAuth Instead
- If password authentication is blocked, try using OAuth (Client ID/Secret)
- Ensure
TP_LINK_CLIENT_IDandTP_LINK_CLIENT_SECRETare configured - The system will automatically try OAuth first, then fall back to password
-
Contact TP-Link Support
- Provide them with:
- Your Omada ID
- The exact error message
- Your IP address
- The endpoint you're trying to access
- Provide them with:
OAuth Authentication Not Working
Symptoms:
- OAuth Client Credentials flow fails
- System falls back to password authentication
Solutions:
- Verify OAuth credentials are correct in
.env - Check if TP-LINK Open API supports Client Credentials flow
- You may need to implement Authorization Code flow instead
- Contact TP-Link to verify OAuth endpoint and flow
Database Connection Issues
Symptoms:
- "Connection refused" or "Connection timeout"
- "Database does not exist"
Solutions:
-
Verify PostgreSQL is Running
# Check if PostgreSQL is running sudo systemctl status postgresql # Or with Docker docker ps | grep postgres -
Check DATABASE_URL
DATABASE_URL=postgresql://user:password@host:port/database?schema=public- Verify username, password, host, and port are correct
- Ensure the database exists
-
Test Connection
# Using psql psql $DATABASE_URL # Or test with Prisma pnpm run prisma:studio
Missing Environment Variables
Symptoms:
- "Missing required environment variables" error on startup
Solutions:
-
Check
.envfile exists in project root -
Verify all required variables are set:
OMADA_IDOMADA_CONTROLLER_BASEOMADA_NORTHBOUND_BASEDATABASE_URLJWT_SECRET- Either OAuth credentials OR username/password
-
Use setup script:
pnpm run setup:env
API Endpoint Issues
404 Not Found
Symptoms:
- API calls return 404
- "Route not found" errors
Solutions:
- Verify the endpoint URL is correct
- Check if the Omada API version has changed
- Ensure
OMADA_NORTHBOUND_BASEis correct
Rate Limiting
Symptoms:
- 429 Too Many Requests errors
- API calls start failing after many requests
Solutions:
- Implement request throttling
- Add delays between requests
- Cache responses when possible
- Contact TP-Link about rate limits
Getting Help
-
Check Logs
- Application logs:
logs/combined.log - Error logs:
logs/error.log - Set
LOG_LEVEL=debugfor detailed logging
- Application logs:
-
Enable Debug Mode
LOG_LEVEL=debug NODE_ENV=development -
Test Authentication
pnpm run test:auth -
Contact Support
- TP-Link Omada Support
- Include error logs and configuration (redact sensitive info)