MineOS WebUI creates servers at "undefined" on Arch Linux

Hi all,

I have been playing about with MineOS and I decided to try and install it on an OS that I could get preinstalled on a VPS, in case I ever want to host it. After a while, I was able to get the webui working from a virtual machine running arch Linux, but there are several issues I cannot figure out. Firstly, when the web page is first logged into, what appears to be the names of the variables are displayed instead of the actual value of that variable. This is a minor issue, which goes away if I go off of, and then back onto the page, but I feel it may be related to my bigger issue.

The bigger issue is with creating servers. I can create a new server from the page, but when it is created, it does not appear in the currently selected server drop down. If I look at the server status, the location of the server is in “undefined”, the server owner is "undefined (undefined) ", and anywhere where storage space is to be calculated is “NaNundefined”. There are also no profiles, no calendar in the calendar tab and no load averages in the dashboard, as can be seen above. When I refresh the page, the server disappears, probably because it was never created. I have tried to reinstall both arch and MineOS from scratch, but this problem persists. I was able to install MineOS Turnkey on a similar VM and it did not have these issues, so I believe it is something to do with installing it on Arch.

Here is some screenshots which show the issues: https://imgur.com/a/h3PWr2J
And here is /var/log/mineos.log:

{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T12:24:56.143Z"}
{"date":"Mon Feb 10 2020 12:25:17 GMT+0000 (Greenwich Mean Time)","process":{"pid":357,"uid":0,"gid":0,"cwd":"/","execPath":"/usr/bin/node","version":"v13.8.0","argv":["/usr/bin/node","/usr/games/minecraft/webui.js","start"],"memoryUsage":{"rss":63381504,"heapTotal":16228352,"heapUsed":13516392,"external":2698215}},"os":{"loadavg":[0.21484375,0.06005859375,0.01953125],"uptime":32},"trace":[{"column":15,"file":"internal/modules/cjs/loader.js","function":"Module._resolveFilename","line":980,"method":"_resolveFilename","native":false},{"column":27,"file":"internal/modules/cjs/loader.js","function":"Module._load","line":862,"method":"_load","native":false},{"column":19,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":1040,"method":"require","native":false},{"column":18,"file":"internal/modules/cjs/helpers.js","function":"require","line":72,"method":null,"native":false},{"column":19,"file":"/usr/games/minecraft/node_modules/userid/lib/userid.js","function":null,"line":5,"method":null,"native":false},{"column":30,"file":"internal/modules/cjs/loader.js","function":"Module._compile","line":1151,"method":"_compile","native":false},{"column":10,"file":"internal/modules/cjs/loader.js","function":"Module._extensions..js","line":1171,"method":".js","native":false},{"column":32,"file":"internal/modules/cjs/loader.js","function":"Module.load","line":1000,"method":"load","native":false},{"column":14,"file":"internal/modules/cjs/loader.js","function":"Module._load","line":899,"method":"_load","native":false},{"column":19,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":1040,"method":"require","native":false}],"stack":["Error: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'","Require stack:","- /usr/games/minecraft/node_modules/userid/lib/userid.js","- /usr/games/minecraft/server.js","- /usr/games/minecraft/webui.js","- /usr/games/minecraft/node_modules/daemonize2/lib/wrapper.js","    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)","    at Function.Module._load (internal/modules/cjs/loader.js:862:27)","    at Module.require (internal/modules/cjs/loader.js:1040:19)","    at require (internal/modules/cjs/helpers.js:72:18)","    at Object.<anonymous> (/usr/games/minecraft/node_modules/userid/lib/userid.js:5:19)","    at Module._compile (internal/modules/cjs/loader.js:1151:30)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)","    at Module.load (internal/modules/cjs/loader.js:1000:32)","    at Function.Module._load (internal/modules/cjs/loader.js:899:14)","    at Module.require (internal/modules/cjs/loader.js:1040:19)"],"level":"error","message":"uncaughtException: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'\nRequire stack:\n- /usr/games/minecraft/node_modules/userid/lib/userid.js\n- /usr/games/minecraft/server.js\n- /usr/games/minecraft/webui.js\n- /usr/games/minecraft/node_modules/daemonize2/lib/wrapper.js","timestamp":"2020-02-10T12:25:17.017Z"}
{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T12:25:17.666Z"}

Don’t use Arch Linux as a server. Use something like ubuntu server or Debian CLI (Debian Standard).

And if you just wanna use mineos then I would probably just get a freebsd vps since its the most stable and lightweight

I’m using Arch because its what I’m familiar with. I did try and use Debian, but I couldn’t get the webui working at all, and using it only caused more headaches than I care to endure.

Yeah, I know what the problems you’re experiencing

First you gotta get Java 8 installed: Just use this method, frankendebian rly easy. Though read through the full thing please, like removing the old repos when ur done:
http://rovernet.ddns.net:8080/blog/Java%208%20on%20Debian%2010

Then u gotta need

Then ya gotta install Nodejs 8, and that’s the problem with the webui, https://github.com/nodesource/distributions/issues/866

So once you’ve done that, just run the original install scripts though skip the nodejs one and Java one:
https://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS-node_(apt-get)

Have a great day, debian rocks, I rly recommend using it.

If u wanna use debian and have any problems with it just reply to this comment or @ me

Best guess is that you’re using too recent a version of NodeJS.

Looks like the NodeJS version I’ve been depending on until now just exited LTS support. Quite a few npm modules I use don’t build on Node 13, so I’ve been keeping them behind. I’ll have to look to see if those packages were finally upkept and work on newer nodes, but based on you getting these errors, it’s definitely not working out-of-the-box.

Try a lower node version in the meantime.

1 Like

I just don’t think Arch is really good for server use, but sure

Well that’s strange. I am using NVM and installed node 8 (specifically 8.17) because running npm install --unsafe-perm would return errors otherwise. I see on the suggested messages that there was a similar issue discussed at Can't create servers / No Profiles downloaded - Arch, which I couldn’t find before now. I see his issue was that MineOS doesn’t use the NVM version so it is most likely the same here, I would guess. I tried the second option to fix the issue you ultimately gave him, which is to put the script from /root/.bashrc to /etc/profile, but that didn’t work. How would I go about removing the system version and symlinking the v8 install in its place? I can’t say I’m advanced enough to know that process yet.

EDIT: I actually haven’t put that script in /root/.bashrc, I put it in /etc/bash.bashrc which should be more universal. I realy don’t know if that changes anything.

Ok, so I found out that you can use nvm which to get the path to the node executable. I used that information to delete the system executable and create a symlink to the node 8.17 executable. Now, MineOS logs are reporting that 8.17 is being used but nothing has changed. Also, NVM spits out some errors on reboot so I may have done it wrong. The errors in question are:

N/A: version “N/A → N/A” is not yet installed.

You need to run “nvm install N/A” to install it before using it.
N/A: version “N/A → N/A” is not yet installed.

Here is the log:

{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T16:12:03.000Z"}
{"date":"Mon Feb 10 2020 16:12:16 GMT+0000 (GMT)","process":{"pid":2229,"uid":0,"gid":0,"cwd":"/","execPath":"/root/.nvm/versions/node/v8.17.0/bin/node","version":"v8.17.0","argv":["/root/.nvm/versions/node/v8.17.0/bin/node","/usr/games/minecraft/webui.js","start"],"memoryUsage":{"rss":55513088,"heapTotal":25509888,"heapUsed":19749984,"external":573815}},"os":{"loadavg":[0,0.025390625,0],"uptime":457},"trace":[{"column":15,"file":"module.js","function":"Module._resolveFilename","line":548,"method":"_resolveFilename","native":false},{"column":25,"file":"module.js","function":"Module._load","line":475,"method":"_load","native":false},{"column":17,"file":"module.js","function":"Module.require","line":597,"method":"require","native":false},{"column":18,"file":"internal/module.js","function":"require","line":11,"method":null,"native":false},{"column":19,"file":"/usr/games/minecraft/node_modules/userid/lib/userid.js","function":null,"line":5,"method":null,"native":false},{"column":30,"file":"module.js","function":"Module._compile","line":653,"method":"_compile","native":false},{"column":10,"file":"module.js","function":"Module._extensions..js","line":664,"method":".js","native":false},{"column":32,"file":"module.js","function":"Module.load","line":566,"method":"load","native":false},{"column":12,"file":"module.js","function":"tryModuleLoad","line":506,"method":null,"native":false},{"column":3,"file":"module.js","function":"Module._load","line":498,"method":"_load","native":false}],"stack":["Error: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'","    at Function.Module._resolveFilename (module.js:548:15)","    at Function.Module._load (module.js:475:25)","    at Module.require (module.js:597:17)","    at require (internal/module.js:11:18)","    at Object.<anonymous> (/usr/games/minecraft/node_modules/userid/lib/userid.js:5:19)","    at Module._compile (module.js:653:30)","    at Object.Module._extensions..js (module.js:664:10)","    at Module.load (module.js:566:32)","    at tryModuleLoad (module.js:506:12)","    at Function.Module._load (module.js:498:3)"],"level":"error","message":"uncaughtException: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'","timestamp":"2020-02-10T16:12:16.471Z"}
{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T16:12:17.262Z"}

Is there really no more to the log?

Realistically, i can’t imagine it being that light even if you never once connected to it, but all I’m seeing is the starting up a of a server.

I don’t even see attempts to connect to the server. I guess we can try this:

  1. turn off the webui.

usually this is done with supervisorctl stop mineos

  1. with the webui down, as root run the webui manually:
# cd /usr/games/minecraft
./webui.js
  1. Connect and share with us the log updates (onscreen)

Ok, so the logs I have been sending didn’t include creating a server, which is stupid of me, as I just saw the titles not change and assumed it was still broken. I also delete the file between fixes because I don’t see the point of resending logs. So I ran it directly, and it was the same effect. Here are the logs, including creating a server this time:

{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T17:33:45.123Z"}
{"date":"Mon Feb 10 2020 17:35:14 GMT+0000 (GMT)","process":{"pid":1886,"uid":0,"gid":0,"cwd":"/usr/games/minecraft","execPath":"/root/.nvm/versions/node/v8.17.0/bin/node","version":"v8.17.0","argv":["/root/.nvm/versions/node/v8.17.0/bin/node","/usr/games/minecraft/webui.js"],"memoryUsage":{"rss":54812672,"heapTotal":34422784,"heapUsed":20261000,"external":858555}},"os":{"loadavg":[0.25439453125,0.103515625,0.03515625],"uptime":100},"trace":[{"column":14,"file":"net.js","function":"Server.setupListenHandle [as _listen2]","line":1360,"method":"setupListenHandle [as _listen2]","native":false},{"column":12,"file":"net.js","function":"listenInCluster","line":1401,"method":null,"native":false},{"column":7,"file":"net.js","function":"doListen","line":1510,"method":null,"native":false},{"column":11,"file":"internal/process/next_tick.js","function":"_combinedTickCallback","line":142,"method":null,"native":false},{"column":9,"file":"internal/process/next_tick.js","function":"process._tickCallback","line":181,"method":"_tickCallback","native":false}],"stack":["Error: listen EADDRINUSE 0.0.0.0:8443","    at Server.setupListenHandle [as _listen2] (net.js:1360:14)","    at listenInCluster (net.js:1401:12)","    at doListen (net.js:1510:7)","    at _combinedTickCallback (internal/process/next_tick.js:142:11)","    at process._tickCallback (internal/process/next_tick.js:181:9)"],"level":"error","message":"uncaughtException: listen EADDRINUSE 0.0.0.0:8443","timestamp":"2020-02-10T17:35:14.266Z"}
{"level":"info","message":"Starting up server, using commit: ad34695 Update FTB profile to use forgecdn.net (#330)\n","timestamp":"2020-02-10T17:35:37.949Z"}
{"date":"Mon Feb 10 2020 17:36:00 GMT+0000 (GMT)","process":{"pid":1906,"uid":0,"gid":0,"cwd":"/usr/games/minecraft","execPath":"/root/.nvm/versions/node/v8.17.0/bin/node","version":"v8.17.0","argv":["/root/.nvm/versions/node/v8.17.0/bin/node","/usr/games/minecraft/webui.js"],"memoryUsage":{"rss":53501952,"heapTotal":26034176,"heapUsed":19652000,"external":573547}},"os":{"loadavg":[0.1181640625,0.08642578125,0.03076171875],"uptime":146},"trace":[{"column":15,"file":"module.js","function":"Module._resolveFilename","line":548,"method":"_resolveFilename","native":false},{"column":25,"file":"module.js","function":"Module._load","line":475,"method":"_load","native":false},{"column":17,"file":"module.js","function":"Module.require","line":597,"method":"require","native":false},{"column":18,"file":"internal/module.js","function":"require","line":11,"method":null,"native":false},{"column":19,"file":"/usr/games/minecraft/node_modules/userid/lib/userid.js","function":null,"line":5,"method":null,"native":false},{"column":30,"file":"module.js","function":"Module._compile","line":653,"method":"_compile","native":false},{"column":10,"file":"module.js","function":"Module._extensions..js","line":664,"method":".js","native":false},{"column":32,"file":"module.js","function":"Module.load","line":566,"method":"load","native":false},{"column":12,"file":"module.js","function":"tryModuleLoad","line":506,"method":null,"native":false},{"column":3,"file":"module.js","function":"Module._load","line":498,"method":"_load","native":false}],"stack":["Error: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'","    at Function.Module._resolveFilename (module.js:548:15)","    at Function.Module._load (module.js:475:25)","    at Module.require (module.js:597:17)","    at require (internal/module.js:11:18)","    at Object.<anonymous> (/usr/games/minecraft/node_modules/userid/lib/userid.js:5:19)","    at Module._compile (module.js:653:30)","    at Object.Module._extensions..js (module.js:664:10)","    at Module.load (module.js:566:32)","    at tryModuleLoad (module.js:506:12)","    at Function.Module._load (module.js:498:3)"],"level":"error","message":"uncaughtException: Cannot find module '/usr/games/minecraft/node_modules/userid/build/Debug/userid.node'","timestamp":"2020-02-10T17:36:00.537Z"}

Alright, I noticed it couldn’t find userid.node, so I decided to try and install it again. I had installed it before and it didn’t work, but I did it again and now everything is working. Thanks for all the help, it’s made this process so much easier!