[Solved] Unable to make backups (Restore Points) and Archives, and the ui won't start at boot

I put this under web ui as I don’t think this has anything to do with the underlying system, which happens to be Peppermint 8, based on Linux Mint, based on Ubuntu, based on Debian. It may have something to do with the way I have things set up but I haven’t tested it yet; I started on another system except I never completed it but was able to create archives and backups there. I created and exported several archives via the web ui running on the old system which ran Ubuntu Server 16.04.2 which were then imported to the new system. Starting, Stopping, and Restarting servers all work fine but when trying to create any sort of backup as I’ve stated doesn’t work.

MineOS Web UI Log (Doesn’t seem to have anything particularly useful in it)

Now, the way I had/have things set up currently is somewhat standard but unstandard at the same time. I’ve added a folder titled “ServerBaseDir” in “/var/games/minecraft/” and as you can guess, has something to do with server bases. Anyways, it’s meant to serve as a central location for server jars and plugins as well as configurations that will be the same across multiple servers (let’s say for example, you have an AutoBroadcaster plugin and you want the configuration to be the same across multiple servers; you could go ahead and just copy/duplicate the configurations one by one, or you could have a central location for it’s configuration so that you only need to make changes once and that’s it. If that’s not a good enough example, this next one is: you have multiple servers, some of which may run the same plugins like Essentials for example. An update gets released and now you have to go through and update each server one by one, copying the new version deleting the old version if the names don’t conflict while copying, rather than updating one file to update it on all servers. And as a bonus, it does save space) but apparently that seems to break the backups and archives functionalities in the web ui, although everything else works fine. Maybe for MineOS Ruby you could add a feature that allows you to exclude directories from backups and archives Actually that may be a dumb idea I thought of it for the plugins directory but that’s mixed with both links and regular non-links so it wouldn’t really make any sense as the per-server configurations wouldn’t be included.

That’s what it looks like on Windows using WinSCP, symbolic links for the plugins as well as standard folders for plugin configurations (or symbolic links within plugin configuration folders for plugins which have more than one configuration file, or even the folder itself being a symbolic link)


Now, about the web ui not starting on boot; that I’m not too sure about but the startup script’s there and enabled.
{username}@{hostname} ~ $ sudo service mineos status #Output
Not sure why it won’t start up at boot though and the same’s happened with the old system as well.

hi JayMontana36!

i hope you find the help needed.

just a bit above my pay grade, sorry about that.

best regards,

tNt

1 Like

I see the error:

["Error: ENOENT: no such file or directory, stat '/var/games/minecraft/servers/SurvivalArcade/bukkit.yml'"," at Error (native)"," at Object.fs.statSync (fs.js:892:18)","

Does this file exist? Did it ever exist, and is this intended to be a real file or a symlink?

Is it a symlink that exists in SurvivalArcade pointing to a file that doesn’t exist?

The error is peppered throughout your mineos.log.

Edit: I suspect it’s a broken symlink pointing to a non-existent file. Such a behavior I’ve been able to reproduce as taking down the webui. Try updating your webui to the commit I just made and let me know if the problem persists.

1 Like

That file has existed, both as a real file when originally importing then as a symlink afterwards; from the system itself I dragged the file out into the ServerBaseDir then dragged it back in as a symlink.

Alright I’ll update soon and report back.

Alright so I’ve updated and tested, and it still does persist; I’ve cleared the mineos.log file after stopping the mineos service then rebooted afterwards so the following logfile is fresh. Also, the mineos service/web ui does actually start up on boot now as it should. “/var/log/mineos.log

The log still contains errors for the bukkit.yml, paper.yml, and spigot.yml files, all of which are valid symlinks (I was successfully able to open all of them both locally and remotely, and I’m almost positive that the Minecraft server jar would refuse to stay up and running if anything was invalid (or at least, those files in particular but even if it did stay up it’d probably just be idling doing nothing); there’s nothing in the actual Minecraft server log files or console that’d be of use or related as it does start up as it’s supposed to and works as expected but I could still post that if it’s wanted). Funny thing is, the server’s jarfile in the directory is also a symlink yet that’s not listed anywhere in the mineos.log as an error. Originally when importing the web ui broke doe to it being a broken symlink however once I fixed that it started working again (reading the logs guided me to fix that one before even creating the first post).

I thought the actual issue was the webui didn’t start up–if it does now, what is the actual issue you’re experiencing?

I see the log contains the errors–but now they’re actually “handled” errors, which means they’re simply logged for your benefit (and mine), but aren’t breaking operation.

[“Error: listen EADDRINUSE 0.0.0.0:8443”,

I see this a lot, which indicates that the webui is trying to be started (somewhere, somehow) while it’s already up and running.

What behavior now is going on that we need to fix?

{"level":"info","message":"[SurvivalArcade] 192.168.99.116 issued command : \"stop_and_backup\"","timestamp":"2017-07-12T05:31:52.085Z"}
{"level":"info","message":"[SurvivalArcade] received request \"stop_and_backup\"","timestamp":"2017-07-12T05:31:52.138Z"}
{"command":"stop_and_backup","uuid":"68cada70-66c3-11e7-9c24-27bb9fc4366d","time_initiated":1499837512087,"success":false,"err":1,"time_resolved":1499837513541,"level":"error","message":"[SurvivalArcade] command \"stop_and_backup\" errored out:","timestamp":"2017-07-12T05:31:53.542Z"}
{"level":"info","message":"[SurvivalArcade] 192.168.99.116 issued command : \"backup\"","timestamp":"2017-07-12T05:32:04.329Z"}
{"level":"info","message":"[SurvivalArcade] received request \"backup\"","timestamp":"2017-07-12T05:32:04.331Z"}
{"command":"backup","uuid":"7016d590-66c3-11e7-9c24-27bb9fc4366d","time_initiated":1499837524330,"success":false,"err":1,"time_resolved":1499837524492,"level":"error","message":"[SurvivalArcade] command \"backup\" errored out:","timestamp":"2017-07-12T05:32:04.492Z"}
{"level":"info","message":"[SurvivalArcade] 192.168.99.116 issued command : \"archive\"","timestamp":"2017-07-12T05:32:07.202Z"}
{"level":"info","message":"[SurvivalArcade] received request \"archive\"","timestamp":"2017-07-12T05:32:07.204Z"}
{"command":"archive","uuid":"71cd3820-66c3-11e7-9c24-27bb9fc4366d","time_initiated":1499837527202,"success":false,"err":2,"time_resolved":1499837527304,"level":"error","message":"[SurvivalArcade] command \"archive\" errored out:","timestamp":"2017-07-12T05:32:07.305Z"}

That was the first/main issue.

Well, it looks like the problem is failing at the rdiff-backup and tar level, so we can invoke that manually to see the error:

cd /var/games/minecraft/backup/SurvivalArcade
rdiff-backup /var/games/minecraft/servers/SurvivalArcade/ /var/games/minecraft/backup/SurvivalArcade

cd /var/games/minecraft/servers/SurvivalArcade
tar -czf /var/games/minecraft/archive/SurvivalArcade/test.tgz .

What output do you get?

Hey Will? Feel free to blast me in the back of my head with a water gun for messing this up but, it was permissions related.
What seemingly happened was after prepping the machine and installing the web ui, because I changed both my uID and gID the permissions were incorrect. But the thing is, while the web ui was open I imported those 3 servers, all of which did not show up at all (however they were imported successfully) in the ui because apparently the web ui did notice the uID and gID change but it still imported the servers under the old uID and gID (I’m not even sure if I logged out and back in before doing the importing but probably not) so what I did was chown the servers directory like so: “chown {user}:{group} /var/games/minecraft/servers/*” which fixed the permissions so that they’d show up, however what I forgot to do was to do the same for the archive and backup directories, which resulted in the failure of restore points and archives due to having incorrect permissions so I fixed that, and it all works as it should now.


{username}@{hostname} ~ $ cd /var/games/minecraft/backup/SurvivalArcade
{username}@{hostname} /var/games/minecraft/backup/SurvivalArcade $ rdiff-backup /var/games/minecraft/servers/SurvivalArcade/ /var/games/minecraft/backup/SurvivalArcade
Cannot change permissions on target directory.
Fatal Error: Could not create rdiff-backup directory

/var/games/minecraft/backup/SurvivalArcade/rdiff-backup-data

due to

[Errno 13] Permission denied: '/var/games/minecraft/backup/SurvivalArcade/rdiff-backup-data'

Please check that the rdiff-backup user can create files and directories in the
destination directory: /var/games/minecraft/backup/SurvivalArcade
{username}@{hostname} /var/games/minecraft/backup/SurvivalArcade $ tar -czf /var/games/minecraft/archive/SurvivalArcade/test.tgz
tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
{username}@{hostname} /var/games/minecraft/backup/SurvivalArcade $ cd ..
{username}@{hostname} /var/games/minecraft/backup $ cd ..
{username}@{hostname} /var/games/minecraft $ sudo chown {username}:{groupname} ./archive/*
[sudo] password for {username}:
{username}@{hostname} /var/games/minecraft $ sudo chown {username}:{groupname} ./backup/*
{username}@{hostname} /var/games/minecraft $ cd /var/games/minecraft/backup/SurvivalArcade
{username}@{hostname} /var/games/minecraft/backup/SurvivalArcade $ rdiff-backup /var/games/minecraft/servers/SurvivalArcade/ /var/games/minecraft/backup/SurvivalArcade
{username}@{hostname} /var/games/minecraft/backup/SurvivalArcade $

There is one other thing I need to ask, however I’ll leave that for another post either in a new topic or an existing. Probably in a new post though.