[SOLVED] Fresh MineOS install on FreeNAS jail fails to start


#1

I’m running FreeNAS 9.10.2-U4 (FreeBSD 10.3). I created a fresh jail and used the FreeBSD install directions with a minor modification to properly mount linprocfs from the FreeNAS host. However, when MineOS starts up it immediately fails with this error in mineos.log:

{“level”:“info”,“message”:“Starting up server, using commit: f9b1207 added dockerfile\n”,“timestamp”:“2017-06-10T14:41:56.469Z”}
{“date”:“Sat Jun 10 2017 10:41:57 GMT-0400 (EDT)”,“process”:{“pid”:70985,“uid”:0,“gid”:0,“cwd”:"/usr/local/games/minecraft",“execPath”:"/usr/local/bin/node",“version”:“v7.10.0”,“argv”:["/usr/local/bin/node","/usr/local/games/minecraft/webui.js"],“memoryUsage”:{“rss”:55263232,“heapTotal”:33484800,“heapUsed”:13766104,“external”:356679}},“os”:{“loadavg”:[0.32470703125,0.263671875,0.189453125],“uptime”:1119581},“trace”:[{“column”:29,“file”:"/usr/local/games/minecraft/server.js",“function”:null,“line”:96,“method”:null,“native”:false},{“column”:16,“file”:"/usr/local/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:52,“method”:null,“native”:false},{“column”:30,“file”:"/usr/local/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:1209,“method”:null,“native”:false},{“column”:20,“file”:"/usr/local/games/minecraft/node_modules/procfs-stats/index.js",“function”:“ReadFileContext.callback”,“line”:215,“method”:“callback”,“native”:false},{“column”:13,“file”:“fs.js”,“function”:“FSReqWrap.readFileAfterOpen [as oncomplete]”,“line”:359,“method”:“readFileAfterOpen [as oncomplete]”,“native”:false}],“stack”:[“TypeError: Cannot read property ‘MemAvailable’ of undefined”," at /usr/local/games/minecraft/server.js:96:29"," at /usr/local/games/minecraft/node_modules/async/lib/async.js:52:16"," at /usr/local/games/minecraft/node_modules/async/lib/async.js:1209:30"," at ReadFileContext.callback (/usr/local/games/minecraft/node_modules/procfs-stats/index.js:215:20)"," at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)"],“level”:“error”,“message”:“uncaughtException: Cannot read property ‘MemAvailable’ of undefined”,“timestamp”:“2017-06-10T14:41:57.466Z”}

Any tips on how to troubleshoot or fix this? Thanks.


#2

Jurgen Saegart on the FreeNAS forum was able to independently reproduce this problem. It’s almost certainly a bug introduced by commit 878043b “changed memfree to memavailable in webui”. I reverted my git repo to commit cc4dac5 “made masking toggling easier” and rebuilt, and now MineOS starts just fine.


#3

It’s hugely disappointing that the procfs-stats module does not unilaterally work across all distributions. I’ll be making a commit soon to detect the failure in the property MemAvailable and to fallback gracefully in response.


#4

Cool, let me know when it’s committed and I’ll switch back to HEAD to verify the fix.


#5

I made the commit today–it should check if procfs-stats provides the value, and falls back to the original os.memfree. For your case, it should return to exactly the behavior prior to the break.


#6

Sorry but no banana. The latest version crashes like this:

{“date”:“Mon Jun 12 2017 20:49:22 GMT-0400 (EDT)”,“process”:{“pid”:58055,“uid”:0,“gid”:0,“cwd”:"/usr/local/games/minecraft",“execPath”:"
/usr/local/bin/node",“version”:“v7.10.0”,“argv”:["/usr/local/bin/node","/usr/local/games/minecraft/webui.js"],“memoryUsage”:{“rss”:69496
832,“heapTotal”:37679104,“heapUsed”:22604744,“external”:292070}},“os”:{“loadavg”:[0.44482421875,0.21923828125,0.181640625],“uptime”:1042
32},“trace”:[{“column”:69,“file”:"/usr/local/games/minecraft/server.js",“function”:null,“line”:96,“method”:null,“native”:false},{“column
“:16,“file”:”/usr/local/games/minecraft/node_modules/async/lib/async.js”,“function”:null,“line”:52,“method”:null,“native”:false},{“colum
n”:30,“file”:"/usr/local/games/minecraft/node_modules/async/lib/async.js",“function”:null,“line”:1209,“method”:null,“native”:false},{“co
lumn”:20,“file”:"/usr/local/games/minecraft/node_modules/procfs-stats/index.js",“function”:“ReadFileContext.callback”,“line”:215,“method
“:“callback”,“native”:false},{“column”:13,“file”:“fs.js”,“function”:“FSReqWrap.readFileAfterOpen [as oncomplete]”,“line”:359,“method”:“r
eadFileAfterOpen [as oncomplete]”,“native”:false}],“stack”:[“TypeError: os.memfree is not a function”,” at /usr/local/games/minecraft
/server.js:96:69”," at /usr/local/games/minecraft/node_modules/async/lib/async.js:52:16"," at /usr/local/games/minecraft/node_modu
les/async/lib/async.js:1209:30"," at ReadFileContext.callback (/usr/local/games/minecraft/node_modules/procfs-stats/index.js:215:20)"
," at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)"],“level”:“error”,“message”:“uncaughtException: os.memfree is not a
function”,“timestamp”:“2017-06-13T00:49:22.258Z”}


#7

I am so hideously embarrassed to have made the typo of os.memfree() vs os.freemem().

Embarrassed mostly because that’s evidence of a lack of thorough reproducing and error then testing. I just have no words for this recklessness :frowning:

That said, the latest commit should resolve this. Still couldn’t test it (but I sure as hell hope I shouldn’t need to…I don’t really want to have to wait till I return back from my trip to solve such an easy issue). If you would, go ahead and try it again.

Soz.


#8

No worries, it happens. Looks like mineos-node HEAD is now working again, hooray!


#9

Trying to understand the issue.

I just had to reinstall FreeNAS after a slight HTTPS certificate misshap locking me out of my system and when I reinstalled MineOS it wouldn’t start the server.

Tinkering around I realized a new Minecraft version 1.12 was made public in the meantime causing my grief while the prior one 1.11.2 launches just fine.

I assume this conversation refers to this issue or am I looking at an entirely different problem?


#10

That’s likely a different issue - Minecraft 1.12 requires Java 8, so you do need to have openjdk8-jre installed. If you are still having problems I would post a different thread. If you’ve updated to the latest MineOS-node release, this problem is gone. It was only present in the git repo for the last 2 weeks or so.


#11

Should installing the latest MineOS-node also fix it for FreeNAS 9.10? ( not yet on 9.10.2, in case it matters )
Like I said, I had to reinstall FreeNAS and with it MineOS so I’d assume it downloaded the latest version of it too.