Closed ghost closed 7 months ago
Restored to 1.1.0 and the service worked fine. I updated to 1.1.22 from 1.1.0 and the service stops working. I'm going to use 1.1.0 until the issue is fixed. Happy to help if I can.
this seems to be related to the archiver
module which @Ylianst updated the other day,
not sure why its crashing, will have to look into it
How can I restore back? I can't run the server with node meshcentral command. Getting Permission denided errror
[Error: EACCES: permission denied, open '/home/quizhead/meshcentral/meshcentral-data/meshcentral-power.db'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/quizhead/meshcentral/meshcentral-data/meshcentral-power.db'
}
Node.js v20.11.1
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:530:35)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:337:12) {
code: 1,
killed: false,
signal: null,
cmd: '/usr/local/bin/node /home/quizhead/meshcentral/node_modules/meshcentral --launch 5789'
}
ERROR: MeshCentral failed with critical error, check mesherrors.txt. Restarting in 5 seconds...
The meshcentral.service is configured as needed
@quizhead the error is right there...
[Error: EACCES: permission denied, open '/home/quizhead/meshcentral/meshcentral-data/meshcentral-power.db']
the file meshcentral-power.db ISNT the same as whats inside your meshcentral.service OR whatever user you are using to RUN node with, so make sure they all match
@quizhead the error is right there...
[Error: EACCES: permission denied, open '/home/quizhead/meshcentral/meshcentral-data/meshcentral-power.db']
the file meshcentral-power.db ISNT the same as whats inside your meshcentral.service OR whatever user you are using to RUN node with, so make sure they all match It's configured as needed. Should I delete the Node_Modules folder and reinstall?
@quizhead please open an issue in the 'discussions' this thread is about the archiver bug
@meh324 just looked into this,
it appears minimatch
which is a dependency for archiver
now required node 16 or above,
you say you are using node 21 which might be the case when running node node_modules/meshcentral
can you check your startup scripts are using the correct node version?
You were correct, it says it's running 12.22.9.
How do I update that node that the services use?
I had the same error on Ubuntu 22.04 (using nodejs 12) and fixed it by installing nodejs version 20.
npm install -g n
n lts
node --version
I had to edit /etc/systemd/system/meshcentral.service changing /usr/bin/node to the new path /usr/local/bin/node for the new version of nodejs to be picked up.
systemctl stop meshcentral.service
nano /etc/systemd/system/meshcentral.service
systemctl daemon-reload
systemctl start meshcentral.service
systemctl status meshcentral.service
@ctrlaltca yes the min requirement for meshcentral was 12 but im guessing the archiver
now means we need to upgrade it now to 16 at least,
but really people should be using at least the LTS version (20)
That fixed it, thanks so much!
I had the same error on Ubuntu 22.04 (using nodejs 12) and fixed it by installing nodejs version 20.
npm install -g n n lts node --version
I had to edit /etc/systemd/system/meshcentral.service changing /usr/bin/node to the new path /usr/local/bin/node for the new version of nodejs to be picked up.
systemctl stop meshcentral.service nano /etc/systemd/system/meshcentral.service systemctl daemon-reload systemctl start meshcentral.service systemctl status meshcentral.service
Describe the bug Updated to 1.1.22 and the server did not come back up after updating. So I logged in to the server via ssh and stopped the service and ran node node_modules/meshcentral. With luck the server started back up, So I went to the server logs and it shows this error.
Also the server says it "Failed to load web certificate at: "https://server.com, host: "server.com". When I run the le command to check the ssl certificate it says its valid for 72 days. All agents came back online.
To Reproduce Steps to reproduce the behavior:
Server Software (please complete the following information):
Additional context Add any other context about the problem here.
Configuration File (removed sensitive information)
Service file