Cannot login to WebUI

mineos.log

{“level”:“info”,“message”:“Starting up server, using commit: 50e3f4c updated dockerfile for stretch/nodev8\n”,“timestamp”:“2018-06-12T09:59:06.006Z”}
{“level”:“info”,“message”:“Starting up server, using commit: 50e3f4c updated dockerfile for stretch/nodev8\n”,“timestamp”:“2018-06-12T10:55:54.060Z”}
{“level”:“info”,“message”:“Starting up server, using commit: 50e3f4c updated dockerfile for stretch/nodev8\n”,“timestamp”:“2018-06-12T11:49:26.766Z”}

mineos.auth.log
Tue Jun 12 2018 07:50:14 GMT-0400 (EDT) - failure from: IPADDRESS user: USERNAME

Is there access that needs to be given to the user? like executable to the mineos directory?

I appreciate you trying to help.

Do your username or password use any special characters? It may be a charset error in the WebUI that translates a character wrong.

Please try to change password to something using only letters and numbers (just to check if that is the case, you can change back if you want to afterwords). You can do so using the command passwd after logging into the console

1 Like

I changed the username/password to test/password and get the same failure log from the mineos.auth.log file.

Then I am starting to run out of Ideas. @hexparrot may be able to help?

Thanks again! I may try another version of OS, I would just use turnkey, but I dont have an option to install an OS that is not listed on VPS.

I have installed another distro based on Debian and now have access to the webui, Thanks so much @iMelsom for your time and help!

2 Likes

@hexparrot:
Since this was resolved by workaround (installing another distro), the underlying error was not discovered. Out of curiosity (and to be able to give a better answer than “install another distro” to other users in the future), do you have any idea what was happening?

I’d run into this issue before–and troubleshooted it a bit, but didn’t have the access or opportunity to find out the root cause, either.

See here: Problem loggin in on CentOS 7 - #11 by hexparrot

It was an identical issue for auth, but basically CentOS must handle PAM modules or such differently, that nodejs can’t tap into it. It’s my best guess that CentOS is locking it down better (and perhaps not SELinux like I posited) and the issue lies in the PAM module config: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-pam.html

1 Like

No unfortunately. Im still having some issues, but I do not know, the logs just show login failure. I think maybe to do with security on the version of linux. It has been prob 10 years since I have worked on any linux servers and I am rusty to be honest.

Well, just as in the linked page, this is how we would systematically find out what’s causing the problem: Problem loggin in on CentOS 7

The script itself tests 3 separate authentication methods, individually. If any of the three pass, the auth of MineOS will work by choosing that method.

Here’s a quick link to the script itself: https://pastebin.com/EaTLwkmv

The only requirement to this script is changing the first few lines to match a valid, existing non-root user. Currently it’s mc and password, but that can be changed to literally whatever login you’re using (and should be changed).


I think one of the core problems here is that all the CentOS related issues are docker builds or third-party images, as well, which mean there is config occurring AFTER the fresh install, which is what I’m testing.

If you guys can fill me in on what docker image file (or provide the build file to me)–or provide any way I can work on that type of system first-hand, I can use that and troubleshoot it more surgically!

Hi Will,
I’m also getting this issue on FreeBSD 11.2 using a fresh download of Mineos. I’m working on bare metal, and it’s open to the internet. I’m happy to open it up to you. Let me know if you want access to the box for testing.

Cheers,
Grinder.

$ cat mineos.log
{"level":"info","message":"Starting up server, using commit: 5b472a3 Merge branch 'master' of  https://github.com/hexparrot/mineos-node\n","timestamp":"2018-09-02T07:25:28.223Z"}
{"level":"info","message":"Starting up server, using commit: 5b472a3 Merge branch 'master' of https://github.com/hexparrot/mineos-node\n","timestamp":"2018-09-02T08:12:08.274Z"}
{"level":"info","message":"Starting up server, using commit: 5b472a3 Merge branch 'master' of https://github.com/hexparrot/mineos-node\n","timestamp":"2018-09-02T08:48:24.292Z"}

If the service isn’t running (and that’s my best guess right now), try running the service manually in the foreground to see any errors not making it into the logs.

cd /usr/local/games/minecraft
./webui.js

To be clear, it’s FreeBSD so, I believe the path you mean is /usr/local/games/minecraft (The scripts in upstart_conf are also incorrectly pointing to /usr/games/minecraft, just as an FYI. This wasn’t the first version to be missing the reference to /local/, so I picked up on that problem right away).

Yes, I started the service manually, and am able to do all the things the OP was able to do. The service starts, and I can get to the login screen, but the login fails (without an error message), the prompts are cleared, and the login page is re-displayed. In my post above you can see the server log showing that it started, but I was unable to authenticate using ‘mc’ which is meant to be my mineos unpriv’d account, but I also tried with ‘wheel’ user name, both were refused.

Sun Sep 02 2018 03:26:30 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: mc
Sun Sep 02 2018 03:26:44 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: mc
Sun Sep 02 2018 03:27:32 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: hyndmanc
Sun Sep 02 2018 04:13:17 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: mc
Sun Sep 02 2018 04:13:38 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: hyndmanc
Sun Sep 02 2018 04:49:10 GMT-0400 (Eastern Daylight Time) - failure from: 192.168.0.11 user: mc

I tried to start in manually you describe above, but ./webui is not recognized by shell. Shouldn’t I be launching it in the node wrapper?
us/root@FTC_BSD:/usr/local/games/minecraft # ./webui
./webui: Command not found.

So, I tried to launch it directly with the .js extention:
root@FTC_BSD:/usr/local/games/minecraft # ./webui.js
base_directory found in mineos.conf, using: /var/games/minecraft

But it just returned to the shell prompt, and no new pids were created.

Can you verify that there were no errors/failed npm attempts from nodejs?

 cd /usr/local/games/minecraft
 rm -rf node_modules
 npm install

It’s possible that posix or userid have failed to build. If that’s the case, then the solution is the argument --unsafe-perm.

It could even be authenticate-pam. IIRC that’s the module that might be only used by BSD users, and I am not sure the last time I ran my auth test suites against BSD; I will be looking into this.

Also can try:

cd /usr/local/games/minecraft
npm install -g nodeunit
nodeunit test/test-auth.js

All 16 assertions should pass. I’m going to guess due to my inattention to BSD, compat will show elsewise, though…

root@FTC_BSD:/usr/local/games/minecraft # npm install**

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

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT            HON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm            /node_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/            node_modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/whic            h.js:68:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/whic            h.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.j            s:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_mo            dules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_mo            dules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System FreeBSD 11.2-RELEASE
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_mod            ules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/games/minecraft/node_modules/posix
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log            ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-09-05T11_29_59_457Z-debug.log

So, that error looked python-ish which I assumed meant I’d messed up the pkg install originally, so I re-executed:

root@FTC_BSD:/usr/local/games/minecraft # pkg install -y rdiff-backup rsync gmake screen git sysutils/py-supervisor node www/npm
Updating FreeBSD repository catalogue…
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 3.3MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 32120 packages processed.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed
root@FTC_BSD:/usr/local/games/minecraft # npm install -g nodeunit /usr/local/bin/nodeunit → /usr/local/lib/node_modules/nodeunit/bin/nodeunit
+ nodeunit@0.11.3
updated 1 package in 10.334s

So, I installed nodeunit and ran your test:
root@FTC_BSD:/usr/local/games/minecraft # nodeunit test/test-auth.js

test-auth.js
✖ authenticate_shadow

AssertionError: false == 'weak'
    at Object.equal (/usr/local/lib/node_modules/nodeunit/lib/types.js:83:39)
    at /usr/local/games/minecraft/test/test-auth.js:11:14
    at /usr/local/games/minecraft/auth.js:93:15
    at posix (/usr/local/games/minecraft/auth.js:40:7)
    at /usr/local/games/minecraft/auth.js:89:11
    at /usr/local/games/minecraft/auth.js:14:9
    at /usr/local/games/minecraft/node_modules/graceful-fs/polyfills.js:284:29
    at FSReqWrap.oncomplete (fs.js:152:21)

✖ test_membership

Error: Cannot find module '/usr/local/games/minecraft/node_modules/userid/build/Debug/userid.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/games/minecraft/node_modules/userid/lib/userid.js:5:19)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.auth.test_membership (/usr/local/games/minecraft/auth.js:101:16)
    at /usr/local/games/minecraft/test/test-auth.js:57:12
    at /usr/local/games/minecraft/node_modules/async/lib/async.js:718:13
    at iterate (/usr/local/games/minecraft/node_modules/async/lib/async.js:262:13)

✖ verify_ids

undefined


FAILURES: 3/3 assertions failed (340ms)

This problem has been solved and the corresponding documentation updated.

Mainly, the following changes were implemented:

  1. pkg install python
    this package was previously implied, but python may not have been added on all FreeBSD installs
  2. echo “CXX=c++ npm install userid” | sh
    for reasons unknown, if this fails during the broader npm install it is not made clear to the user. Separated it as its own step in order to make sure it works as expected.

Also seeing this with my FreeBSD system.

The unit tests behave much differently to above, though

test-auth.js
:heavy_multiplication_x: authenticate_shadow

AssertionError: false == ‘weak’
at Object.equal (/usr/local/lib/node_modules/nodeunit/lib/types.js:83:39)
at /usr/local/games/minecraft/test/test-auth.js:11:14
at /usr/local/games/minecraft/auth.js:93:15
at posix (/usr/local/games/minecraft/auth.js:40:7)
at /usr/local/games/minecraft/auth.js:89:11
at /usr/local/games/minecraft/auth.js:14:9
at /usr/local/games/minecraft/node_modules/graceful-fs/polyfills.js:284:29
at FSReqWrap.oncomplete (fs.js:154:21)

:heavy_multiplication_x: test_membership

AssertionError: false == true
at Object.equal (/usr/local/lib/node_modules/nodeunit/lib/types.js:83:39)
at /usr/local/games/minecraft/test/test-auth.js:58:14
at EventEmitter. (/usr/local/games/minecraft/auth.js:113:7)
at EventEmitter.emit (events.js:182:13)
at EventEmitter.emit (domain.js:442:20)
at LineReadStream. (/usr/local/games/minecraft/node_modules/etc-passwd/index.js:47:19)
at LineReadStream.emit (events.js:182:13)
at LineReadStream.EventEmitter.emit (domain.js:442:20)
at ReadStream. (/usr/local/games/minecraft/node_modules/lazylines/lazylines.js:41:14)
at ReadStream.emit (events.js:187:15)
at ReadStream.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

AssertionError: false == true
at Object.equal (/usr/local/lib/node_modules/nodeunit/lib/types.js:83:39)
at /usr/local/games/minecraft/test/test-auth.js:70:14
at EventEmitter. (/usr/local/games/minecraft/auth.js:113:7)
at EventEmitter.emit (events.js:182:13)
at EventEmitter.emit (domain.js:442:20)
at LineReadStream. (/usr/local/games/minecraft/node_modules/etc-passwd/index.js:47:19)
at LineReadStream.emit (events.js:182:13)
at LineReadStream.EventEmitter.emit (domain.js:442:20)
at ReadStream. (/usr/local/games/minecraft/node_modules/lazylines/lazylines.js:41:14)
at ReadStream.emit (events.js:187:15)
at ReadStream.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

AssertionError: false == true
at Object.equal (/usr/local/lib/node_modules/nodeunit/lib/types.js:83:39)
at /usr/local/games/minecraft/test/test-auth.js:76:14
at EventEmitter. (/usr/local/games/minecraft/auth.js:113:7)
at EventEmitter.emit (events.js:182:13)
at EventEmitter.emit (domain.js:442:20)
at LineReadStream. (/usr/local/games/minecraft/node_modules/etc-passwd/index.js:47:19)
at LineReadStream.emit (events.js:182:13)
at LineReadStream.EventEmitter.emit (domain.js:442:20)
at ReadStream. (/usr/local/games/minecraft/node_modules/lazylines/lazylines.js:41:14)
at ReadStream.emit (events.js:187:15)
at ReadStream.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

:heavy_check_mark: verify_ids

FAILURES: 4/11 assertions failed (84ms)
root@impure:~ # uname -a
FreeBSD impure 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #3: Sun Oct 21 20:43:49 PDT 2018 root@impure:/usr/obj/usr/src/sys/IMPURE amd64

Hi, had similiar problem on FreeNAS 11.3-U3.2, running MineOS in jail.
I’ve had just a login screen, and when I typed in credentials, it just refreshed.
It helped to navigate to /usr/local/games/minecraft and perform npm install userid there.
I just (for sanity) restarted jail and changed defautl login with passwd mcserver and everything started to work.
Logs for some reason doesn’t log anything that seems to indicate any sort of fault. However, here’s something from it:

mineos.auth.log
Mon Aug 31 2020 22:03:07 GMT+0200 (Central European Summer Time) - failure from: 192.168.0.24 user: mcserver
Mon Aug 31 2020 22:04:36 GMT+0200 (Central European Summer Time) - failure from: 192.168.0.24 user: mcserver

mineos.log
{"level":"info","message":"Starting up server, using commit: ef3c413 added requirement to detect rsync on startup\n","timestamp":"2020-08-31T19:59:25.343Z"} {"level":"info","message":"Starting up server, using commit: ef3c413 added requirement to detect rsync on startup\n","timestamp":"2020-08-31T20:02:53.401Z"} {"level":"info","message":"Starting up server, using commit: ef3c413 added requirement to detect rsync on startup\n","timestamp":"2020-08-31T20:09:18.872Z"} {"level":"info","message":"[WEBUI] mcserver connected from XXX.XXX.XXX.XXX","timestamp":"2020-08-31T20:09:35.190Z"} {"0":"de_DE","1":"en_US","2":"fr_FR","3":"it_IT","4":"ja_JP","5":"no_NB","6":"ru_RU","7":"sv_SE","level":"info","message":"","timestamp":"2020-08-31T20:09:35.316Z"} {"level":"info","message":"Downloaded information for collection: Mojang Official Minecraft Jars (481 entries)","timestamp":"2020-08-31T20:09:35.534Z"} {"level":"error","message":"Unable to retrieve profile: ftb. The definition forthis profile may be improperly formed or is pointing to an invalid URI.","timestamp":"2020-08-31T20:09:42.954Z"} {"level":"error","message":"Unable to retrieve profile: forge. The definition for this profile may be improperly formed or is pointing to an invalid URI.","timestamp":"2020-08-31T20:09:42.956Z"} {"level":"info","message":"Downloaded information for collection: Spigot (1 entries)","timestamp":"2020-08-31T20:09:42.957Z"} {"level":"info","message":"Downloaded information for collection: Imagicalmine (1 entries)","timestamp":"2020-08-31T20:09:42.957Z"} {"level":"error","message":"Unable to retrieve profile: ftb_third_party. The definition for this profile may be improperly formed or is pointing to an invalid URI.","timestamp":"2020-08-31T20:09:42.968Z"} {"level":"error","message":"Unable to retrieve profile: paperspigot. The definition for this profile may be improperly formed or is pointing to an invalid URI.","timestamp":"2020-08-31T20:09:43.030Z"} {"level":"error","message":"Unable to retrieve profile: bungeecord. The definition for this profile may be improperly formed or is pointing to an invalid URI.","timestamp":"2020-08-31T20:09:43.071Z"} {"level":"info","message":"Downloaded information for collection: SpongeVanilla(0 entries)","timestamp":"2020-08-31T20:09:43.241Z"}
And yes, this last log for some reason don’t have logs from before, where the error probably occured. But you might get something from it, I’m kinda lost in it. Hopefully you’ll figure this out :slight_smile:

TL:DR there’s something wrong with userid npm package.

Hi all.

Faced the same problem. Although I have it most likely due to a plugin installation error. It was installed, it starts up and does not let the login and password go further. What is the problem? I am using FreeNAS 11.3-U5. Thanks in advance.

Install Notes:

posix@4.2.0 install /usr/local/games/minecraft/node_modules/posix

node-gyp rebuild

gmake: Entering directory ‘/usr/local/games/minecraft/node_modules/posix/build’

CXX(target) Release/obj.target/posix/src/posix.o

CXX(target) Release/obj.target/posix/src/posix.o

In file included from …/src/posix.cc:1:

In file included from …/…/nan/nan.h:53:

In file included from /root/.cache/node-gyp/10.22.1/include/node/uv.h:52:

In file included from /root/.cache/node-gyp/10.22.1/include/node/uv/errno.h:25:

In file included from /usr/include/c++/v1/errno.h:26:

/usr/include/c++/v1/__config:117:2: error: “_LIBCPP_TRIVIAL_PAIR_COPY_CTOR” is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead

CXX(target) Release/obj.target/posix/src/posix.o

#error “_LIBCPP_TRIVIAL_PAIR_COPY_CTOR” is no longer supported. \

^

CXX(target) Release/obj.target/posix/src/posix.o

1 error generated.

CXX(target) Release/obj.target/posix/src/posix.o

gmake: *** [posix.target.mk:105: Release/obj.target/posix/src/posix.o] Error 1

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: *** [posix.target.mk:105: Release/obj.target/posix/src/posix.o] Error 1

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gyp ERR! build error

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gyp ERR! stack Error: gmake failed with exit code: 2

gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)

gyp ERR! stack at ChildProcess.emit (events.js:198:13)

gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

gyp ERR! System FreeBSD 11.3-RELEASE-p14

gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”

gyp ERR! cwd /usr/local/games/minecraft/node_modules/posix

gyp ERR! node -v v10.22.1

gyp ERR! node-gyp -v v5.1.0

gyp ERR! not ok

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

npm ERR! code ELIFECYCLE

npm ERR! errno 1

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

npm ERR! posix@4.2.0 install: node-gyp rebuild

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the posix@4.2.0 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

gmake: Leaving directory ‘/usr/local/games/minecraft/node_modules/posix/build’

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log

mineos_enable: → YES

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log

Starting mineos.

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log

Starting mineos daemon…

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log

mineos daemon started. PID: 22580

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-10-10T01_16_42_601Z-debug.log