Webui not running?

Continuing the discussion from Megathread for MineOS webui issues:

First the background:
Installed a fresh CentOS 7 box and after updates added MineOS.
Installation seemed to go fine with the only issues being the files from the Fedora repository weren’t available. Since the files in the CentOS repository are newer (with the exception of pylibacl being 0.5.1-4 instead of 0.5.2-2) I completed the install.

Everything seemed to be good until I tried to open the webui and received a connection timed out error.
I then tried all the Webui service checks on the megathread and got the expected responses on all of them, except:
ps -aux | grep node returns the following:
root 13970 0.0 0.0 112712 948 pts/0 S+ 17:51 0:00 grep --color=auto node

As the result is my grep command it seems node.js isn’t running. I’m confused as to why the rest of the checks seem to indicate the website should be running.
I tried to start node.js manually:
[root@Work360-3 minecraft]# node webui.js
base_directory found in mineos.conf, using: /var/games/minecraft
info: Starting up server, using commit: b28c5be fw.ignore for all skip_dirs

[root@Work360-3 minecraft]# ps -aux | grep node
root 14036 0.0 0.0 112712 948 pts/0 S+ 17:54 0:00 grep --color=auto node
[root@Work360-3 minecraft]#

This doesn’t seem to work. I’ve also reset the webui using the included script and rebooted the server entirely. (Not likely to help, but desperate times and all…)

I’m not sure what else to try so I’m reaching out for help again.
I don’t see a place to attach a log file, but will pull it from the server and look for one.
Thanks in advance for your help.

Alright, first off, thanks for providing the detail that you did. Something seems off, seeing as how the node webui.js just returned to the command prompt like that (it shouldn’t).

The most common causes for this error are:

  1. not all external dependencies found. Usually this means java or rdiff-backup cannot be found.
  2. not all node dependencies found. When you reset the scripts and then [deleted] and then npm install --unsafe-perms, did you see any errors? Or did everything go smoothly through?
  3. lastly, there’s a chance since this is CentOS that you have SELinux blocking the process. TBH I don’t know SELinux well, so recommending just temporarily disabling it to see if the process doesn’t auto-exit might be a worth a shot.

As far as attaching a log, /var/log/mineos.log can be attached via copy/pasting to pastebin, etc. or just copying it directly here.

That’s the main problem I’m having, I’m not getting any errors to work with. Though I didn’t realize the node webui.js behavior was an error. (Maybe I should have…)

So just to try it, I set SELinux to permissive (records but doesn’t stop anything) and reset the scripts and performed another npm install. This went much quicker and cleaner than the last time, though I didn’t see any errors last time either. I then stopped and restarted the mineos service to see if it would start the webui. Finally I tried starting the webui manually again with node webui.js and received the exact same results.

I then repeated the entire process again with the service stopped before and only started after. (which is likely the way I should have done it the first time) When starting the service failed to start the webui, I tried node webui.js again. Still nothing and a quick return to the prompt.

I am pasting the log below, sorry for the length of it. If there’s nothing helpful here I may clear the log before my next attempt. (since I have a copy of it now anyway)

{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-09T05:04:55.116Z”}
Script execution started on: Sun Dec 9 00:07:18 EST 2018
Updating mineos-node repository…OK
Pulling master branch…Already up-to-date.
OK
Updating npm dependencies…audited 1408 packages in 10.307s
found 69 vulnerabilities (37 low, 20 moderate, 12 high)
run npm audit fix to fix them, or npm audit for details
OK
Setting node javascript files to executable…OK
Script execution ended on: Sun Dec 9 00:07:30 EST 2018
Script execution started on: Sun Dec 9 00:07:42 EST 2018
Updating mineos-node repository…OK
Checking out master branch…OK
Resetting directory to official contents…HEAD is now at b28c5be fw.ignore for all skip_dirs
OK
Deleting npm module dependencies and rebuilding…

posix@4.1.2 install /usr/games/minecraft/node_modules/posix
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/posix/build' CXX(target) Release/obj.target/posix/src/posix.o SOLINK_MODULE(target) Release/obj.target/posix.node COPY Release/posix.node make: Leaving directory /usr/games/minecraft/node_modules/posix/build’

userid@0.3.1 install /usr/games/minecraft/node_modules/userid
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/userid/build' CXX(target) Release/obj.target/userid/src/userid.o SOLINK_MODULE(target) Release/obj.target/userid.node COPY Release/userid.node make: Leaving directory /usr/games/minecraft/node_modules/userid/build’
added 553 packages from 432 contributors and audited 1408 packages in 26.894s
found 69 vulnerabilities (37 low, 20 moderate, 12 high)
run npm audit fix to fix them, or npm audit for details
OK
Setting node javascript files to executable…OK
Script execution ended on: Sun Dec 9 00:08:11 EST 2018
{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-09T05:08:52.969Z”}
Script execution started on: Sun Dec 9 00:42:37 EST 2018
Updating mineos-node repository…OK
Checking out master branch…OK
Resetting directory to official contents…HEAD is now at b28c5be fw.ignore for all skip_dirs
OK
Deleting npm module dependencies and rebuilding…

posix@4.1.2 install /usr/games/minecraft/node_modules/posix
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/posix/build' CXX(target) Release/obj.target/posix/src/posix.o SOLINK_MODULE(target) Release/obj.target/posix.node COPY Release/posix.node make: Leaving directory /usr/games/minecraft/node_modules/posix/build’

userid@0.3.1 install /usr/games/minecraft/node_modules/userid
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/userid/build' CXX(target) Release/obj.target/userid/src/userid.o SOLINK_MODULE(target) Release/obj.target/userid.node COPY Release/userid.node make: Leaving directory /usr/games/minecraft/node_modules/userid/build’
added 553 packages from 432 contributors and audited 1408 packages in 29.023s
found 69 vulnerabilities (37 low, 20 moderate, 12 high)
run npm audit fix to fix them, or npm audit for details
OK
Setting node javascript files to executable…OK
Script execution ended on: Sun Dec 9 00:43:09 EST 2018
{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-09T05:43:20.892Z”}
{“date”:“Sun Dec 09 2018 14:59:51 GMT-0500 (EST)”,“process”:{“pid”:20721,“uid”:0,“gid”:0,“cwd”:“/usr/games/minecraft”,“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:38858752,“heapTotal”:32849920,“heapUsed”:12920000,“external”:204693}},“os”:{“loadavg”:[4.140625,3.25634765625,2.6796875],“uptime”:56276},“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”:“2018-12-09T19:59:51.594Z”}
{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-09T21:22:17.883Z”}
{“date”:“Sun Dec 09 2018 17:00:51 GMT-0500 (EST)”,“process”:{“pid”:12890,“uid”:0,“gid”:0,“cwd”:”/usr/games/minecraft",“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:42029056,“heapTotal”:33374208,“heapUsed”:12893656,“external”:136709}},“os”:{“loadavg”:[0.0029296875,0.0263671875,0.04541015625],“uptime”:2347},“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”:“2018-12-09T22:00:51.120Z”}
{“date”:“Sun Dec 09 2018 17:53:26 GMT-0500 (EST)”,“process”:{“pid”:14008,“uid”:0,“gid”:0,“cwd”:”/usr/games/minecraft",“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:42053632,“heapTotal”:32849920,“heapUsed”:12905936,“external”:136709}},“os”:{“loadavg”:[0.0029296875,0.0146484375,0.04541015625],“uptime”:5502},“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”:“2018-12-09T22:53:26.523Z”}
{“date”:“Sun Dec 09 2018 21:37:05 GMT-0500 (EST)”,“process”:{“pid”:17976,“uid”:0,“gid”:0,“cwd”:”/usr/games/minecraft",“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:41766912,“heapTotal”:33374208,“heapUsed”:12915752,“external”:204693}},“os”:{“loadavg”:[0.0029296875,0.0146484375,0.04541015625],“uptime”:18921},“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”:“2018-12-10T02:37:05.301Z”}
{“date”:“Sun Dec 09 2018 21:51:12 GMT-0500 (EST)”,“process”:{“pid”:18649,“uid”:0,“gid”:0,“cwd”:”/usr/games/minecraft",“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:39428096,“heapTotal”:33898496,“heapUsed”:12899960,“external”:128517}},“os”:{“loadavg”:[0.09130859375,0.04052734375,0.0498046875],“uptime”:19768},“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”:“2018-12-10T02:51:12.201Z”}
{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-10T02:51:12.208Z”}
Script execution started on: Sun Dec 9 21:53:06 EST 2018
Updating mineos-node repository…OK
Checking out master branch…OK
Resetting directory to official contents…HEAD is now at b28c5be fw.ignore for all skip_dirs
OK
Deleting npm module dependencies and rebuilding…

posix@4.1.2 install /usr/games/minecraft/node_modules/posix
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/posix/build' CXX(target) Release/obj.target/posix/src/posix.o SOLINK_MODULE(target) Release/obj.target/posix.node COPY Release/posix.node make: Leaving directory /usr/games/minecraft/node_modules/posix/build’

userid@0.3.1 install /usr/games/minecraft/node_modules/userid
node-gyp rebuild

make: Entering directory /usr/games/minecraft/node_modules/userid/build' CXX(target) Release/obj.target/userid/src/userid.o SOLINK_MODULE(target) Release/obj.target/userid.node COPY Release/userid.node make: Leaving directory /usr/games/minecraft/node_modules/userid/build’
added 553 packages from 432 contributors and audited 1408 packages in 33.884s
found 69 vulnerabilities (37 low, 20 moderate, 12 high)
run npm audit fix to fix them, or npm audit for details
OK
Setting node javascript files to executable…OK
Script execution ended on: Sun Dec 9 21:53:46 EST 2018
{“level”:“info”,“message”:“Starting up server, using commit: b28c5be fw.ignore for all skip_dirs\n”,“timestamp”:“2018-12-10T02:55:14.353Z”}
{“date”:“Sun Dec 09 2018 21:55:30 GMT-0500 (EST)”,“process”:{“pid”:19066,“uid”:0,“gid”:0,“cwd”:“/usr/games/minecraft”,“execPath”:“/usr/bin/node”,“version”:“v8.14.0”,“argv”:[“/usr/bin/node”,“/usr/games/minecraft/webui.js”],“memoryUsage”:{“rss”:42094592,“heapTotal”:33898496,“heapUsed”:12898648,“external”:136709}},“os”:{“loadavg”:[0.181640625,0.16748046875,0.1015625],“uptime”:20026},“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”:“2018-12-10T02:55:30.640Z”}

I did want to note, I see the “Error: listen EADDRINUSE 0.0.0.0:8443” in the log posting… but I don’t know what to make of it. Is it possible I have 2 webservers running or something? I don’t usually work with websites, so I’m a little out of my depth with this particular set of issues.

Thanks again for your help.

That to me looks as if there is already something else running/listening on that port, could be the webui maybe even though it isn’t running (well node to be exact) so maybe try killall node or lsof -i tcp:8443 followed by kill -9 XXXX replacing “XXXX” with the numbers under “PID”.

Well that’s interesting. Maybe this will help those of you helping me. (It confuses me)

When I stopped the mineos service, whatever was listening on 8443 also stopped. I was then able to run node webui.js and have it not stop immediately. When I restarted mineos the listener on 8443 is there again, node isn’t running and I’m right where I was.

So what would I have messed up on that would cause mineos to take the port, but not start node?

Not sure; if it’s running, it should be connectable.

That said,

Running webui.js is just running the service in the foreground, so you should either run the webui manually or start it as the service, but not both.

For the sake of ease, lets kill all instances of the webui and ignore the service–the service sends things to the background, which is not a helpful place to be troubleshooted.

So:

  1. kill all sessions and verify nothing running on 8443
  2. start the webui via node webui.js
  3. try connecting and take note of any lines produced to your terminal session where the webui is running

Ok, here we go…

[root@localhost ~]# systemctl stop mineos
[root@localhost ~]# netstat -tnl | grep 8443
[root@localhost minecraft]# cd /usr/games/minecraft/
[root@localhost minecraft]# node webui.js
base_directory found in mineos.conf, using: /var/games/minecraft
MineOS webui listening on HTTPS://0.0.0.0:8443
info: Starting up server, using commit: b28c5be fw.ignore for all skip_dirs

[2nd shell]
[root@localhost ~]# !ps
ps -ef | grep node
root 9349 9288 0 18:53 pts/0 00:00:01 node webui.js
root 9543 9509 0 19:01 pts/1 00:00:00 grep --color=auto node
[root@localhost ~]# netstat -tnl | grep 8443
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN
[root@localhost ~]# curl -k -b cookie.txt https://192.168.1.70:8443/admin/index.html
Found. Redirecting to /admin/login.html
[root@localhost ~]# curl -k -c cookie.txt -d “username=mc” -d “password=deleted” https://192.168.1.70:8443/auth
Found. Redirecting to /admin/index.html

At this point the first window had this show up:
Successful login attempt for username: mc

Which would imply a successful connection to me. But the webpage still times out in a browser. I can connect to a different mineos server in the same switch. (The one I’m trying to replace as it’s a vm on a server I’m trying to remove.) I’m also connected to the server via ssh and it can reach the internet… I have to be missing something.

1 Like

The service is up, then! I’d say the most likely cause here is the firewall. Disable firewalld (or whichever is your default firewall) for the moment and try again in the browser.

Ok, this is better at least. I disabled firewalld (had no idea they moved away from iptables… oops) and when I tried the browser I now get the following error in both the browser and the console:

express deprecated res.sendfile: Use res.sendFile instead webui.js:187:13
Error: ENOENT: no such file or directory, stat ‘/html/login.html’

Thanks again for your help. I think I’m almost there.

1 Like

It’s working! I stopped the manual webui.js and started the service. Looks like my problem was likely not knowing about the firewall in the first place.

Thank you for your time and patience. =)

1 Like