Troubleshooting
Solutions for common issues with Magma servers
Troubleshooting Magma Servers
This guide covers common issues that you might encounter when running a Magma server, along with their solutions. If you're experiencing problems not addressed here, please check our Discord server or GitHub issues.
Server Startup Issues
Server Won't Start
Symptoms: The server fails to start, terminal closes immediately, or you see a "Java not found" error.
Possible Causes and Solutions:
-
Java not installed correctly
- Make sure you have Java 21 or newer installed
- Verify with:
java -version
- Install from Adoptium if needed
-
Incorrect Java version
- Magma requires Java 21 or newer
- If using multiple Java versions, specify the path in your start script
-
Insufficient permissions
- Ensure you have permissions to execute the JAR file
- Try running as administrator/sudo
-
Corrupted Magma JAR file
- Re-download the Magma server JAR file
- Verify file integrity with SHA-256 checksum
EULA Not Accepted
Symptoms: Server starts but immediately shuts down with an EULA message.
Solution:
- Open
eula.txt
in your server directory - Change
eula=false
toeula=true
- Save the file and restart the server
Port Already in Use
Symptoms: You see "Address already in use" or "Failed to bind to port" errors.
Solutions:
-
Check for running Minecraft servers
- Use
netstat -ano | grep 25565
(Linux/macOS) ornetstat -ano | findstr 25565
(Windows) - Stop any processes using port 25565 (or your chosen port)
- Use
-
Change the port
- Edit
server-port
inserver.properties
- Choose a different port like 25566
- Edit
Crash on Startup
Symptoms: Server crashes during startup with stack trace errors.
Solutions:
-
Check logs
- Examine
logs/latest.log
for specific error messages - Look for mod/plugin conflicts or missing dependencies
- Examine
-
Mod/Plugin conflicts
- Start with no mods/plugins, then add them one by one
- Check compatibility of mods with your Minecraft version
-
Memory issues
- Increase allocated memory in your startup script (e.g.,
-Xmx4G
for 4GB) - Ensure your system has enough available RAM
- Increase allocated memory in your startup script (e.g.,
-
File corruption
- Delete the
libraries
folder (Magma will redownload it) - Try a fresh Magma installation
- Delete the
Runtime Issues
Server Lag
Symptoms: High latency, block placement lag, TPS drops, or choppy gameplay.
Solutions:
-
Check TPS
- Use
/magma tps
to check server TPS (should be close to 20) - Use
/timings
or Spark plugin for detailed performance analysis
- Use
-
Reduce view distance
- Lower
view-distance
inserver.properties
(try 8-10) - Reduce
simulation-distance
(try 5-6)
- Lower
-
Entity management
- Use
/magma entities
to see entity counts - Install entity management plugins like ClearLagg
- Adjust spawn rates in
bukkit.yml
- Use
-
Optimize JVM flags
- Use G1GC garbage collector (see our Optimization Guide)
- Allocate appropriate memory (don't over-allocate)
-
Investigate mods/plugins
- Disable mods/plugins one by one to identify performance issues
- Update to latest versions
World Generation Lag
Symptoms: Lag when players explore new areas or teleport long distances.
Solutions:
-
Pre-generate worlds
- Use plugins like Chunky or WorldBorder to pre-generate chunks
- Set a world border to limit exploration
-
Optimize world settings
- Reduce
spawn-limits
inbukkit.yml
- Adjust entity activation ranges in
spigot.yml
- Reduce
Memory Leaks
Symptoms: RAM usage continuously increases until the server crashes.
Solutions:
-
Monitor memory
- Use
/magma heap
to monitor memory usage - Install plugins like Spark for detailed memory analysis
- Use
-
Identify problematic mods/plugins
- Start with minimal mods/plugins and add them back gradually
- Check for outdated mods/plugins known to cause memory leaks
-
Adjust JVM flags
- Add
-XX:+UseG1GC -XX:+ParallelRefProcEnabled
to your startup script - Consider setting
-Xms
equal to-Xmx
to prevent heap resizing
- Add
-
Regular restarts
- Schedule regular server restarts using a server wrapper
- Use a plugin like AutoRestart for timed restarts
Mod and Plugin Issues
Mod Not Loading
Symptoms: Mod appears in logs but doesn't function, or doesn't appear in /magma mods
.
Solutions:
-
Check mod compatibility
- Verify the mod is for your exact Minecraft version
- Ensure it's built for NeoForge (not Fabric or older Forge)
-
Missing dependencies
- Look for "missing dependency" errors in logs
- Install required library mods and dependencies
-
Mod conflicts
- Try loading the mod alone to check for conflicts
- Check mod configuration files for errors
Plugin Not Loading
Symptoms: Plugin doesn't appear in /plugins
list or commands don't work.
Solutions:
-
Check compatibility
- Ensure the plugin is compatible with your Minecraft version
- Check if it's designed for Bukkit/Spigot/Paper
-
Check dependencies
- Look for dependency errors in server logs
- Install required dependency plugins (e.g., Vault, ProtocolLib)
-
API compatibility
- Some plugins may use API features not supported in Magma
- Try alternative plugins with similar functionality
Conflict Between Mods and Plugins
Symptoms: Server crashes, unexpected behavior, or features not working when certain mods and plugins are used together.
Solutions:
-
Identify the conflict
- Disable mods and plugins one by one to isolate the conflict
- Check logs for interaction errors
-
Check for feature overlap
- Mods and plugins doing the same thing often conflict
- Use either the mod or plugin version, not both
-
Look for compatibility patches
- Some mods have patches or configurations for compatibility
- Check mod/plugin documentation for known issues
Database Issues
Database Connection Failures
Symptoms: Plugins that use databases fail to start or throw database connection errors.
Solutions:
-
Check database server
- Ensure your MySQL/MariaDB/etc. server is running
- Verify network access to the database server
-
Verify credentials
- Double-check username, password, and database name
- Ensure the database user has necessary permissions
-
Connection settings
- Check host/port settings in plugin configurations
- Try using IP address instead of hostname
Network Issues
Can't Connect to Server
Symptoms: Players receive "Connection refused" or timeout errors when joining.
Solutions:
-
Check server status
- Verify the server is running with no errors
- Check if you can connect locally with
localhost
or127.0.0.1
-
Port forwarding
- Ensure port 25565 (or your custom port) is forwarded to your server
- Check your router's port forwarding settings
- Verify with an online port checking tool
-
Firewall settings
- Allow Java and Minecraft server through Windows Firewall
- Check iptables rules on Linux
- Disable restrictive antivirus temporarily for testing
Timeouts and Disconnections
Symptoms: Players frequently get disconnected or experience timeouts.
Solutions:
-
Network stability
- Check your internet connection stability
- Try a wired connection instead of Wi-Fi for the server
-
Server performance
- High server lag can cause timeouts
- Follow performance optimization guidelines
-
Reduce network load
- Decrease
max-players
to reduce bandwidth requirements - Adjust
network-compression-threshold
inserver.properties
- Decrease
File and Permission Issues
World Corruption
Symptoms: Chunks missing, blocks resetting, or "Level file cannot be read" errors.
Solutions:
-
Restore from backup
- Always maintain regular backups
- Restore from the most recent clean backup
-
Chunk regeneration
- Use plugins like WorldEdit to regenerate corrupted chunks
- Be aware this will reset those chunks to newly generated state
-
Prevention
- Use proper server shutdown with
/stop
command - Avoid killing the server process abruptly
- Use a UPS for power protection
- Use proper server shutdown with
Permission Denied Errors
Symptoms: "Access denied" or "Permission denied" errors in logs.
Solutions:
-
File permissions
- Ensure the user running the server has write access to the server directory
- Linux:
chmod -R 755 /path/to/server
andchown -R username:username /path/to/server
-
Server directory location
- Avoid running the server from protected directories
- Use a dedicated directory with proper permissions
Advanced Troubleshooting
Generating Debug Reports
For complex issues, generate debug information:
-
Timings report
-
Spark profiler
-
Thread dump
Reaching Out for Help
When seeking help on Discord or GitHub:
- Provide your Magma version and Minecraft version
- Include relevant logs (latest.log, crash reports)
- List all mods and plugins you're using
- Describe steps to reproduce the issue
- Share any error messages or stack traces
Common Error Messages and Solutions
"Failed to bind to address"
- Port is already in use by another application
- Change port in server.properties or stop the other application
"Error occurred during initialization of VM"
- Incorrect Java arguments or not enough system memory
- Reduce allocated memory or close other applications
"Unsupported major.minor version"
- Using wrong Java version
- Install Java 17 or newer for modern Minecraft versions
"Could not reserve enough space for object heap"
- Allocating more memory than your system has available
- Reduce
-Xmx
value in startup script
"java.lang.NoSuchMethodError" or "java.lang.ClassNotFoundException"
- Mod/plugin compatibility issue or missing dependency
- Update mods/plugins or install required dependencies
Next Steps
If you've tried these solutions and still have issues:
- Check the Magma GitHub Issues for similar problems
- Join our Discord server for community support
- For mod-specific issues, check the mod's documentation or support channels
- For plugin-specific issues, refer to the plugin's support resources