Troubleshooting Guide
This guide helps you diagnose and fix common issues with PadRelay.
General Troubleshooting Steps
Before diving into specific issues:
Check logs: Review logs in
logs/padrelay.logEnable debug mode: Set
PADRELAY_DEBUG=1for detailed loggingVerify versions: Ensure client and server use compatible versions
Test connectivity: Use
pingandtelnetto test networkCheck firewall: Verify firewall allows connections
Connection Issues
Connection Refused
Symptoms:
ERROR: Connection refused to 192.168.1.100:9999
Causes:
Server not running
Wrong IP address or port
Firewall blocking connection
Server bound to wrong interface
Solutions:
Verify server is running:
# Check if process is running ps aux | grep padrelay-server # Linux/Mac tasklist | findstr python # Windows
Verify server IP and port:
netstat -an | grep 9999 # Linux/Mac netstat -an | findstr 9999 # Windows
Test with telnet:
telnet 192.168.1.100 9999
Check firewall:
# Linux sudo ufw status sudo ufw allow 9999/tcp # Windows # Open Windows Firewall and allow Python or port 9999
Verify server binding:
[server] host = 0.0.0.0 # Accept connections from all interfaces
Connection Timeout
Symptoms:
ERROR: Connection timeout
Solutions:
Check network connectivity with
pingVerify no intermediate firewalls blocking
Try increasing timeout (not currently configurable)
Check server is responsive (not hung)
Connection Drops
Symptoms:
Connection established but drops after a few seconds
Intermittent disconnections
Solutions:
Check rate limiting settings (may be too strict)
Verify network stability
Check heartbeat settings (TCP only)
Review logs for errors before disconnect
Try using TCP instead of UDP
Authentication Issues
Authentication Failed
Symptoms:
ERROR: Authentication failed
Causes:
Password mismatch
Incorrect password hash
Hash parameter mismatch (salt/iterations)
Solutions:
Verify passwords match exactly:
# Server config [server] password = my_password # Client config [network] password = my_password
Reset password to plaintext on both sides
Delete hashed password from server config and restart
Use environment variable to override:
export PASSWORD="my_password"
Check for trailing spaces or special characters
Invalid Token (UDP)
Symptoms:
WARNING: Invalid authentication token
Solutions:
Synchronize system clocks (must be within 60 seconds)
Request auth parameters from server first
Verify password matches
Check network isn’t modifying packets
Gamepad Issues
Gamepad Not Detected
Symptoms:
ERROR: Failed to initialize gamepad
Solutions:
List available gamepads:
import pygame pygame.init() pygame.joystick.init() print(f"Gamepads found: {pygame.joystick.get_count()}")
Try different joystick index:
padrelay-client --joystick-index 1
Test gamepad in other applications
Check USB connection
Install gamepad drivers
Try different USB port
Axes Inverted or Wrong
Symptoms:
Pushing up moves stick down
Left/right reversed
Solutions:
Invert axes in config:
[axis_options] invert_left_y = true invert_right_y = true
Remap axes with key mapper
Adjust dead zone if stick drifting:
[axis_options] dead_zone = 0.15
Virtual Gamepad Issues
Virtual Gamepad Not Appearing
Symptoms:
No virtual gamepad in Windows game controller settings
Server starts but no gamepad visible
Solutions:
Verify ViGEmBus is installed:
Open Device Manager
Look for “Nefarius Virtual Gamepad Emulation Bus”
Reinstall ViGEmBus:
Download from https://github.com/ViGEm/ViGEmBus/releases
Run installer as administrator
Restart computer
Check vgamepad import:
import vgamepad gamepad = vgamepad.VX360Gamepad() # Should not raise error
Run server as administrator (sometimes needed)
Check server logs for vgamepad errors
Gamepad Input Lag
Symptoms:
Noticeable delay between physical and virtual input
Solutions:
Use UDP protocol for lower latency
Increase update rate:
[client] update_rate = 120
Use wired connection instead of Wi-Fi
Reduce network latency:
ping 192.168.1.100 # Should be <10ms
Close bandwidth-intensive applications
Check CPU usage on both machines
TLS/SSL Issues
TLS Handshake Failed
Symptoms:
ERROR: TLS handshake failed
ERROR: SSL: WRONG_VERSION_NUMBER
Solutions:
Ensure TLS setting matches on client and server:
# Both enabled padrelay-server --enable-tls padrelay-client --enable-tls # Or both disabled padrelay-server --disable-tls padrelay-client --disable-tls
Check certificate validity:
openssl x509 -in ~/.padrelay/certs/server.crt -noout -dates
Synchronize system clocks
Update Python and OpenSSL:
pip install --upgrade cryptography
Regenerate certificates:
rm ~/.padrelay/certs/server.* # Restart server to generate new certificates
Certificate Errors
Symptoms:
ERROR: Certificate file not found
ERROR: Permission denied reading certificate
Solutions:
Let PadRelay auto-generate certificates (remove custom cert paths)
Fix permissions:
chmod 600 ~/.padrelay/certs/server.key chmod 644 ~/.padrelay/certs/server.crt
Verify certificate files exist
Check paths in configuration are correct
Performance Issues
High CPU Usage
Causes:
Update rate too high
Inefficient input processing
Too many clients connected
Solutions:
Reduce update rate:
[client] update_rate = 30 # Lower from 60
Close unnecessary applications
Use UDP instead of TCP
Check for busy loops in logs
High Bandwidth Usage
Solutions:
Reduce update rate
Use UDP (less overhead than TCP)
Disconnect unused clients
Check for message flooding in logs
Rate Limiting Issues
Rate Limit Exceeded
Symptoms:
ERROR: Rate limit exceeded, connection blocked
Causes:
Update rate higher than server allows
Multiple clients from same IP
Rate limit settings too strict
Solutions:
Increase server rate limits:
[server] max_requests = 200 # For TCP max_requests = 12000 # For UDP
Reduce client update rate
Wait for block duration to expire
Use different client IP addresses
Protocol Issues
Protocol Version Mismatch
Symptoms:
ERROR: Protocol version mismatch
Solutions:
Update both client and server to same version:
pip install --upgrade padrelay
Check versions:
padrelay-client --version padrelay-server --version
UDP Packet Loss
Symptoms:
Intermittent input drops
Occasional missing inputs
Solutions:
Switch to TCP for reliability
Improve network quality (use wired connection)
Reduce network congestion
Lower update rate to reduce packet rate
Installation Issues
vgamepad Installation Fails
Symptoms:
ERROR: Failed building wheel for vgamepad
Solutions:
Ensure using Windows (vgamepad requires Windows)
Install Visual C++ Build Tools
Update pip:
python -m pip install --upgrade pip
Install pre-built wheel if available
pygame Installation Issues
Linux:
# Ubuntu/Debian
sudo apt-get install python3-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
pip install pygame
macOS:
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer
pip install pygame
Windows:
Usually works without issues. If not:
pip install pygame --upgrade
Debug Mode
Enabling Debug Logging
# Linux/macOS
export PADRELAY_DEBUG=1
padrelay-server --config server_config.ini
# Windows PowerShell
$env:PADRELAY_DEBUG="1"
padrelay-server --config server_config.ini
# Windows Command Prompt
set PADRELAY_DEBUG=1
padrelay-server --config server_config.ini
What Debug Mode Shows
SSL/TLS handshake details
Authentication challenge/response
Connection state changes
Message parsing and validation
Certificate information
Detailed error traces
Reading Debug Logs
Look for:
ERROR: Critical failures
WARNING: Potential issues
DEBUG: Detailed diagnostic info
Stack traces: For exceptions
Common Log Messages
Understanding Warnings
“Password is weak”
Not critical, but consider using stronger password
See password strength recommendations
“Configuration file is world-readable”
Security risk if file contains passwords
Fix with:
chmod 600 config.ini
“Certificate expires in X days”
Renew certificate soon
Auto-generated certificates valid 365 days
Understanding Errors
“Rate limit exceeded”
Client sending too many requests
Increase rate limits or reduce update rate
“Invalid message format”
Corrupt message or protocol mismatch
Check versions match
Check network isn’t corrupting packets
“Failed to create virtual gamepad”
ViGEmBus not installed or not working
Reinstall ViGEmBus
Run as administrator
Getting Help
Before Asking for Help
Check this troubleshooting guide
Review logs with debug mode enabled
Search existing GitHub issues
Verify using latest version
Reporting Issues
When reporting issues, include:
PadRelay version:
padrelay-client --versionOperating systems: Client and server OS
Python version:
python --versionConfiguration: Sanitized config files (remove passwords)
Logs: Relevant log excerpts with debug enabled
Steps to reproduce: How to trigger the issue
Expected behavior: What should happen
Actual behavior: What actually happens
Where to Get Help
GitHub Issues: https://github.com/ssh-den/PadRelay/issues
Documentation: https://padrelay.readthedocs.io
Email: sshden@duck.com (for security issues)
See Also
Client Guide - Client configuration guide
Server Guide - Server configuration guide
TLS/SSL Setup Guide - TLS/SSL setup
Security - Security considerations