Common Issues & Solutions¶
This guide covers the most frequently encountered issues when using Relyr and their solutions.
Installation Issues¶
Permission Denied Errors¶
Problem: Getting permission denied when installing or running Relyr.
Solutions:
-
Linux/macOS - Binary Installation:
-
Configuration Directory:
-
Service Installation:
Missing Dependencies¶
Problem: Relyr fails to start due to missing system dependencies.
Solutions:
-
Ubuntu/Debian:
-
CentOS/RHEL:
-
macOS:
Package Manager Issues¶
Problem: Package manager can't find Relyr packages.
Solutions:
-
Update package sources:
-
Verify repository configuration:
Configuration Issues¶
Invalid Configuration File¶
Problem: Relyr fails to start with configuration errors.
Diagnosis:
# Validate configuration
relyr config validate
# Check configuration syntax
relyr config check --file /path/to/relyr.yml
Solutions:
-
YAML Syntax Errors:
-
Common YAML mistakes:
Port Already in Use¶
Problem: Relyr can't bind to the configured port.
Diagnosis:
# Check what's using the port
sudo netstat -tulpn | grep :8080
sudo lsof -i :8080
# On macOS
lsof -i :8080
Solutions:
-
Change port in configuration:
-
Kill conflicting process:
-
Use a different port:
Connection Issues¶
Proxy Connection Failures¶
Problem: Clients can't connect through the proxy.
Diagnosis:
# Test proxy connectivity
curl -x http://localhost:8080 https://httpbin.org/ip
# Check if Relyr is listening
netstat -tulpn | grep :8080
# Test with verbose output
curl -v -x http://localhost:8080 https://httpbin.org/ip
Solutions:
-
Firewall blocking connections:
-
Binding to wrong interface:
-
Authentication issues:
SSL/TLS Certificate Issues¶
Problem: HTTPS proxy connections fail with certificate errors.
Diagnosis:
# Test SSL connection
openssl s_client -connect localhost:8443 -servername localhost
# Check certificate validity
openssl x509 -in /path/to/cert.pem -text -noout
Solutions:
-
Self-signed certificate issues:
-
Certificate path configuration:
-
Trust certificate on client:
Upstream Proxy Issues¶
Problem: Connection to upstream proxy fails.
Diagnosis:
# Test upstream proxy directly
curl -x http://upstream.proxy.com:8080 https://httpbin.org/ip
# Check DNS resolution
nslookup upstream.proxy.com
dig upstream.proxy.com
Solutions:
-
DNS resolution issues:
-
Authentication with upstream:
-
Timeout configuration:
Performance Issues¶
High Memory Usage¶
Problem: Relyr consuming too much memory.
Diagnosis:
# Check memory usage
ps aux | grep relyr
top -p $(pgrep relyr)
# Check for memory leaks
valgrind --tool=memcheck --leak-check=full relyr server
Solutions:
-
Limit connection pool size:
-
Adjust garbage collection (if applicable):
-
Monitor and restart if needed:
Slow Response Times¶
Problem: Proxy responses are slow.
Diagnosis:
# Measure response times
time curl -x http://localhost:8080 https://httpbin.org/ip
# Check network latency
ping target-server.com
traceroute target-server.com
Solutions:
-
Optimize timeouts:
-
Enable connection pooling:
-
Use compression:
High CPU Usage¶
Problem: Relyr using excessive CPU resources.
Solutions:
-
Limit concurrent connections:
-
Optimize logging:
-
Profile CPU usage:
Authentication Issues¶
API Key Not Working¶
Problem: API requests fail with authentication errors.
Solutions:
-
Verify API key format:
-
Check key permissions:
-
Test with curl:
Token Expiration¶
Problem: Bearer tokens expire too quickly.
Solutions:
-
Increase token lifetime:
-
Implement token refresh:
Logging Issues¶
Missing Log Files¶
Problem: Log files are not being created.
Solutions:
-
Check log directory permissions:
-
Verify logging configuration:
Log Rotation Not Working¶
Problem: Log files grow too large.
Solutions:
- Configure logrotate:
Network Issues¶
DNS Resolution Problems¶
Problem: Proxy can't resolve hostnames.
Solutions:
-
Configure DNS servers:
-
Test DNS resolution:
IPv6 Issues¶
Problem: IPv6 connections fail.
Solutions:
-
Disable IPv6 if not needed:
-
Configure IPv6 properly:
Docker Issues¶
Container Won't Start¶
Problem: Relyr Docker container fails to start.
Solutions:
-
Check container logs:
-
Verify port mapping:
-
Check volume mounts:
Permission Issues in Container¶
Problem: Permission denied errors in Docker container.
Solutions:
-
Run as non-root user:
-
Fix volume permissions:
Getting Help¶
If you can't resolve your issue:
-
Check system logs:
-
Enable debug logging:
-
Collect system information:
-
Report the issue:
- GitHub Issues
- Community Forum
- Include logs, configuration, and system info
Preventive Measures¶
Regular Maintenance¶
-
Update regularly:
-
Monitor resource usage:
-
Backup configuration:
Health Checks¶
Set up automated health checks:
#!/bin/bash
# health-check.sh
if ! curl -f http://localhost:8080/health > /dev/null 2>&1; then
echo "Relyr health check failed"
systemctl restart relyr
fi
Add to crontab: