Connection Issues
Solving network problems, authentication failures, and disconnections.
Connection Modes
Two-Face supports two connection modes:
| Mode | Use When | Port | Requires |
|---|---|---|---|
| Lich | Using Lich scripts | 8000 (default) | Lich running |
| Direct | Standalone | 7910 | Account credentials |
Quick Diagnosis
# Test Lich connection
nc -zv 127.0.0.1 8000
# Test direct connection
nc -zv eaccess.play.net 7910
# Check DNS
nslookup eaccess.play.net
# Full connectivity test
curl -v https://eaccess.play.net:7910 2>&1 | head -20
Lich Mode Issues
“Connection Refused”
Symptom:
Error: Connection refused to 127.0.0.1:8000
Causes:
- Lich not running
- Lich not listening on expected port
- Firewall blocking localhost
Solutions:
-
Start Lich first:
# Start Lich (method varies) ruby lich.rb # Or use your Lich launcher -
Check Lich is listening:
# Linux/macOS lsof -i :8000 # Windows netstat -an | findstr 8000 -
Verify port in Lich settings:
- Check Lich configuration for proxy port
- Match in Two-Face:
[connection] mode = "lich" port = 8000 # Match Lich's setting
Can’t Connect After Lich Starts
Symptom: Lich running but Two-Face can’t connect
Causes:
- Lich hasn’t initialized proxy yet
- Wrong interface binding
Solutions:
-
Wait for Lich startup:
[connection] connect_delay = 3 # seconds to wait -
Check Lich’s listen address:
# If Lich bound to specific interface [connection] host = "127.0.0.1" # Must match Lich
Disconnects When Lich Reloads
Symptom: Connection drops when Lich scripts reload
Solution:
[connection]
auto_reconnect = true
reconnect_delay = 2
Direct Mode Issues
Authentication Failed
Symptom:
Error: Authentication failed: invalid credentials
Causes:
- Wrong account name
- Wrong password
- Special characters in password
- Account locked/expired
Solutions:
-
Verify credentials:
- Test via web login first
- Check account status
-
Handle special characters:
# Quote password with special chars two-face --direct --account NAME --password 'P@ss!word' -
Use environment variables (more secure):
export TF_ACCOUNT="myaccount" export TF_PASSWORD="mypassword" two-face --direct -
Check for account issues:
- Verify subscription is active
- Check for account locks
“Certificate Verification Failed”
Symptom:
Error: Certificate verification failed
Causes:
- Corrupted cached certificate
- Man-in-the-middle (security concern!)
- Server certificate changed
Solutions:
-
Remove and re-download certificate:
rm ~/.two-face/simu.pem two-face --direct ... # Downloads fresh cert -
If error persists:
- Check if you’re behind a corporate proxy
- Verify you’re on a trusted network
- Certificate changes may indicate security issues
-
Manual certificate verification:
openssl s_client -connect eaccess.play.net:7910 -servername eaccess.play.net
“Connection Timed Out”
Symptom:
Error: Connection to eaccess.play.net:7910 timed out
Causes:
- Firewall blocking
- Network issues
- Server maintenance
Solutions:
-
Check basic connectivity:
ping eaccess.play.net traceroute eaccess.play.net -
Verify port access:
nc -zv eaccess.play.net 7910 -
Check firewall:
# Linux - check if port 7910 is blocked sudo iptables -L -n | grep 7910 # Windows - check firewall netsh advfirewall firewall show rule name=all | findstr 7910 -
Increase timeout:
[connection] timeout = 60 # seconds
“Character Not Found”
Symptom:
Error: Character 'Mychar' not found on account
Solutions:
-
Check character name spelling (case-sensitive)
-
Verify character exists on correct game:
two-face --direct --game prime ... # GemStone IV Prime two-face --direct --game plat ... # GemStone IV Platinum two-face --direct --game test ... # Test server -
List available characters:
two-face --direct --list-characters
Connection Drops
Random Disconnects
Symptom: Connection drops unexpectedly during play
Causes:
- Network instability
- Idle timeout
- Server-side disconnection
Solutions:
-
Enable auto-reconnect:
[connection] auto_reconnect = true reconnect_delay = 2 reconnect_attempts = 5 -
Send keepalives:
[connection] keepalive = true keepalive_interval = 30 # seconds -
Check for network issues:
# Monitor connection ping -i 5 gs4.play.net
Disconnects During High Activity
Symptom: Drops during combat or busy areas
Causes:
- Buffer overflow
- Processing can’t keep up
- Network congestion
Solutions:
-
Increase buffers:
[network] receive_buffer = 65536 send_buffer = 32768 -
Enable compression (if supported):
[network] compression = true
“Connection Reset by Peer”
Symptom:
Error: Connection reset by peer
Causes:
- Server closed connection
- Network equipment reset
- Rate limiting
Solutions:
-
Check for rapid reconnects (may be rate limited):
[connection] reconnect_delay = 5 # Don't reconnect too fast -
Review recent actions:
- Excessive commands?
- Script flooding?
Firewall Issues
Corporate/School Network
Symptom: Works at home, fails at work/school
Solutions:
-
Check if port 7910 allowed:
- Direct mode uses port 7910 (non-standard)
- May be blocked by corporate firewalls
-
Use Lich as intermediary:
- If Lich works (different protocol), use Lich mode
-
Request firewall exception:
- Port 7910 TCP outbound to eaccess.play.net
VPN Issues
Symptom: Connection fails when VPN active
Solutions:
-
Check VPN split tunneling:
- Gaming traffic might be routed through VPN
- Configure VPN to exclude game servers
-
DNS through VPN:
# Check DNS resolution nslookup eaccess.play.net -
Try without VPN to confirm VPN is the issue
Proxy Configuration
HTTP Proxy
[network]
http_proxy = "http://proxy.example.com:8080"
SOCKS Proxy
[network]
socks_proxy = "socks5://localhost:1080"
No Proxy for Game Servers
[network]
no_proxy = "eaccess.play.net,gs4.play.net"
SSL/TLS Issues
“SSL Handshake Failed”
Symptom:
Error: SSL handshake failed
Causes:
- TLS version mismatch
- Cipher suite incompatibility
- OpenSSL issues
Solutions:
-
Check OpenSSL version:
openssl version # Should be 1.1.x or higher -
Force TLS version (if needed):
[network] tls_min_version = "1.2" -
Rebuild with updated OpenSSL:
# Ensure vcpkg OpenSSL is current vcpkg update vcpkg upgrade openssl
“Certificate Chain” Errors
Symptom: Certificate chain validation errors
Solution:
# Reset certificate cache
rm ~/.two-face/simu.pem
rm ~/.two-face/cert_chain.pem
# Reconnect - will re-download
two-face --direct ...
Debugging Connections
Enable Network Logging
[logging]
level = "debug"
[debug]
log_network = true
log_network_data = false # true for packet dumps (verbose!)
View Network Debug Info
# Start with network debugging
TF_DEBUG_NETWORK=1 two-face
# Log to file for analysis
TF_LOG_FILE=/tmp/tf-network.log two-face --debug
Test Connection Step by Step
# 1. DNS resolution
nslookup eaccess.play.net
# 2. Basic connectivity
ping eaccess.play.net
# 3. Port availability
nc -zv eaccess.play.net 7910
# 4. TLS connection
openssl s_client -connect eaccess.play.net:7910
# 5. Full connection test
two-face --direct --test-connection
Quick Reference
Connection Checklist
- Correct mode (lich vs direct)
- Lich running (if lich mode)
- Credentials correct (if direct mode)
- Port accessible (8000 for lich, 7910 for direct)
- Firewall allows connection
- Certificate valid
- Network stable
Emergency Recovery
# Reset all connection state
rm ~/.two-face/simu.pem # Certificate cache
rm ~/.two-face/session.dat # Session cache
# Test with minimal config
two-face --default-config --direct --account NAME --password PASS