Cannot login to WebUI

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