Skip to main content

Troubleshooting Guide

Restart Scripts

It's important to understand that UltimateAutoRestart plugin is not responsible for executing the actual restart of your server or machine. Rather, it simply runs the commands you've configured at the specified schedules, and provides a user-friendly notification when these actions are about to take place. For the autorestart process, after a shutdown (triggered by commands like /stop or /restart), you'll need to configure your server to do so. There are a few ways to achieve this, such as using scripts or selecting a shared hosting service that offers this feature.

As the process can differ from server to server please do not open tickets on the discord or request support regarding this.

A script is a simple text file with instructions inside it to be executed through the operating system's user interface, such as the console. The most common script for Minecraft servers, and the one we are interested in now, is the startup script. The system recognizes them by their extension, .bat (Windows) and .sh (Linux). Take in consideration that the different commands to stop the server are better adapted depending on the operating system. For windows /stop, and for Linux /restart, in the config.yml of UAR.

Example: Windows Script:

@ECHO OFF                  
:start
java -Xmx1G -Xms3G -jar <jar>.jar -o false --nogui
goto start

Example: Linux Scripts (for Screen and Tmux): In Linux, you need before to have install Screen or Tmux, always used on Minecraft Linux servers to be able to display the console and GUI when executing a java script with the server.jar (sudo atp install screen). Create an .sh file with the following contents (and set it to run inside spigot.yml):

#!/bin/sh
cd /path/to/your/server/root
screen -AmdS server sh -i start.sh

Create another start.sh script with the following:

#!/bin/sh
java -Xmx12G -Xms12G -jar <jar>.jar nogui

The first script must create a screen or tmux instance and execute the second script. Edit the scripts according to your server paths and RAM requirements. You should notice that both scripts are hierarchically chained, and that the first executes the second giving it the restart context, while the second simply executes the server: $sudo chmod 777 [script name], and you can check the status by $ls [script name].

Restart Time Offset

If you're not in the same timezone as your server (physical machine), you may encounter an apparent "issue" with the UltimateAutoRestart plugin. This is because the plugin relies on the server's local time information to schedule restarts. For instance, if you're based in the US and your server is hosted in the UK, there may be a time difference that affects restarts.

It's important to note that this behavior is not a problem with the plugin itself, so please refrain from submitting support tickets on the Discord server regarding this matter.

Webhooks: New Line Chars

You just have to "escape" the character. Use \\n instead of \n.

Webhooks: HTTP 400 Error

You messed somewhere up in the configuration, always track your steps when editing webhooks. Use /ar debug webhooks to debug webhooks!