Mineos WebUI not starting after Power Outage

So, last night it seems like I had a power outage for like 1 second (Alarm clock recovered, but servers went down and Printer restarted and waking me up)

Since then I can’t start the minecraft server, as I can’t get into the WebUI.
SSH works, FileZilla works, restartet the server twice, updated and reset the WebUI multiple times, but nothing worked. ERR_CONNECTION_REFUSED
Anybody got a suggestion?

When trying to connect to the webui?

If so, check out this page for troubleshooting the webui:

Beyond that, we’d need to see logs (specifically /var/log/mineos.log)

1 Like

I was going to write the following text, which I will now leave in, in case anybody ever stumbles upon the same issue. I had a faulty Symlink to my Backup Drive, which appearently died…
This couldn’t be resolved by the WebUI. Caught it in the last second before sending the reply :smiley:
Thank you very much @hexparrot

Ah, thank you! I only looked in the wiki.

So, however I didn’t get it to run. Here are the command line things I tried:
root@Greger …/games/minecraft# netstat -tnl | grep 8443
root@Greger …/games/minecraft# ps -aux | grep node
root 6717 0.0 0.0 11108 1004 pts/0 S+ 21:38 0:00 grep --color=auto node
root@Greger …/games/minecraft# supervisorctl status mineos
mineos FATAL Exited too quickly (process log may have details)
root@Greger …/games/minecraft# supervisorctl restart mineos
mineos: ERROR (not running)
mineos: ERROR (spawn error)
root@Greger …/games/minecraft# git log -n 1 | grep commit
commit 5670b46c4f22e806ce5819a7f86042df4b4ecc23

I guess you need to see only one line in the log, as they seem to repeat with only new timestamps (and the latest run of the update script):

Script execution started on: Tue Sep 15 18:50:19 CEST 2020
Updating mineos-node repository…OK
Pulling master branch…Already up-to-date.
Updating npm dependencies…audited 575 packages in 4.983s
found 2 vulnerabilities (1 moderate, 1 high)

  • run npm audit fix to fix them, or npm audit for details*
    Setting node javascript files to executable…OK
    Script execution ended on: Tue Sep 15 18:50:28 CEST 2020

{“date”:“Wed Sep 16 2020 21:33:10 GMT+0200 (CEST)”,“process”:{“pid”:6499,“uid”:0,“gid”:0,“cwd”:"/usr/games/minecraft",“execPath”:"/usr/bin/node",“version”:“v8.17.0”,“argv”:["/usr/bin/node","/usr/games/minecraft/webui.js"],“memoryUsage”:{“rss”:47329280,“heapTotal”:22888448,“heapUsed”:15910056,“external”:422733}},“os”:{“loadavg”:[0.0791015625,0.0244140625,0.02783203125],“uptime”:95914},“trace”:[{“column”:18,“file”:“fs.js”,“function”:“Object.fs.mkdirSync”,“line”:885,“method”:“mkdirSync”,“native”:false},{“column”:9,“file”:"/usr/games/minecraft/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js",“function”:“Object.mkdirsSync”,“line”:31,“method”:“mkdirsSync”,“native”:false},{“column”:6,“file”:"/usr/games/minecraft/server.js",“function”:“new server.backend”,“line”:27,“method”:“backend”,“native”:false},{“column”:12,“file”:"/usr/games/minecraft/webui.js",“function”:null,“line”:173,“method”:null,“native”:false},{“column”:30,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:1108,“method”:null,“native”:false},{“column”:37,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:166,“method”:null,“native”:false},{“column”:13,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:726,“method”:null,“native”:false},{“column”:16,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:52,“method”:null,“native”:false},{“column”:17,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:“done”,“line”:246,“method”:null,“native”:false},{“column”:16,“file”:"/usr/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:44,“method”:null,“native”:false}],“stack”:[“Error: EEXIST: file already exists, mkdir ‘/var/games/minecraft/backup’”," at Object.fs.mkdirSync (fs.js:885:18)"," at Object.mkdirsSync (/usr/games/minecraft/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)"," at new server.backend (/usr/games/minecraft/server.js:27:6)"," at /usr/games/minecraft/webui.js:173:12"," at /usr/games/minecraft/node_modules/async/lib/async.js:1108:30"," at /usr/games/minecraft/node_modules/async/lib/async.js:166:37"," at /usr/games/minecraft/node_modules/async/lib/async.js:726:13"," at /usr/games/minecraft/node_modules/async/lib/async.js:52:16"," at done (/usr/games/minecraft/node_modules/async/lib/async.js:246:17)"," at /usr/games/minecraft/node_modules/async/lib/async.js:44:16"],“level”:“error”,“message”:“uncaughtException: EEXIST: file already exists, mkdir ‘/var/games/minecraft/backup’”,“timestamp”:“2020-09-16T19:33:10.508Z”}

Hope somebody can give me a hint, or is it easier to just reinstall MineOS?

Likely easiest answer is:

cd /usr/games/minecraft
rm -rf node_modules
bash reset_webui.sh

with regard to making sure the scripts AND npm modules are built correctly.

Here’s what happening in line 27:

{“column”:6,“file”:"/usr/games/minecraft/server.js",“function”:“new server.backend”,“line”:27,“method”:“backend”,“native”:false},

fs.ensureDirSync(path.join(base_dir, mineos.DIRS['servers']));
fs.ensureDirSync(path.join(base_dir, mineos.DIRS['backup']));
fs.ensureDirSync(path.join(base_dir, mineos.DIRS['archive']));
fs.ensureDirSync(path.join(base_dir, mineos.DIRS['import']));
fs.ensureDirSync(path.join(base_dir, mineos.DIRS['profiles']));

Are you able to confirm that all these directories exist? If they don’t exist, they’ll try to be made. If it’s crossing filesystems & mounts, that would explain why it cannot.

Well, before the backup folder did not exist. It was a symlink to the backup drive (Also pretty clumsy, and didn’t work half the time. Is there any good tutorial on how to do Backup symlinks?).
The harddrive must have died when power was gone for max 1 second, so the server more or less restarted directly giving the heads no time to spin to correct position. Since the symlink still existed, but pointed to a no longer existing space, the WebUI must have detected the issue but had no way to handle it.
Anyway, it was super easy to fix, and my server is back up and running.

1 Like