Articles on: Minecraft / Server Setup
This article is also available in:

Minecraft | Diagnosing Issues

Diagnosing Issues



Today we will be learning how to diagnose issues with your server. This is meant for Spigot/Bukkit servers so please do not use this guide for modded servers, there will be a separate guide for that. This guide will specifically cover:
Plugin Issues
Server Lagging
Server Crashing

Server Lagging


To begin with, we will start with your server lagging. Spigot is very good with diagnosing lag issues as there is a built-in thing known as timings. This will show you exactly how much lag each plugin and event that is causing lag and anything else that could be an issue too. To enable the timings, you simply need to run the command "timings on". This will first enable the timings and start gathering information for your server.

Next, you will want to simply wait for around 3-5 minutes. During this period, play on your server as you usually would just so that you can see exactly when playing normally is the trouble. After this time, you will just want to run the command "timings paste". This will then post you the link to monitor all the data on your server.

Then you will want to go ahead and follow that link and it will present you with a table of data to do with your server.



Any boxes highlighted in yellow or red means that there are issues with that area. If you look above you will see the exact plugin or area causing that issue. You have now found the issue on your server and why it is causing lag. A few common fixes for this issue is updating the plugins and checking there are no errors in console.


This link https://minecraft.gamepedia.com/Tick is good for understanding how your server runs in terms of ticks and why it can cause lag shown in the timings report.



Server Crashing


The first thing when looking into the issue is to see the crash line. Without the crash line then not a lot can be done. The crash line can tell you a number of things such as if your server is running out of resources. The crash line may not always be at the bottom, you may need to scroll up a bit and read any errors in console. Some plugins are notoriously known for crashing the server if they fail. Protocol Support is one and so if you have protocol support installed, you should first remove it and see. Citizens is also another common one if there is an issue, it will stop the server from starting up and will tell you in the console that it is doing so. Once you have this line, fixing the issue is pretty simple. If the issue is a plugin, you need to check the version you have matches your server base version and check there are no errors in the config or with the plugin itself. If you want to know how to fix config issues, please look at Plugin Issues further down this page.

">/entrypoint.sh: line 17: 37 Killed ${MODIFIED_STARTUP} PTDL_CONTAINER_ERR: There was an error while attempting to run the start command." This line is common for a server running out of resources. You will then need to monitor your usage to determine whether it is CPU or RAM. If it is RAM, you can simply upgrade by looking at our other tutorial. If it is CPU, you will need to cancel your server and transfer to Premium.

Plugin Issues


This is probably the most complicated to fix. Some errors cannot be fixed without contacting the developer. The first thing before getting into the more complex issues is to try to update the plugin before continuing, this can often cause errors. The only exception is there is an unknown dependency. You can see this by scanning through the stack trace and it will tell you the name of the plugin needed to enable the plugin. The second part to note is if the error is at the top of the console, you will need to update your plugin or contact the developer, that is all you can do to fix that error. If the error is appearing towards the bottom of the console, there could be a range of reasons why it is not working, such as the config is not correct.

To fix a config issue, there could be 2 issues. The first one is to scan through the error and see if it is an error for what you placed in the config. Common ones are NumberFormatException and NullPointerException. This is not to be confused with the NullPointerException in the actual code of the plugin and you will know which one it is by reading through the stack trace. To fix this issue, you will just need to update the config of the plugin and make sure that everyone is filled in correctly to the indentations and comments in the config file. Most configs will come with those comments and if not you can just look at the default config for comparison. The second type of issue is that there are indentation errors etc. There is quite an easy fix to this one. The first step is to find a YAML Parser online, this will scan through your document and tell you where there are errors. From then you will need to go back to your original config and find the line and make sure all is order. It can be they are missing a colon or they are out of place. If you cannot see it directly from the line the parser told you, look a couple of lines up as an issue can occur there. This is most commonly seen with permissions plugins.

A good YAML Checker is http://wiki.ess3.net/yaml/ This is built for specific purposes such as groups etc.



One last mention about configs, is all else fails, just delete the config and the plugin will re-generate the file with the default values and should work. From there you can update the values correctly as you wish.

The final point about plugin issues is that the developer may have caused and on the startup, everything was fine because the code wasn't run with any variables. When running events or commands, the variable run could be not correct (i.e not a number) or there may not be a variable is equal to null. This is to be fixed by the developer themselves and not an issue we are here to fix. You will tell it is this as it will mention nothing about files or config.

All done! Enjoy your freshly lag free crash free and error free server.

Updated on: 11/01/2021

Was this article helpful?

Share your feedback

Cancel

Thank you!