Skip to content

Commit ddd7bc5

Browse files
committed
add a comprehensive Troubleshooting Guide section
1 parent 95b6bed commit ddd7bc5

1 file changed

Lines changed: 128 additions & 0 deletions

File tree

README.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,134 @@ The image will be available at:
600600
ghcr.io/<username>/hytale-server-docker:latest
601601
```
602602

603+
## Troubleshooting Guide
604+
605+
### Common Issues and Solutions
606+
607+
#### Server Fails to Start
608+
609+
| Symptom | Possible Cause | Solution |
610+
| ---------------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
611+
| `Error: Invalid session token` | Expired or invalid authentication tokens | Re-authenticate using `/auth login device` |
612+
| `Error: Unable to download server files` | Missing or incorrect environment variables | Verify `HYTALE_SERVER_SESSION_TOKEN`, `HYTALE_SERVER_IDENTITY_TOKEN`, and `HYTALE_SERVER_OWNER_UUID` are set correctly |
613+
| `OutOfMemoryError` | Insufficient heap memory | Increase JVM heap size with `-Xmx` (e.g., `-Xmx4G`) |
614+
| Container exits immediately | Missing required files or permissions | Check container logs with `docker logs hytale-server` |
615+
616+
#### Players Cannot Connect
617+
618+
| Symptom | Possible Cause | Solution |
619+
| --------------------- | ------------------------- | --------------------------------------------------------------- |
620+
| Connection timeout | Wrong port protocol | Ensure port is exposed as **UDP**, not TCP (`-p 5520:5520/udp`) |
621+
| Connection refused | Firewall blocking traffic | Allow UDP port 5520 through your firewall |
622+
| Authentication failed | Server not authenticated | Run `/auth login device` and complete the device flow |
623+
624+
#### Performance Issues
625+
626+
| Symptom | Possible Cause | Solution |
627+
| -------------- | ---------------------- | ----------------------------------------------------- |
628+
| High RAM usage | Large view distance | Reduce view distance to 12 chunks or less |
629+
| Slow startup | No AOT cache | Enable AOT cache with `-XX:AOTCache=HytaleServer.aot` |
630+
| Lag spikes | Insufficient resources | Allocate more CPU/RAM to the container |
631+
632+
### Debug Mode Instructions
633+
634+
Enable verbose logging to diagnose issues:
635+
636+
```bash
637+
docker run -d \
638+
-p 5520:5520/udp \
639+
-e HYTALE_SERVER_SESSION_TOKEN=<your-session-token> \
640+
-e HYTALE_SERVER_IDENTITY_TOKEN=<your-identity-token> \
641+
-e HYTALE_SERVER_OWNER_UUID=<your-owner-uuid> \
642+
-v ./logs:/app/logs \
643+
--name hytale-server \
644+
hytale-server \
645+
--log-level debug
646+
```
647+
648+
#### Viewing Logs
649+
650+
```bash
651+
# View live logs
652+
docker logs -f hytale-server
653+
654+
# View last 100 lines
655+
docker logs --tail 100 hytale-server
656+
657+
# Check log files directly
658+
docker exec hytale-server cat /app/logs/latest.log
659+
```
660+
661+
#### Inspecting Container State
662+
663+
```bash
664+
# Check container status
665+
docker inspect hytale-server --format='{{.State.Status}}'
666+
667+
# View environment variables
668+
docker inspect hytale-server --format='{{.Config.Env}}'
669+
670+
# Access container shell
671+
docker exec -it hytale-server /bin/sh
672+
```
673+
674+
### Network Connectivity Testing
675+
676+
#### Test UDP Port Accessibility
677+
678+
From inside the container:
679+
680+
```bash
681+
docker exec hytale-server nc -zvu localhost 5520
682+
```
683+
684+
From the host machine (requires netcat):
685+
686+
```bash
687+
nc -zvu <server-ip> 5520
688+
```
689+
690+
#### Verify Port Binding
691+
692+
```bash
693+
# Check exposed ports
694+
docker port hytale-server
695+
696+
# Verify UDP listener
697+
docker exec hytale-server netstat -uln | grep 5520
698+
```
699+
700+
#### Firewall Diagnostics
701+
702+
**Linux (iptables):**
703+
704+
```bash
705+
sudo iptables -L -n | grep 5520
706+
```
707+
708+
**Linux (ufw):**
709+
710+
```bash
711+
sudo ufw status | grep 5520
712+
```
713+
714+
**Windows:**
715+
716+
```powershell
717+
netsh advfirewall firewall show rule name=all | findstr 5520
718+
```
719+
720+
#### Test External Connectivity
721+
722+
Use an online port checker or ask a friend to test:
723+
724+
1. Ensure your server is running
725+
2. Visit a UDP port checker website
726+
3. Enter your public IP and port 5520
727+
4. Verify the port shows as "open"
728+
729+
> 💡 **Tip:** If behind NAT, ensure port forwarding is configured on your router for UDP port 5520.
730+
603731
## Resources
604732

605733
- [Official Hytale Server Manual](https://support.hytale.com/hc/en-us/articles/45326769420827-Hytale-Server-Manual)

0 commit comments

Comments
 (0)