Server not restarting when Oxide update releasesNot An Issue
{
  "Daily restarts": [
    "5:00"
  ],
  "Restart when new Oxide.Rust is out": true,
  "Initiate countdown at": 300,
  "Enable UI": true,
  "UI position (X,Y)": "0.92, 0.92",
  "UI scale": 1.0,
  "Enable console logs": true,
  "Commands": [
    "sr",
    "srestart",
    "smoothrestart",
    "smoothrestarter"
  ],
  "Disable chat countdown notifications": false,
  "Custom countdown reference points": [
    60,
    50,
    40,
    30,
    25,
    15,
    10,
    9,
    8,
    7,
    6,
    5,
    4,
    3,
    2,
    1
  ],
  "Use custom countdown reference points": false
}

update ist 1H out but server says
[SmoothRestarter] Fetching latest Oxide.Rust version...
[SmoothRestarter] Current Oxide.Rust version is up-to-date, scheduling check after 10 minutes...

i too get this on updates now, worked months ago but lately for a couple wipes it has failed to see the updates

My server didn't restart today. I am trying to figure out if it is this mod or another reason. I didn't see what time it went down so idk if the smooth restarter reset my server but didn't start again or not.

4weed2weed0

My server didn't restart today. I am trying to figure out if it is this mod or another reason. I didn't see what time it went down so idk if the smooth restarter reset my server but didn't start again or not.

Plugins can't start the server, only shut it down.
wHhdHzVoE3MaEtY.png Wulf
Plugins can't start the server, only shut it down.

This mod has always shut it off then it restarts for me.

4weed2weed0

This mod has always shut it off then it restarts for me.

It hasn't, it isn't physically possible for a plugin to start the server when it isn't running. You'd have to have an external tool or script that watches for the process to end then starts it again.

I do not. All I know is when smooth restarter turns my server off it always is back up and running baout 5 minutes after, I have been doing this for a very long time with this mod. Is the mod supposed to turn off servers and not turn back on? I can't see the use of this.

4weed2weed0

I do not. All I know is when smooth restarter turns my server off it always is back up and running baout 5 minutes after, I have been doing this for a very long time with this mod. Is the mod supposed to turn off servers and not turn back on? I can't see the use of this.

An external tool or script has always been necessary to start it again. Most self-hosted servers do this via a basic loop in a script, most paid hosts have a setup as well. The purpose of the plugin is to essentially schedule and automate when to trigger the restart process based on conditions.

I don't know why you want your mod to turn off servers until someone manually starts it again. I am glad my server auto restarts and I don't have to manually restart it every day. I would be mad if that happened to my server with this mod.

4weed2weed0

I don't know why you want your mod to turn off servers until someone manually starts it again. I am glad my server auto restarts and I don't have to manually restart it every day. I would be mad if that happened to my server with this mod.

Most would have a tool set up to start again. Unless you aren't using the functionality that Smooth Restarter offers for automation, there's probably no reason for you to use it.

okay i found the problem the page is not updating fast enough when an update is out (https://umod.org/games/rust.json)
I have now taken the page from the old smoothrestarter so it goes almost simultaneously when an update comes out

for all with the same problem here is my solution

find

void FetchLatestOxideRustVersion(Action<Exception, VersionNumber> callback)
        {
            PluginLog("Fetching latest Oxide.Rust version...");
            webrequest.Enqueue("https://umod.org/games/rust.json", null,​


and replaces it with

void FetchLatestOxideRustVersion(Action<Exception, VersionNumber> callback)
        {
            PluginLog("Fetching latest Oxide.Rust version...");
            webrequest.Enqueue("https://api.github.com/repos/oxidemod/oxide.rust/releases/latest", null,


find

var latestVersionStr = response["latest_release_version"];

 

and replaces it with
var latestVersionStr = response["name"];


maybe a solution for the author for the next plugin update

 

Wulf is right, the restart is triggered by your panels (like tcadmin, ptero and others).

But i run into the same problems, the restart timer is triggered, all goes fine. and when the time to restart the server (sorry, plugin is called smoothrestarter, don´t wonder people are using the phrase) it does nothing and the UI timer is going to count negative numbers.

Sorry for my bad english, but i guess the message is delivered: the plugin doesn´t work.

Weird is, i use some servers with the same settings, some are restarting, some not.

 

So i guess the problem of the author above is not that his server isn´t "restarting", the problem is that this plugin doesn´t trigger the server to stop the service (and let the panels restarting it).

        /*411 line */ 
void FetchLatestOxideRustVersion(Action<Exception, VersionNumber> callback)
        {
            PluginLog("Fetching latest Oxide.Rust version...");
            webrequest.Enqueue("https://api.github.com/repositories/94599577/releases/latest", null,
                (responseCode, json) => {
                    if (responseCode != 200)
                    {
                        callback(
                            new Exception(
                                $"Failed to fetch latest Oxide.Rust version from uMod.org API - code {responseCode}"
                            ),
                            default(VersionNumber)
                        );
                    }
                    else
                    {
                        try
                        {
                            var response = JsonConvert.DeserializeObject<Dictionary<string, object>>(json);

                            if (response == null)
                            {
                                throw new Exception("Response is null");
                            }

                            var latestVersionStr = response["name"];

                            var array = ((string)latestVersionStr).Split('.');

                            var version = new VersionNumber(int.Parse(array[0]), int.Parse(array[1]), int.Parse(array[2]));

                            callback(null, version);
                        }
                        catch (Exception e)
                        {
                            callback(
                                new Exception($"Failed to deserialize uMod.org API response: {e.Message}"),
                                default(VersionNumber)
                            );
                        }
                    }
                }, this);
        }
/* 453 lines*/​

I came across that the API is not updated and there is no restart! I have adjusted to another uMod API and everything is working more stably. Replace a piece of file like mine.



Merged post

I'm sorry, I didn't see a solution to this problem. Indeed, as written above - a long update. The author's request to change this in the original!
Locked automatically