A funny thing happened on the way to my MineOS WebUI

Dear hexparrot,

My first post to you and forum. (A small problem prompts me.)

What an amazing ride! A million thanks, hugs and kisses from my grateful 4 and 10yr old girls! (And Papa too!) (Err, just the thanks.)

Like many I have read surrounding you and hundreds more like me who have never posted to thank you, my girls found out about Minecraft and as any father should, I embarked on the journey of providing a “safe environment” for them to play in. I located a used server fit for use and educated myself on how to use that peculiar weapon.

I also discovered you, xoxoxox. (Extracts lips from buttox, on to the issue at hand;)

The Beast: Bare Metal Dell PowerEdge 2950 III, 2x 64bit Xeon Quad core 2.33MHz, 1333MHz Front Side Bus, 16Gb RAM w/ 1ea SSD and 5ea SATA hard drives booted from an internal USB Thumb Drive. (Overkill, I know but I got a deal.)

OS: Headless VMware ESXi 6.0, Turnkey LAMP console administered by VMware vSphere Client 6.0 on an old Win7 laptop w/ Opera, Firefox and IE for the MineOS WebUI and SFTP with CuteFTP and Filezilla to Root around in Archives.

Servers Built: MineOS-Python on Ubuntu 14, MineOS-Python on LAMP, many flavors of 32 and 64bit on Turnkey Lamp distros all the while migrating/ importing our favorite MineOS servers running Steve’s World, Feed The Beast and some of JayMontana36’s great work (Tip of the Hat), to name a few worlds. Many hours of joy had by one and all and some new gray hair!

Finally, my girls came to me with a list of their favorite Minecraft mods and demanded a new server be built from scratch. What about all this fantastic stuff we have, says I. None of it says they, we will build our own world with the mods we want. Thanks Youtube, I mutter. (sorry JayMontana36 but I suppose this is the entire point of Minecraft in the first place.)

Back everything up, locate over 100 mods, build a MineOS server from the last turnkey/ wheezy distro, update/ git fetch, up and running with mods in less than 10 minutes, routine by now. As usual, tinker with Java7 settings, begin wondering if I can safely upgrade wheezy to java 8. Learn me up some more, discover that a multi core VM is no good so reduce to 2x single core from 2x 8 core, yadda yadda.

Discover a sparkling brand new MineOS Turnkey Lamp on Jessie with Java8! Install, import, start, crash, repeat. Learn me up some more. Seems wheezy and jessie are only kissing cousins, if that.

Long to short, got it up and stable, hugs and kisses to “You’re the best papa in the world!”, never gets old.

Jessie seems a bit snobbish, a bit of a prude, log on to the WebUI, check Dashboard, Server Status, Logs and in a few minutes it freezes. Log out, log back in, it’s fine. then it freezes. I can deal with this as I only need to stop the server to make back ups, archives, update and re-boot Turnkey on occasion. No other version of MineOS or WebUI has acted like this, there have been other glitches in the past but usually resolved sooner or later by your good self with a git fetch.

I suppose this is where the problem happened: I had upgraded and git fetched recently and I do not know if this can be replicated, the WebUI acts the same as before on a new Turnkey reboot, it lets me in then freezes after a while and lets me log out. Except instead of the usual MineOS Login page, I get “This site can’t be reached, 192.168.1.4 refused to connect”. That being the correct address for this VM. I have tried many different things to get the log in page back including updating and also resetting the MineOS scripts. So far the only thing that works is a hard reboot of turnkey, this allows one log in to the WebUI only. Not optimal because the shutdown of the MineOS Server is not graceful. I can’t have unhappy girls in the case of lost data, no more hugs and kisses you understand.

I decided I need wheezy to get a case of Java8 and in a hurry. This did not work:

su -
echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list.d/webupd8team-java.list
echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

But this did:

$ sudo sh -c ‘echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” >> /etc/apt/sources.list’
$ sudo sh -c ‘echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” >> /etc/apt/sources.list’
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

I also decided it was time to no longer be the silent majority, to speak up and let you know how valuable your free work is and has been these past few years.

And ask for a clue if there is one to be had. I have found that if I log in, do what i need to do and log out before it crashes, the log in web page loads properly anytime after that. If I log in and get distracted with time it crashes and the log in web page will not load. To get it back I have to hard reboot the turnkey. It now does this in both wheezy and jessie with java8.

Thanks and very best regards,

tNt

Hi.
When the WebUI is down or crashed;

  • have you tried to connect to the minecraft server with a minecraft client?
  • Have you tried connecting with SSH to the shell?
    This would help to see it is only the WebUI that has crashed or the entire wahooie. Usually it is just the WebUI.

Being able to log in with a Minecraft Client would also mean that you have a way to gracefully shut down the minecraft server:

as op inside minecraft (game) on each server:
/save-all
(this saves the current servers files to disk, preserving all changes)
/stop
(does what the labels sais, stops the server)

If you can log in with SSH you can then reboot the server a bit more gracefully.

If it is just the WebUI crashing:
Have you tried restarting just the WebUI?
in the wheell /ssh:
cd /usr/games/minecraft/
sudo node webui.js
This will start the WebUI, but verbose. It’ll post all messgesand events on screen until you log out.
If this works try to operate the WebUI normally, and see if any spesific events pop up when the UI crashes.

Have you tried rebooting with all the minecraft servers set to not autostart? (in server.config; “Autostart = false”). Did the WebUI still crash? Or do it crash only after a server is started? Is it a spesific server (if you run several in paralell)?

If it suddenly is stable, do this in stead to avoid reboot:
(in same dir as above: )
screen sudo node webui.js

Then press ctrl-a and ctrl-d to exit the screen in a running state. This means you’ll be able to log out without the WebUI stopping.

As for why things keep crashing, I have no clear Idea, and without access to the logs it’ll be hard to find a reason. I know I have a problem where the WebUI crashes if I remove a log file. I also seem to remember rapports of crashes as a result of number of files due to use of map plugins. I also know by eperience that the FTB brand of servers are notoriously unstable and hard to get stable. I actually loathe to update mine unless I really have to. There was (is?) a problem with pocketmine servers and the “enable-query” setting (all mine are in the off setting for on my pocketmines), and I also for a version of pocketmine had a problem with my WebUI crashing on boot when the pocketmines tried to start. I had to disable autostart on them to start them manually after everything else was booted up. As you can see, without logs and any deepr insight it is hard to give one single reason for the crash.

Wow, that was fast, lol. Thanks, food for thinking.

Not sure that it even crashes, I just get “This site can’t be reached, 192.168.1.4 refused to connect”.

  1. The server is still up and minecraft clients can log in.

  2. I use SFTP and it still works, I never did putty so dunno but assume so.

  3. Clearly I need to study what this means, I did not know this:
    as op inside minecraft (game) on each server:
    /save-all
    (this saves the current servers files to disk, preserving all changes)
    /stop
    (does what the labels sais, stops the server)

  4. Will definitely try this to see if it works, I also missed this infoo:
    cd /usr/games/minecraft/
    sudo node webui.js

  5. Never did autostart any servers, always manually. The log in page will never crash, after log in, it seems to depend on time, not what i do for example, if i keep moving from screen to screen it is ok. If I stay on one screen too long without doing anything, all functions stop including the timer that counts how long the server has been up. I can change screens and log out to “This site can’t be reached, 192.168.1.4 refused to connect”. The wheezy servers with java7 never had this problem. Only jessie and then one wheezy after upgrade to java8.

  6. I will look into this also:
    If it suddenly is stable, do this in stead to avoid reboot:
    (in same dir as above: )
    screen sudo node webui.js

Then press ctrl-a and ctrl-d to exit the screen in a running state. This means you’ll be able to log out without the WebUI stopping.

  1. I have looked at the logs and can post them when I get the server back online. I did not find anything in the logs that indicated MC knew this was happening,at all. Of course I can miss it as there are more than one log file. what specific log file would you expect to see this report logged into?

  2. Yes, I have ironed out map mod issues and FTB Infinity was my greatest achievement to get stable in the past, no pocketmines tho. “enable-query” is on and I will test that.

thanks for you reply :wink:

in the “admins.txt” file in the minecraft server directory (/var/games/minecraft/servers/[servername]/admins.txt) simply add the username you wish to have all priviledges on the server.

Then you have a lot of ingame commands to play around with ( Commands – Minecraft Wiki ). Save-all and stop are the two that forces a save and that stops the server.

@hexparrot is really better than me at log-reading and finding correlations between logs and crashes, so I’ll wait for him to have his say. Mostly it is /var/log/mineos.log that is needed to find reasons for crashes with the WebUI.

Thanks iMelsom for that info and link.

I will post the log shortly.

my 10yr old has been asking me to ‘turn on cheats’, i believe you may have directed me in the correct direction as I have not found how. Invaluable. Thanks.

Just make sure they understand what writing the command “/stop” does. It stops the server, and it is stopped until you start it again. And you’ll have to do that in the WebUI :wink: For example (as one of my admins learned the hard way) trying to use the command “/stop rain” to make it stop raining in the game stops the server… “Stop” do only one thing: Stops the server. Nothing else, no matter what you put behind it…

ROTFL! So funny, I command you to stop raining!

What I did in the log as shows below: Start Jessie based Turnkey on VM, Log in as mc via https://192.168.1.10:8443, switch to server and ONLY look at Dashboard for some minutes with server clock running and it did not stop. I logged out and the login page still worked.

I logged back in as mc, switch to server, select ‘running .jar’, start server, switch to Dashboard for only 12 seconds and the server clock stopped running all function frozen, log out to This site can’t be reached, 192.168.1.4 refused to connect".

{“level”:“info”,“message”:"[CandCs_Challenge] Discovered server",“timestamp”:“2016-04-14T19:06:33.057Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] Created tail on logs/latest.log",“timestamp”:“2016-04-14T19:06:33.112Z”}
{“level”:“error”,“message”:"[CandCs_Challenge] Create tail on server.log failed",“timestamp”:“2016-04-14T19:06:33.113Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] Watching for file generation: server.log",“timestamp”:“2016-04-14T19:06:33.114Z”}
{“level”:“error”,“message”:"[CandCs_Challenge] Create tail on proxy.log.0 failed",“timestamp”:“2016-04-14T19:06:33.116Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] Watching for file generation: proxy.log.0",“timestamp”:“2016-04-14T19:06:33.116Z”}
{“level”:“info”,“message”:"[WEBUI] New file found in import directory /var/games/minecraft/import/server-CandC’s_Challenge_2016-04-10_15_51_36.tgz",“timestamp”:“2016-04-14T19:06:33.656Z”}
{“level”:“info”,“message”:“Starting up server, using commit: bcb4bd5 Merge pull request #182 from hexparrot/assorted_fixes\n”,“timestamp”:“2016-04-14T19:06:34.589Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] eula.txt detected: ACCEPTED (eula=true)",“timestamp”:“2016-04-14T19:06:34.972Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] autostart = false",“timestamp”:“2016-04-14T12:06:37.184Z”}
{“level”:“error”,“message”:"[CandCs_Challenge] Aborted server startup; condition not met: true",“timestamp”:“2016-04-14T12:06:37.184Z”}
{“level”:“info”,“message”:"[WEBUI] mc connected from 192.168.1.3",“timestamp”:“2016-04-14T05:14:01.062Z”}
{“level”:“info”,“message”:"[WEBUI] Downloading official profiles.",“timestamp”:“2016-04-14T05:14:01.463Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] mc (192.168.1.3) joined server namespace",“timestamp”:“2016-04-14T05:14:01.739Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] transmittting existing file contents: logs/latest.log (0 bytes)",“timestamp”:“2016-04-14T05:14:02.326Z”}
{“level”:“info”,“message”:"[WEBUI] mc connected from 192.168.1.3",“timestamp”:“2016-04-14T05:19:25.820Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] mc (192.168.1.3) joined server namespace",“timestamp”:“2016-04-14T05:19:26.852Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] transmittting existing file contents: logs/latest.log (0 bytes)",“timestamp”:“2016-04-14T05:19:27.174Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] 192.168.1.3 issued command : “modify_sc”",“timestamp”:“2016-04-14T05:19:36.408Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] received request “modify_sc”",“timestamp”:“2016-04-14T05:19:36.430Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] 192.168.1.3 issued command : “start”",“timestamp”:“2016-04-14T05:19:40.627Z”}
{“level”:“info”,“message”:"[CandCs_Challenge] received request “start”",“timestamp”:“2016-04-14T05:19:40.628Z”}
{“date”:“Thu Apr 14 2016 05:19:56 GMT+0000 (UTC)”,“process”:{“pid”:1054,“uid”:0,“gid”:0,“cwd”:"/usr/games/minecraft",“execPath”:"/usr/bin/nodejs",“version”:“v4.4.2”,“argv”:["/usr/bin/nodejs","/usr/games/minecraft/webui.js"],“memoryUsage”:{“rss”:126050304,“heapTotal”:63139680,“heapUsed”:53166680}},“os”:{“loadavg”:[0.82080078125,0.2275390625,0.1083984375],“uptime”:820},“trace”:[{“column”:null,“file”:null,“function”:“Error”,“line”:null,“method”:null,“native”:true},{“column”:18,“file”:“fs.js”,“function”:“Object.fs.statSync”,“line”:844,“method”:“fs.statSync”,“native”:false},{“column”:18,“file”:"/usr/games/minecraft/node_modules/tail/lib/tail.js",“function”:“Tail.watchEvent”,“line”:109,“method”:“watchEvent”,“native”:false},{“column”:24,“file”:"/usr/games/minecraft/node_modules/tail/lib/tail.js",“function”:"",“line”:94,“method”:null,“native”:false},{“column”:13,“file”:“events.js”,“function”:“emitTwo”,“line”:87,“method”:null,“native”:false},{“column”:7,“file”:“events.js”,“function”:“FSWatcher.emit”,“line”:172,“method”:“emit”,“native”:false},{“column”:12,“file”:“fs.js”,“function”:“FSEvent.FSWatcher._handle.onchange”,“line”:1221,“method”:“FSWatcher._handle.onchange”,“native”:false}],“stack”:[“Error: ENOENT: no such file or directory, stat ‘/var/games/minecraft/servers/CandCs_Challenge/logs/latest.log’”," at Error (native)"," at Object.fs.statSync (fs.js:844:18)"," at Tail.watchEvent (/usr/games/minecraft/node_modules/tail/lib/tail.js:109:18)"," at FSWatcher. (/usr/games/minecraft/node_modules/tail/lib/tail.js:94:24)"," at emitTwo (events.js:87:13)"," at FSWatcher.emit (events.js:172:7)"," at FSEvent.FSWatcher._handle.onchange (fs.js:1221:12)"],“level”:“error”,“message”:“uncaughtException: ENOENT: no such file or directory, stat ‘/var/games/minecraft/servers/CandCs_Challenge/logs/latest.log’”,“timestamp”:“2016-04-14T05:19:56.380Z”}

Good luck. As of now I am a bit at a loss, so I’ll let Hexparrot take over.

Hmmm… I don’t seem to have a admins.txt file, for some reason, lol.

Ah.
If it is missing, create it, it is not needed unless you wish to specify an admin :slight_smile:

Of course.

-rw-r–r--, 644?

Thanks.

Should be correct yes.

Like a charm, cheers!

Testing, the commands are typed at the console in the minecraft client after it comes up pressing the letter ‘T’?

/tp player target

Thanks

That is correct :slight_smile:
(Remember to restart the server after adding admin… The admin.txt has to be loaded into the minecraft server)

Excellent! I will hard reboot this server as loosing data on it is no problem.

The working server is on wheezy with java8 so I use jessie as my tester for now.

FTB Infinity is still on wheezy java7 until I get this issue sorted then will go to jessie for testing and stable on wheezy with java8.

best regards!

I created admins.txt file and cmod 644, typed my player name, hit the ‘t’ button, typed /save-all

“You do not have permission to use this command.”

entered /stop, same, no joy. Looking around to find the permission now, lol.

Thanks.

Strange.
Admins should have all tights. Then again, FTB servers do things differently.

OK.
in the server console (f you get the WebUI to be stable long enough) write :
op [username]

This adds you to the operator list (ops.json).

Do you run with whitelist active?

Yes, I added [username] to ops.json. Also to whitelist.json but have never used either before.

I added manually via SFTP, logged in as 'mc, not 'root.

Also added [] around username in admins.txt and renamed admins.txt to admin.txt.

All no joy. Still says no permission.

BTW, this is a 1.7.10 server with my own mods and forge added, not the FTB, I know better than to mess around with that one, lol.

Thanks, again.

Hm.
Firstly.
admins.txt:
Remove the brackets ([ ]). You only use the username straight forward. (I only use brackets around variables to show that that particular part of the command is a variable).

Ops & Whitelist:
Whitelist must be activated in the server.properties (white-list = true)
Both whitelist and op must be set in-game this way:
`In-game:

  • Press ‘T’ to open console / chat
  • to add user to whitelist write /whitelist add UserName
  • to set user to OP write /op UserName`

whitelist.json and op.json both need the Mojang user identificator strings in stead of usernames. It is WAAAAY easier to add those two in game, since Minecraft then sets the correct strings.

I tried this and still get “This site can’t be reached 192.168.1.10 refused to connect.”

It did re-boot the WebUI but did not refresh the log in page.

Good idea tho.