Troubleshooting
Common Issues
Subscription Problems
Invalid Subscription URL Response
error parsing subscription: error getting subscription: unexpected status code: 403
Possible causes:
- URL is incorrect
- URL is no longer valid
- Server blocks Xray Checker user agent
Solutions:
- Verify subscription URL
- Check if URL is still active
- Contact subscription provider
- Try using Base64 format directly instead of URL
Base64 Decode Failed
error decoding Base64: illegal base64 data...
Possible causes:
- Invalid Base64 encoding
- URL-safe vs standard Base64
- Additional whitespace or newlines
Solutions:
- Verify Base64 string is clean without whitespace
- Try URL-safe Base64 decode if standard fails
- Check if content needs to be decoded multiple times
Proxy Check Issues
Running on Proxy Server
When running Xray Checker on the same server where your proxies are hosted, you must use the status
check method instead of the default ip
method.
Why:
- The
ip
check method compares your IP with and without proxy - When running on the proxy server, both IPs will be the same
- This causes false negatives - working proxies reported as failed
Solution:
# In environmentPROXY_CHECK_METHOD=statusPROXY_STATUS_CHECK_URL=http://cp.cloudflare.com/generate_204
# Or via CLI--proxy-check-method=status --proxy-status-check-url="http://cp.cloudflare.com/generate_204"
All Proxies Failing
Warning: error parsing proxy URL: connection refused
Possible causes:
- Network connectivity issues
- Firewall blocking connections
- IP check service unavailable
Solutions:
- Check network connectivity
- Verify firewall rules
- Try alternative check method:
Terminal window PROXY_CHECK_METHOD=status - Use alternative IP check service:
Terminal window PROXY_IP_CHECK_URL=http://ip.sb
High Latency or Timeouts
Warning: error getting current IP: timeout
Possible causes:
- Slow network connection
- IP check service slow
- Proxy timeout too low
Solutions:
- Increase timeout:
Terminal window PROXY_TIMEOUT=60 - Use faster IP check service
- Disable latency simulation:
Terminal window SIMULATE_LATENCY=false
Metrics Issues
Cannot Access Metrics
Error: Unauthorized
Possible causes:
- Authentication enabled
- Incorrect credentials
- Wrong port
Solutions:
- Check if authentication is enabled:
Terminal window METRICS_PROTECTED=false - Verify credentials:
Terminal window METRICS_USERNAME=userMETRICS_PASSWORD=pass - Verify correct port:
Terminal window METRICS_PORT=2112
Pushgateway Errors
Error pushing metrics: unexpected status code 401
Possible causes:
- Invalid pushgateway URL
- Authentication required
- Network issues
Solutions:
- Check URL format:
Terminal window METRICS_PUSH_URL="http://user:pass@host:9091" - Verify network connectivity
- Check pushgateway logs
Port Conflicts
Port Already in Use
error starting server: listen tcp :2112: bind: address already in use
Possible causes:
- Another service using the port
- Previous instance still running
- System port restrictions
Solutions:
- Change metrics port:
Terminal window METRICS_PORT=2113 - Check for running processes:
Terminal window lsof -i :2112 - Stop conflicting services
SOCKS Port Range Issues
error starting Xray: port already in use
Possible causes:
- Port range conflict
- Too many proxies
- System port limits
Solutions:
- Change start port:
Terminal window XRAY_START_PORT=20000 - Check system limits:
Terminal window ulimit -n - Free up port range
Debugging Techniques
Enable Debug Logging
XRAY_LOG_LEVEL=debug
Debug log will show:
- Connection attempts
- Configuration parsing
- Error details
- Timing information
Check Process Status
# Check if process is runningps aux | grep xray-checker
# Check open portsnetstat -tulpn | grep xray-checker
Verify Network Connectivity
# Test IP check servicecurl -v https://api.ipify.org?format=text
# Test proxy connectioncurl --socks5 localhost:10000 -v https://api.ipify.org?format=text
Docker Debugging
# Check container logsdocker logs xray-checker
# Access container shelldocker exec -it xray-checker sh
# Check container networkdocker inspect xray-checker
Getting Help
If you’re still experiencing issues:
-
Check GitHub Issues for similar problems
-
Create new issue with:
- Full error message
- Configuration used
- Debug logs
- Steps to reproduce
-
Include environment details:
- OS version
- Docker version (if using)
- Xray Checker version