Aborted server startup; condition not met: exists

My bungeecord server has stopped working today.
The mineos.log says:
{"level":"error","message":"[bungeecord] Aborted server startup; condition not met: exists","timestamp":"2020-06-05T07:01:52.718Z"}

I can manually launch it, but MineOS can’t. Where should I be looking to fix this problem?
Here is the script I’m using to manually start bungeecord:

 #!/bin/bash
 cd /var/games/minecraft/servers/bungeecord;
 /usr/bin/screen -dmS mc-bungeecord /usr/bin/java -server -XX:MaxPermSize=1024M -Xms512M -Xmx1536M -jar BungeeCord.jar nogui

(Possibly related is that the WebUI has been crashing for a couple of weeks, within a minute or two of logging in.)

In MineOS, do you have a value entered in xms? if so, try removing it. Another member had a similar experience.
https://discourse.codeemo.com/t/unable-to-start-new-server-or-imported-ones/3838

I didn’t have an xms value for the bungeecord server. I’ve since tried adding one, but that didn’t help either.

Have you updated the commit recently? You may need to try resetting it if that doesn’t work. Update and reset scripts

Other than that, I’d try to import the bungeecord jar file.

Almost unanimously, this is due to usage of root to do actions that chowns files to root, which is then potentially inaccessible to the unprivileged user’s processes.

Can’t be for sure, but it’s still the most likely. Can you check ownership of those files to ensure consistent, recursive ownership?

The ownership of files in my bungeecord server directory look to be okay. They look the same as the other servers.https://pastebin.com/JbS9B6eu

For the time being I’ve made a work around by launching BungeeCord using a wrapper script and /etc/rc.local

My real concern is that MineOS is constantly crashing. I can login to the webui but it rarely populates the server menu with more than 1 or 2 of the 5 servers. If I try to refresh the page it throws me back to the login page.
Here is the mineos.log file https://pastebin.com/Q02HFGV4

I have also tried the Update and Reset scripts.

Do you use dynmap?

Are all the files for dynmap within the live directories of the servers itself?

Yes my dynmap files are stored within the live directories of the servers. I just symlinked from there to the Apache html directory to include them in our website.

I found that dynmaps number of files is often so great that it causes too much time to scan files and report back the directory.

Due to limitation in the npm modules I have found which can do live file detection and re-detection, I have not actually found any that replaces the current module in functionality. This module seems to be a bit unmaintained and while there is supposed to be a functionality that blacklists directories from being traversed (which is what is happening, delaying the webui reporting), it does not appear to function correctly.

At this moment, barring a replacement npm or fixed issue, it’s recommended to not have tens/hundreds of thousands of files in the live server directory, which will restore the webui responsiveness and accuracy.

I’ve now moved the dynmap web files out of the servers directories. (Which will make my backups easier too.)
I’ve also removed a few non server directories I had in the servers directory. (Homemade tools for backing up to Gdrive, and login notifications.)

Now the WebUI is staying up without crashing.
However, along the way I also deleted the /usr/games/minecraft directory and reinstalled it. Now the UI has the same Javascript errors as this post.

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.8.0/$injector/modulerr?p0=mineos&p1=Error%3A%20%5B%24injector%3Amodulerr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.8.0%2F%24injector%2Fmodulerr%3Fp0%3DngSanitize%26p1%3DTypeError%253A%2520q%2520is%2520not%2520a%2520function%250A%2520%2520%2520%2520at%2520k%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular-sanitize%252Fangular-sanitize.min.js%253A6%253A259)%250A%2520%2520%2520%2520at%2520new%2520%253Canonymous%253E%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular-sanitize%252Fangular-sanitize.min.js%253A12%253A3)%250A%2520%2520%2520%2520at%2520Object.instantiate%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A45%253A365)%250A%2520%2520%2520%2520at%2520c%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A42%253A266)%250A%2520%2520%2520%2520at%2520Object.provider%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A42%253A208)%250A%2520%2520%2520%2520at%2520d%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A43%253A148)%250A%2520%2520%2520%2520at%2520https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A43%253A269%250A%2520%2520%2520%2520at%2520r%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A8%253A76)%250A%2520%2520%2520%2520at%2520g%2520(https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A43%253A49)%250A%2520%2520%2520%2520at%2520https%253A%252F%252F10.0.0.120%253A8443%252Fangular%252Fangular.min.js%253A43%253A233%0A%20%20%20%20at%20https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A7%3A168%0A%20%20%20%20at%20https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A43%3A491%0A%20%20%20%20at%20r%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A8%3A76)%0A%20%20%20%20at%20g%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A43%3A49)%0A%20%20%20%20at%20https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A43%3A233%0A%20%20%20%20at%20r%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A8%3A76)%0A%20%20%20%20at%20g%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A43%3A49)%0A%20%20%20%20at%20fb%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A47%3A153)%0A%20%20%20%20at%20c%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A22%3A57)%0A%20%20%20%20at%20Wc%20(https%3A%2F%2F10.0.0.120%3A8443%2Fangular%2Fangular.min.js%3A22%3A370)
    at angular.js:99
    at angular.js:5127
    at r (angular.js:388)
    at g (angular.js:5087)
    at fb (angular.js:5004)
    at c (angular.js:1963)
    at Wc (angular.js:1984)
    at Ee (angular.js:1869)
    at HTMLDocument.<anonymous> (angular.js:36491)
    at j (jquery-2.1.4.min.js:2)
Grammarly.js:2 [DEFAULT]: WARN : Using DEFAULT root logger

There are also errors running reset_webui.sh

pault@minecraft:/usr/games/minecraft$ sudo ./reset_webui.sh
Script execution started on: Fri Jul  3 14:15:46 AEST 2020
Updating mineos-node repository...OK
Checking out master branch...Already on 'master'
OK
Resetting directory to official contents...OK
In file included from ../src/posix.cc:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
In file included from ../../nan/nan.h:54,
                 from ../src/posix.cc:1:
../src/posix.cc: At global scope:
/usr/include/nodejs/src/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_fun ’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  573 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/usr/include/nodejs/src/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
  607 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/posix.cc:709:1: note: in expansion of macro ‘NODE_MODULE’
  709 | NODE_MODULE(posix, init);
      | ^~~~~~~~~~~
In file included from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/posix.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&) ’:
/usr/include/nodejs/src/node_object_wrap.h:84:78:   required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
 9502 |                reinterpret_cast<Callback>(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61:   required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
In file included from ../src/userid.cc:11:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE GroupName(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/userid.cc:47:42: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   47 |     group = getgrgid(info[0]->Int32Value());
      |                                          ^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
                 from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
 2478 |   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
      |                                              ^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
  324 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gids(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/userid.cc:75:48: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
   75 |   String::Utf8Value utfname(info[0]->ToString());
      |                                                ^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
                 from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h:2892:28: note: declared here
 2892 |                   explicit Utf8Value(Local<v8::Value> obj));
      |                            ^~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
  324 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gid(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/userid.cc:118:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
  118 |     String::Utf8Value utfname(info[0]->ToString());
      |                                                  ^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
                 from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h:2892:28: note: declared here
 2892 |                   explicit Utf8Value(Local<v8::Value> obj));
      |                            ^~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
  324 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE UserName(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/userid.cc:137:41: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  137 |     user = getpwuid(info[0]->Int32Value());
      |                                         ^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
                 from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
 2478 |   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
      |                                              ^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
  324 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Uid(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/userid.cc:155:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
  155 |     String::Utf8Value utfname(info[0]->ToString());
      |                                                  ^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
                 from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h:2892:28: note: declared here
 2892 |                   explicit Utf8Value(Local<v8::Value> obj));
      |                            ^~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
  324 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
../src/userid.cc: At global scope:
/usr/include/nodejs/src/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  573 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/usr/include/nodejs/src/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
  607 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/userid.cc:174:1: note: in expansion of macro ‘NODE_MODULE’
  174 | NODE_MODULE(userid, Init);
      | ^~~~~~~~~~~
In file included from /usr/include/nodejs/src/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/userid.cc:11:
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&) ’:
/usr/include/nodejs/src/node_object_wrap.h:84:78:   required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
 9502 |                reinterpret_cast<Callback>(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61:   required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
OK
Setting node javascript files to executable...OK
Script execution ended on: Fri Jul  3 14:16:11 AEST 2020

What version of node are you using?

Also, is the same version of node being invoked via sudo as it would as if you were su - to root instead?

node --version

I seem to have v10.19.0 under all users.

pault@minecraft:~/mctools$ node --version
v10.19.0
pault@minecraft:~/mctools$ sudo node --version
[sudo] password for pault:
v10.19.0
pault@minecraft:~/mctools$ sudo -i
root@minecraft:~# node --version
v10.19.0