Can not login with freebsd bhyve

Hi there,

I tried to set up my server as bhyve instance(freebsd). Install instructions from the wiki.
When i try to log in as mc it reloads the page.
mineos.auth.log says failure from:[myIP] user: mc.
I can log in to the system via ssh with mc, but the web login keeps failing. can you point in the direction where i should be checkin?

Thanks for the great work

What commit are you on? (if you don’t know)

If you just cloned it recently (because this is your first time getting it started), you’re probably using the most recent commit.

If so, try this:

cd /usr/local/games/minecraft
npm install pam-authentication

This should install the PAM auth module that FreeBSD can alternatively use to get past the auth part.

Also, what version of FreeBSD are you using (uname -a)?

I’ve never heard of bhyve; I’ll see if there’s anything going on with this distro that might be causing conflict.

bhyve is just a Hypervisor. I’m now trying directly on my “server”.

uname: FreeBSD 11.0-CURRENT
npm version

{ userid: ‘0.2.0’,
npm: ‘3.10.5’,
ares: ‘1.11.0’,
http_parser: ‘2.7.0’,
icu: ‘55.1’,
modules: ‘48’,
node: ‘6.2.2’,
openssl: ‘1.0.2h-freebsd’,
uv: ‘1.9.1’,
v8: ‘’,
zlib: ‘1.2.8’ }

tried run test/test-mineos.js:

/usr/local/games/minecraft/test # node test-mineos.js
throw err;
Error: Cannot find module ‘/usr/local/games/minecraft/node_modules/userid/build/Release/userid.node’
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/games/minecraft/node_modules/userid/lib/userid.js:2:15)
at Module._compile (module.js:541:32)
at Object.Module._extensions…js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)

tried i run npm install in the userid:
> /usr/local/games/minecraft/node_modules/userid # npm install
> npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
> npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
> npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> npm WARN lifecycle userid@0.2.0~install: cannot run in wd %s %s (wd=%s) userid@0.2.0 node-gyp rebuild /usr/local/games/minecraft/node_modules/userid
> userid@0.2.0 /usr/local/games/minecraft/node_modules/userid
> ±- mocha@2.5.3
> | ±- commander@2.3.0
> | ±- debug@2.2.0
> | | -- ms@0.7.1 > | +-- diff@1.4.0 > | +-- escape-string-regexp@1.0.2 > | +-- glob@3.2.11 > | | +-- inherits@2.0.1 > | | – minimatch@0.3.0
> | | ±- lru-cache@2.7.3
> | | -- sigmund@1.0.1 > | +-- growl@1.9.2 > | +-- jade@0.26.3 > | | +-- commander@0.6.1 > | | – mkdirp@0.3.0
> | ±- mkdirp@0.5.1
> | | -- minimist@0.0.8 > | +-- supports-color@1.2.0 > | – to-iso-string@0.0.2
> ±- nan@2.4.0
> -- should@7.1.1 > +-- should-equal@0.5.0 > +-- should-format@0.3.1 > – should-type@0.2.0
> npm WARN userid@0.2.0 license should be a valid SPDX license expression

Installing posix@4.0.2 didn’t help, also the authenticate-pam@1.0.2 didn’t getfartherther

The node 6.x api and the node 4.x could be quite different. 4.0 is the LTS (long-term support) and MineOS doesn’t use any features above and beyond this.

In other words, it could be node 6.x that cannot properly use the userid module, so if possible, try using 4.x instead and let’s see if we make any new progress.

install node4-4.4.7_4 and npm2-2.15.6, still dosen’t build userid.
I read other forum posts: posix isn’t building at my system… I try to get that working, as i think userid needs posix.

From the wiki

cd /usr/local/games/minecraft
echo “CXX=c++ npm install” | sh

Your executed commands aren’t equivalent to the instructions in the wiki.

i tried that, it just skips make:

gyp info spawn make
gyp info spawn args [ ‘V=1’, ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
make: Entering directory ‘/home/tobias/trynode/node_modules/posix/build’

FreeBSD 11

gyp info spawn gmake
gyp info spawn args [ ‘V=1’, ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
gyp info ok

when i try to build it manually:

/node_modules/posix/build # make
make: “/usr/local/games/minecraft/node_modules/posix/build/Makefile” line 17: Need an operator
make: “/usr/local/games/minecraft/node_modules/posix/build/Makefile” line 19: Need an operator

I’m having a hard time figuring out the problem without knowing both what you type and what the full output is.

sorry i’m not used to frorums.
here’s the full Console:

Here is the test-mineos log:

Is there anything else you want to look at?

I don’t know where you’re getting these lines…

The lines were:

cd /usr/local/games/minecraft
echo “CXX=c++ npm install” | sh

It’s fine that you try additional things to find out what works, but it isn’t clear to me that you’re trying the things I’m suggesting.

Here is the log:

Try running this script:

Download the .sh file, give it +x, and execute it. Search for any tests (separated by *******) that do not fail and report: COMMAND FAILED: node -e "require('posix')"

Try it with any combination of node/npm versions you prefer, whether it is node 6 or 5 or 4. When we find any test that succeeds: COMMAND OK: node -e "require('posix')", then we know we can get POSIX working, which will permit the webui to work.

If we can’t get POSIX working on your FreeBSD 11 system, you might consider trying FreeBSD 10.

Sorry, i was busy at work. I tried runnig the script with no success. Installd it on trueos 12 and have problems with userid again. This time with more errors messages: seams that the getgouplist function is in a diffrent lib.
I added #include <unistd.h> in the code, now it works :smiley:
I try to get a more feasible solution, but want to update you.