Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.26k stars 569 forks source link

RaspberryPi Server Down after 2 Years - I'm at the end #5461

Closed CSW2000 closed 1 year ago

CSW2000 commented 1 year ago

Hallo my RaspberryPi Server with Debian 10 are also down after Nightly Update to I Have restore a Backup SSD from 02_2023 it is running. I stopped Meshcentral2 an Update Node from 14 to 18.17.1 and also npm to 9.6.7 and i Installed yarn before node Update and now the meshcentral 2 update to 1.1.4 ... Server now down for ever after 2 Years

Please Help what can i do ?? Can everyone Help with config.json – or Reconfiguration the Server Please in German if possible, possibly also by email

The Last Hower I Have new installed the RASPI on Bookworm (Debian12) without Desktop But I have problems with copy my old config.json to it.

Here a Snippet from my Bash The > sudo node node_modules/meshcentral --port i became an error ERROR: MeshCentral failed with critical error, check mesherrors.txt. Restarting in 5 seconds... ERR: Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection ERR: Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection MeshCentral HTTP redirection server running on port 82. MeshCentral v1.1.14, WAN mode. ERR: /home/pi/node_modules/meshcentral/meshcentral.js:1501 if (obj.dbconfig.amtWsEventSecret == null) { obj.crypto.randomBytes(32, function (err, buf) { obj.dbconfig.amtWsEventSecret = buf.toString('hex'); obj.db.Set(obj.dbconfig); }); } ^ TypeError: Cannot create property 'amtWsEventSecret' on string '{"_id":"dbconfig","version":1,"amtWsEventSecret":"c35540a17c955ab8b69da7db3064f40a3d12036521190da92888a4393f1c8e1a"}' at RandomBytesJob. (/home/pi/node_modules/meshcentral/meshcentral.js:1501:137) at RandomBytesJob. (node:internal/crypto/random:114:5) at RandomBytesJob.onJobDone (node:internal/crypto/random:309:3) Node.js v18.17.1 Error: Command failed: /usr/bin/node /home/pi/node_modules/meshcentral --port --launch 4526 Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection /home/pi/node_modules/meshcentral/meshcentral.js:1501 if (obj.dbconfig.amtWsEventSecret == null) { obj.crypto.randomBytes(32, function (err, buf) { obj.dbconfig.amtWsEventSecret = buf.toString('hex'); obj.db.Set(obj.dbconfig); }); } ^ TypeError: Cannot create property 'amtWsEventSecret' on string '{"_id":"dbconfig","version":1,"amtWsEventSecret":"c35540a17c955ab8b69da7db3064f40a3d12036521190da92888a4393f1c8e1a"}' at RandomBytesJob. (/home/pi/node_modules/meshcentral/meshcentral.js:1501:137) at RandomBytesJob. (node:internal/crypto/random:114:5) at RandomBytesJob.onJobDone (node:internal/crypto/random:309:3) Node.js v18.17.1 at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:526:35) at maybeClose (node:internal/child_process:1091:16) at ChildProcess._handle.onexit (node:internal/child_process:302:5) { code: 1, killed: false, signal: null, cmd: '/usr/bin/node /home/pi/node_modules/meshcentral --port --launch 4526'

MyUncleSam commented 1 year ago

It seems like that I am having the very same problem. I do not know if this is helpful, but if I delete the database record "dbconfig" inside the "main" table (mariadb) - the meshcentral server boots up again. But unfortunatly is not allowing any new connections.

Any help would be appreciated

Update for my case: I tried old versions and it seems like the docker image1.1.13 is the last which is working.

CSW2000 commented 1 year ago

Hallo i have no docker ist a Raspi4 8GB with Debian 10 without Desktop , and MariaDB database for Meshcentral i have a second ssd clone Backup from 02/2023 an it is runnig now . I have deaktivate now the AutoUpdate in config.json. But wenn i installed a new node V18 and i restart i thats is running. and now i Update the Meshcentral2 Server than its down. .... What a f... :-) But i know What a Version of Meshcentral is now Running ? I wish I could query your version and then manually update to V1.1.3 then the IT world would be OK again.

si458 commented 1 year ago

It seems like that I am having the very same problem. I do not know if this is helpful, but if I delete the database record "dbconfig" inside the "main" table (mariadb) - the meshcentral server boots up again. But unfortunatly is not allowing any new connections.

Any help would be appreciated

Update for my case: I tried old versions and it seems like the docker image1.1.13 is the last which is working.

Thanks for the hint. I did change the package from mysql to mysql2 to support mysql 8 properly

It might be I've missed something with mysql2?

I'll have a look tomorrow when I'm in the office!

Please can u share u config too? also what version of mysql/mariadb u use? Also if the passwords are cache sha or old native password ?

bhinz commented 1 year ago

-------- 10/23/2023, 6:54:38 AM ---- 1.1.14 --------

/home/meshcentral/node_modules/mariadb/node_modules/lru-cache/dist/cjs/index.js:52 this.signal.onabort?.(reason); ^

SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/home/meshcentral/node_modules/mariadb/lib/lru-prepare-cache.js:5:13) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

si458 commented 1 year ago

@bhinz the error u have is inside the mariadb npm package which we haven't changed? What version of nodejs are u running?

CSW2000 commented 1 year ago

Hello my Tech data on Raspy 4 8GB are

Denian 10 Raspbian Linux 10 Linux 5.10.103-v7l+ auf armv7l MYSQL Database are Ver 15.1 Distrib 10.3.39-MariaDB Node Version v18.17.1 updated at yesterday NPM Verson 9.6.7 updated yesterday PHP 7.3.31-1~deb10u5

But how can i Show Meschcental2 Version on console and how can i manually Update my old version to 1.1.3 not 1.1.4! and how can i restore the the last mised customers from Backup

si458 commented 1 year ago

@CSW2000 go to the folder where meshcentral is install too, then do npm list and it will show u all the packages and versions installed

Also to roll back a version go to where u install meshcentral, npm remove meshcentral then npm install meshcentral@1.1.3

MyUncleSam commented 1 year ago

It seems like that I am having the very same problem. I do not know if this is helpful, but if I delete the database record "dbconfig" inside the "main" table (mariadb) - the meshcentral server boots up again. But unfortunatly is not allowing any new connections. Any help would be appreciated Update for my case: I tried old versions and it seems like the docker image1.1.13 is the last which is working.

Thanks for the hint. I did change the package from mysql to mysql2 to support mysql 8 properly

It might be I've missed something with mysql2?

I'll have a look tomorrow when I'm in the office!

Please can u share u config too? also what version of mysql/mariadb u use? Also if the passwords are cache sha or old native password ?

I am using:

{
  "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
  "settings": {
    "cert": "<REMOVED>",
    "WANonly": true,
    "_LANonly": true,
    "sessionKey": "<REMOVED>",
    "port": 8080,
    "aliasPort": 443,
    "redirPort": 8081,
    "_redirAliasPort": 80,
    "AgentPong": 300,
    "TLSOffload": "127.0.0.1,<REMOVED>,::1",
    "SelfUpdate": false,
    "AllowFraming": "false",
    "WebRTC": "false",
    "TrustedProxy": "<REMOVED>",
    "CookieIpCheck": true,
    "AllowHighQualityDesktop": true,
    "WsCompression": true,
    "AgentWsCompression": true,
    "Minify": true,
    "Compression": true,
    "_AutoBackup": {
      "backupPath": "/opt/meshcentral/meshcentral-backups",
      "backupInvervalHours": "24",
      "keepLastDaysBackup": "60",
      "zippassword": "<REMOVED>"
    },
    "mySQL": {
      "host": "<REMOVED>",
      "user": "<REMOVED>",
      "port": 3306,
      "password": "<REMOVED>",
      "database": "<REMOVED>"
    },
    "authLog": "/opt/meshcentral/meshcentral-data/auth.log",
    "maxInvalidLogin": {
      "_exclude": "<REMOVED>",
      "time": 5,
      "count": 10,
      "coolofftime": 60
    },
    "crowdsec": {
      "url": "http://<REMOVED>:8080",
      "apikey": "<REMOVED>",
      "fallbackremediation": "captcha"
    }
  },
  "domains": {
    "": {
      "title": "<REMOVED>",
      "title2": "<REMOVED>",
      "_minify": true,
      "NewAccounts": "false",
      "_userNameIsEmail": true,
      "certUrl": "https://<REMOVED>:443",
      "passwordRequirements": {
        "min": 32,
        "max": 512,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "banCommonPasswords": true
      }
    }
  },
    "_letsencrypt": {
      "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before>",
      "_email": "myemail@mydomain.com",
      "_names": "myserver.mydomain.com",
      "production": false
  },
  "smtp": {
    "host": "<REMOVED>",
    "port": 465,
    "from": "n<REMOVED>",
    "user": "<REMOVED>",
    "pass": "<REMOVED>",
    "tls": true
  }
}
CSW2000 commented 1 year ago

pi@meshcentral2:~ $ npm list from Backup System - The Damage System are commin soon i need a while :-) /home/pi ├── @yetzt/binary-search-tree@0.2.6 extraneous ├── @yetzt/nedb@1.8.0 extraneous ├── accepts@1.3.7 extraneous ├── archiver-utils@2.1.0 extraneous ├── archiver@4.0.2 extraneous ├── array-flatten@1.1.1 extraneous ├── asap@2.0.6 extraneous ├── async-limiter@1.0.1 extraneous ├── async@3.2.2 extraneous ├── balanced-match@1.0.2 extraneous ├── base64-js@1.5.1 extraneous ├── bignumber.js@9.0.2 extraneous ├── bl@4.1.0 extraneous ├── body-parser@1.19.1 extraneous ├── brace-expansion@1.1.11 extraneous ├── buffer-crc32@0.2.13 extraneous ├── buffer@5.7.1 extraneous ├── bytes@3.1.1 extraneous ├── call-bind@1.0.2 extraneous ├── cbor@5.2.0 extraneous ├── compress-commons@3.0.0 extraneous ├── compressible@2.0.18 extraneous ├── compression@1.7.4 extraneous ├── concat-map@0.0.1 extraneous ├── content-disposition@0.5.4 extraneous ├── content-type@1.0.4 extraneous ├── cookie-session@1.4.0 extraneous ├── cookie-signature@1.0.6 extraneous ├── cookie@0.4.1 extraneous ├── cookies@0.8.0 extraneous ├── core-util-is@1.0.3 extraneous ├── crc-32@1.2.2 extraneous ├── crc@3.8.0 extraneous ├── crc32-stream@3.0.1 extraneous ├── debug@2.6.9 extraneous ├── define-properties@1.1.3 extraneous ├── depd@1.1.2 extraneous ├── destroy@1.0.4 extraneous ├── ee-first@1.1.1 extraneous ├── encodeurl@1.0.2 extraneous ├── end-of-stream@1.4.4 extraneous ├── escape-html@1.0.3 extraneous ├── etag@1.8.1 extraneous ├── express-handlebars@3.1.0 extraneous ├── express-ws@4.0.0 extraneous ├── express@4.17.2 extraneous ├── fd-slicer@1.1.0 extraneous ├── finalhandler@1.1.2 extraneous ├── forwarded@0.2.0 extraneous ├── fresh@0.5.2 extraneous ├── fs-constants@1.0.0 extraneous ├── fs.realpath@1.0.0 extraneous ├── function-bind@1.1.1 extraneous ├── get-intrinsic@1.1.1 extraneous ├── glob@7.2.0 extraneous ├── graceful-fs@4.2.8 extraneous ├── handlebars@4.7.7 extraneous ├── has-symbols@1.0.2 extraneous ├── has@1.0.3 extraneous ├── http-errors@1.8.1 extraneous ├── iconv-lite@0.4.24 extraneous ├── ieee754@1.2.1 extraneous ├── immediate@3.0.6 extraneous ├── inflight@1.0.6 extraneous ├── inherits@2.0.4 extraneous ├── ipaddr.js@1.9.1 extraneous ├── ipcheck@0.1.0 extraneous ├── isarray@1.0.0 extraneous ├── keygrip@1.1.0 extraneous ├── lazystream@1.0.1 extraneous ├── lie@3.1.1 extraneous ├── localforage@1.10.0 extraneous ├── lodash.defaults@4.2.0 extraneous ├── lodash.difference@4.5.0 extraneous ├── lodash.flatten@4.4.0 extraneous ├── lodash.isplainobject@4.0.6 extraneous ├── lodash.union@4.6.0 extraneous ├── media-typer@0.3.0 extraneous ├── merge-descriptors@1.0.1 extraneous ├── meshcentral@1.1.4 extraneous but it is not 1.14 and I don't dare press update either ├── methods@1.1.2 extraneous ├── mime-db@1.51.0 extraneous ├── mime-types@2.1.34 extraneous ├── mime@1.6.0 extraneous ├── minimatch@3.0.4 extraneous ├── minimist@1.2.5 extraneous ├── mkdirp@1.0.4 extraneous ├── ms@2.0.0 extraneous ├── multiparty@4.2.2 extraneous ├── mysql@2.18.1 extraneous ├── negotiator@0.6.2 extraneous ├── neo-async@2.6.2 extraneous ├── node-forge@0.10.0 extraneous ├── nofilter@1.0.4 extraneous ├── normalize-path@3.0.0 extraneous ├── object-keys@1.1.1 extraneous ├── object.assign@4.1.2 extraneous ├── on-finished@2.3.0 extraneous ├── on-headers@1.0.2 extraneous ├── once@1.4.0 extraneous ├── otplib@10.2.3 extraneous ├── parseurl@1.3.3 extraneous ├── path-is-absolute@1.0.1 extraneous ├── path-to-regexp@0.1.7 extraneous ├── pend@1.2.0 extraneous ├── process-nextick-args@2.0.1 extraneous ├── promise@8.1.0 extraneous ├── proxy-addr@2.0.7 extraneous ├── qs@6.9.6 extraneous ├── random-bytes@1.0.0 extraneous ├── range-parser@1.2.1 extraneous ├── raw-body@2.4.2 extraneous ├── readable-stream@3.6.0 extraneous ├── readdir-glob@1.1.1 extraneous ├── safe-buffer@5.1.2 extraneous ├── safer-buffer@2.1.2 extraneous ├── send@0.17.2 extraneous ├── serve-static@1.14.2 extraneous ├── setprototypeof@1.2.0 extraneous ├── source-map@0.6.1 extraneous ├── sqlstring@2.3.1 extraneous ├── statuses@1.5.0 extraneous ├── string_decoder@1.1.1 extraneous ├── tar-stream@2.2.0 extraneous ├── thirty-two@1.0.2 extraneous ├── toidentifier@1.0.1 extraneous ├── tsscmp@1.0.6 extraneous ├── type-is@1.6.18 extraneous ├── uglify-js@3.14.5 extraneous ├── uid-safe@2.1.5 extraneous ├── underscore@1.13.2 extraneous ├── unpipe@1.0.0 extraneous ├── util-deprecate@1.0.2 extraneous ├── utils-merge@1.0.1 extraneous ├── vary@1.1.2 extraneous ├── wordwrap@1.0.0 extraneous ├── wrappy@1.0.2 extraneous ├── ws@5.2.3 extraneous ├── yauzl@2.10.0 extraneous └── zip-stream@3.0.1 extraneous

CSW2000 commented 1 year ago

On pruduktiv damage System npm list after reinstall V1.13 are verry short ? But after the update page still not accessible node Version ist here 16.20.2 npm Version 8.19.4

Wenn i manually start Meshcentral i became this error Message pi@meshcentral2:~ $ sudo systemctl stop meshcentral.service pi@meshcentral2:~ $ sudo nodejs node_module/meshcentral node:internal/modules/cjs/loader:1031 throw err; ^

Error: Cannot find module '/home/pi/node_module/meshcentral' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15) at Function.Module._load (node:internal/modules/cjs/loader:873:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } pi@meshcentral2:~ $

See the systemctl(1) man page for details. pi@meshcentral2:~/meshcentral-data $ npm list pi@ /home/pi ├── denque@2.1.0 extraneous ├── generate-function@2.3.1 extraneous ├── is-property@1.0.2 extraneous ├── long@5.2.3 extraneous ├── lru-cache@8.0.5 extraneous ├── meshcentral@1.1.14 ├── mysql2@3.6.2 extraneous ├── named-placeholders@1.1.3 extraneous ├── otplib@10.2.3 extraneous ├── seq-queue@0.0.5 extraneous ├── sqlstring@2.3.3 extraneous └── thirty-two@1.0.2 extraneous

pi@meshcentral2:~/meshcentral-data $

si458 commented 1 year ago

@CSW2000 dont worry about the update page for now (i think the was a bug which @Ylianst fixed recently) you just need to make sure u can LOGIN and get the machine lists

the npm list output should look something like ur second one, the first one is WAY TOO BIG!?

you folder layout and npm should also look similar to the following

simon@meshcentral:~/meshcentral$ ls -la
total 356
drwxrwxr-x   6 simon simon   4096 Oct 18 16:08 .
drwxr-x---  11 simon simon   4096 Oct 19 20:06 ..
-rw-rw-r--   1 simon simon 196354 Oct 23 12:03 authlog.log
drwxr-xr-x   2 simon simon   4096 Oct 23 06:53 meshcentral-backups
drwxrwxrwx   5 simon simon   4096 Oct 23 10:53 meshcentral-data
drwxrwxr-x   3 simon simon   4096 Aug 21  2022 meshcentral-files
drwxrwxr-x 156 simon simon  12288 Oct 21 22:11 node_modules
-rw-rw-r--   1 simon simon 125954 Oct 21 22:12 package-lock.json
-rw-rw-r--   1 simon simon    222 Oct 21 22:12 package.json
simon@meshcentral:~/meshcentral$ npm list
meshcentral@ /home/simon/meshcentral
├── acme-client@4.2.5
├── archiver@5.3.2
├── meshcentral@1.1.14
├── node-pushover@1.0.0
├── otplib@10.2.3
├── ssh2@1.14.0
└── ua-parser-js@1.0.36

im guessing u have just installed meshcentral into the root of your pi folder? /home/pi/node_modules/meshcentral should exist? you should run all command from /home/pi in your case rather than inside any subfolders like meshcentral-data

also i noticed u ran systemstl stop meshcentral what is the contents of file /etc/systemd/system/meshcentral.service ? also try running sudo lsof -Pni | grep LISTEN and checking what is LISTENING incase meshcentral is already running in the background

CSW2000 commented 1 year ago

It is intended that Mashentral is in the /home/pi directory. The Raspi has no other task. I still have two of these to tinker with.

Here my Data on Damage system pi@meshcentral2:~ $ ls -la insgesamt 16736 drwxr-xr-x 16 pi pi 4096 Okt 23 13:33 . drwxr-xr-x 3 root root 4096 Dez 2 2021 .. drwxrwxrwx 6 root root 4096 Jun 9 11:34 agents -rw------- 1 pi pi 24899 Okt 23 12:51 .bash_history -rw-r--r-- 1 pi pi 220 Dez 2 2021 .bash_logout -rw-r--r-- 1 pi pi 3523 Dez 2 2021 .bashrc drwx------ 3 pi pi 4096 Dez 18 2021 .cache drwx------ 4 pi pi 4096 Dez 18 2021 .config -rw-r--r-- 1 pi pi 112522 Dez 17 2021 CSWFW2.ico drwx------ 3 pi pi 4096 Okt 22 12:48 .gnupg drwx------ 3 pi pi 4096 Dez 18 2021 .local drwxr-xr-x 2 pi pi 4096 Dez 10 2022 meshcentral-backup drwxr-xr-x 2 pi pi 4096 Okt 21 01:50 meshcentral-backups drwxr-xr-x 3 pi pi 4096 Okt 23 12:21 meshcentral-data drwxr-xr-x 3 pi pi 4096 Dez 21 2021 meshcentral-files drwxr-xr-x 150 pi pi 12288 Okt 23 12:22 node_modules drwxr-xr-x 5 pi pi 4096 Okt 23 12:19 .npm -rw-r--r-- 1 root root 56 Okt 23 12:20 package.json -rw-r--r-- 1 pi pi 113539 Okt 23 12:20 package-lock.json -rw-r--r-- 1 pi pi 807 Dez 2 2021 .profile -rw-r--r-- 1 root root 16777216 Jan 22 2022 raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages drwxr-xr-x 2 pi pi 4096 Mär 29 2023 remmina drwxr-xr-x 6 root root 4096 Jan 21 2022 save_mesh -rw-r--r-- 1 pi pi 66 Dez 25 2021 .selected_editor drwxr-xr-x 2 pi pi 4096 Feb 3 2023 .tmp -rw------- 1 pi pi 116 Okt 23 13:33 .Xauthority pi@meshcentral2:~ $

pi@meshcentral2:~ $ npm list pi@ /home/pi ├── denque@2.1.0 extraneous ├── generate-function@2.3.1 extraneous ├── is-property@1.0.2 extraneous ├── long@5.2.3 extraneous ├── lru-cache@8.0.5 extraneous ├── meshcentral@1.1.14 ├── mysql2@3.6.2 extraneous ├── named-placeholders@1.1.3 extraneous ├── otplib@10.2.3 extraneous ├── seq-queue@0.0.5 extraneous ├── sqlstring@2.3.3 extraneous └── thirty-two@1.0.2 extraneous

pi@meshcentral2:~/node_modules/meshcentral $ ls -la insgesamt 3672 drwxr-xr-x 10 pi pi 4096 Okt 23 12:22 . drwxr-xr-x 150 pi pi 12288 Okt 23 12:22 .. drwxr-xr-x 6 pi pi 4096 Okt 23 12:22 agents drwxr-xr-x 2 pi pi 4096 Okt 23 12:22 amt -rw-r--r-- 1 pi pi 12530 Okt 23 12:22 amtevents.js -rw-r--r-- 1 pi pi 4638 Okt 23 12:22 amt-ider.js -rw-r--r-- 1 pi pi 207675 Okt 23 12:22 amtmanager.js -rw-r--r-- 1 pi pi 47695 Okt 23 12:22 amtprovisioningserver.js -rw-r--r-- 1 pi pi 25643 Okt 23 12:22 amtscanner.js -rw-r--r-- 1 pi pi 26672 Okt 23 12:22 amtscript.js -rw-r--r-- 1 pi pi 136299 Okt 23 12:22 apprelays.js -rw-r--r-- 1 pi pi 144728 Okt 23 12:22 authenticode.js drwxr-xr-x 2 pi pi 4096 Okt 23 12:22 bin -rw-r--r-- 1 pi pi 87070 Okt 23 12:22 certoperations.js -rw-r--r-- 1 pi pi 22685 Okt 23 12:22 common.js -rw-r--r-- 1 pi pi 7653 Okt 23 12:22 crowdsec.js -rw-r--r-- 1 pi pi 253891 Okt 23 12:22 db.js drwxr-xr-x 3 pi pi 4096 Okt 23 12:22 emails -rw-r--r-- 1 pi pi 16135 Okt 23 12:22 exeHandler.js -rw-r--r-- 1 pi pi 17200 Okt 23 12:22 firebase.js -rw-r--r-- 1 pi pi 24281 Okt 23 12:22 interceptor.js -rw-r--r-- 1 pi pi 13176 Okt 23 12:22 letsencrypt.js -rw-r--r-- 1 pi pi 11553 Okt 23 12:22 LICENSE -rw-r--r-- 1 pi pi 16255 Okt 23 12:22 mcrec.js -rw-r--r-- 1 pi pi 1702 Okt 23 12:22 meshaccelerator.js -rw-r--r-- 1 pi pi 142132 Okt 23 12:22 meshagent.js -rw-r--r-- 1 pi pi 6280 Okt 23 12:22 meshbot.js -rw-r--r-- 1 pi pi 308835 Okt 23 12:22 meshcentral.js -rw-r--r-- 1 pi pi 185663 Okt 23 12:22 meshctrl.js -rw-r--r-- 1 pi pi 83290 Okt 23 12:22 meshdesktopmultiplex.js -rw-r--r-- 1 pi pi 17294 Okt 23 12:22 meshdevicefile.js -rw-r--r-- 1 pi pi 55655 Okt 23 12:22 meshipkvm.js -rw-r--r-- 1 pi pi 43989 Okt 23 12:22 meshmail.js -rw-r--r-- 1 pi pi 37211 Okt 23 12:22 meshmessaging.js -rw-r--r-- 1 pi pi 87953 Okt 23 12:22 meshrelay.js -rw-r--r-- 1 pi pi 14984 Okt 23 12:22 meshscanner.js -rw-r--r-- 1 pi pi 11580 Okt 23 12:22 meshsms.js -rw-r--r-- 1 pi pi 562948 Okt 23 12:22 meshuser.js -rw-r--r-- 1 pi pi 96277 Okt 23 12:22 mpsserver.js -rw-r--r-- 1 pi pi 8917 Okt 23 12:22 mqttbroker.js -rw-r--r-- 1 pi pi 43308 Okt 23 12:22 multiserver.js -rw-r--r-- 1 pi pi 1500 Okt 23 12:22 package.json -rw-r--r-- 1 pi pi 2240 Okt 23 12:22 pass.js -rw-r--r-- 1 pi pi 40794 Okt 23 12:22 pkcs7-modified.js -rw-r--r-- 1 pi pi 28607 Okt 23 12:22 pluginHandler.js drwxr-xr-x 9 pi pi 4096 Okt 23 12:22 public drwxr-xr-x 6 pi pi 4096 Okt 23 12:22 rdp -rw-r--r-- 1 pi pi 4375 Okt 23 12:22 readme.md -rw-r--r-- 1 pi pi 8201 Okt 23 12:22 redirserver.js -rw-r--r-- 1 pi pi 22530 Okt 23 12:22 sample-config-advanced.json -rw-r--r-- 1 pi pi 1163 Okt 23 12:22 sample-config.json -rw-r--r-- 1 pi pi 27433 Okt 23 12:22 swarmserver.js -rw-r--r-- 1 pi pi 396 Okt 23 12:22 taskmanager.js drwxr-xr-x 2 pi pi 4096 Okt 23 12:22 translate drwxr-xr-x 3 pi pi 4096 Okt 23 12:22 views -rw-r--r-- 1 pi pi 12709 Okt 23 12:22 webauthn.js -rw-r--r-- 1 pi pi 20794 Okt 23 12:22 webrelayserver.js -rw-r--r-- 1 pi pi 646117 Okt 23 12:22 webserver.js -rw-r--r-- 1 pi pi 4669 Okt 23 12:22 winservice.js pi@meshcentral2:~/node_modules/meshcentral $

pi@meshcentral2:~/meshcentral-data $ ls -la insgesamt 5792 drwxr-xr-x 3 pi pi 4096 Okt 23 12:21 . drwxr-xr-x 16 pi pi 4096 Okt 23 13:33 .. -rw-r--r-- 1 pi pi 2498 Dez 21 2021 agentserver-cert-private.key -rw-r--r-- 1 pi pi 1538 Dez 21 2021 agentserver-cert-public.crt -rw-r--r-- 1 pi pi 1706 Mai 29 2022 codesign-cert-private.key -rw-r--r-- 1 pi pi 1368 Mai 29 2022 codesign-cert-public.crt -rw-r--r-- 1 pi pi 3580 Okt 22 13:38 config.json -rw-r--r-- 1 pi pi 3433 Mär 29 2022 config.json_2022_03 -rw-r--r-- 1 pi pi 1459 Jan 3 2022 config.json:mariadb -rw-r--r-- 1 pi pi 1374 Dez 22 2021 config.json.nodb -rw-r--r-- 1 pi pi 2095 Jan 13 2022 config.json.save -rw-r--r-- 1 pi pi 3557 Nov 23 2022 config.json.save.1 -rw-rw-rw- 1 pi pi 112522 Dez 17 2021 cswfw22.ico -rw-r--r-- 1 pi pi 34128 Dez 12 2021 cswlogin.png -rw-rw-r-- 1 pi pi 3348 Jan 13 2022 cswmessenger.png -rw-rw-r-- 1 pi pi 49813 Feb 14 2022 csw_msc.png -rw-r--r-- 1 pi pi 37290 Jan 8 2021 csw.png -rw-r--r-- 1 pi pi 1679 Dez 4 2022 .crt -rw-rw-rw- 1 pi pi 1678 Dez 3 2022 .key -rw-r--r-- 1 pi pi 5560574 Okt 23 13:41 mesherrors.txt -rw-rw-rw- 1 pi pi 3088 Jan 13 2022 messenger.png -rw-r--r-- 1 pi pi 1706 Dez 13 2022 mpsserver-cert-private.key -rw-r--r-- 1 pi pi 1706 Dez 22 2021 mpsserver-cert-private.key-old -rw-r--r-- 1 pi pi 1702 Dez 10 2022 mpsserver-cert-private.key-old2 -rw-r--r-- 1 pi pi 1484 Dez 13 2022 mpsserver-cert-public.crt -rw-r--r-- 1 pi pi 1484 Dez 22 2021 mpsserver-cert-public.crt-old -rw-r--r-- 1 pi pi 1488 Dez 10 2022 mpsserver-cert-public.crt-old2 -rw-r--r-- 1 pi pi 2494 Dez 21 2021 root-cert-private.key -rw-r--r-- 1 pi pi 1566 Dez 21 2021 root-cert-public.crt -rw-r--r-- 1 pi pi 94 Okt 23 13:41 serverstate.txt drwxr-xr-x 2 pi pi 4096 Apr 15 2023 signedagents -rw-r--r-- 1 pi pi 1702 Dez 11 2022 webserver-cert-private.key -rw-r--r-- 1 pi pi 1484 Dez 11 2022 webserver-cert-public.crt

pi@meshcentral2:~ $ sudo systemstl stop meshcentral sudo: systemstl: Befehl nicht gefunden pi@meshcentral2:~ $ cd /etc/systemd/system/meshcentral.service -bash: cd: /etc/systemd/system/meshcentral.service: Ist kein Verzeichnis pi@meshcentral2:~ $

for Stop server i use allways - sudo systemctl stop meshcentral.service

pi@meshcentral2:~ $ sudo lsof -Pni | grep LISTEN sshd 574 root 3u IPv4 18552 0t0 TCP :22 (LISTEN) sshd 574 root 4u IPv6 18554 0t0 TCP :22 (LISTEN) nginx 577 root 6u IPv4 17078 0t0 TCP :8080 (LISTEN) nginx 577 root 7u IPv6 17079 0t0 TCP :8080 (LISTEN) nginx 577 root 8u IPv4 17080 0t0 TCP :81 (LISTEN) nginx 578 www-data 6u IPv4 17078 0t0 TCP :8080 (LISTEN) nginx 578 www-data 7u IPv6 17079 0t0 TCP :8080 (LISTEN) nginx 578 www-data 8u IPv4 17080 0t0 TCP :81 (LISTEN) - IS PHPMYADMIN nginx 579 www-data 6u IPv4 17078 0t0 TCP :8080 (LISTEN) is a Second Webserver not used is empty nginx 579 www-data 7u IPv6 17079 0t0 TCP :8080 (LISTEN) nginx 579 www-data 8u IPv4 17080 0t0 TCP :81 (LISTEN) nginx 580 www-data 6u IPv4 17078 0t0 TCP :8080 (LISTEN) nginx 580 www-data 7u IPv6 17079 0t0 TCP :8080 (LISTEN) nginx 580 www-data 8u IPv4 17080 0t0 TCP :81 (LISTEN) nginx 581 www-data 6u IPv4 17078 0t0 TCP :8080 (LISTEN) nginx 581 www-data 7u IPv6 17079 0t0 TCP :8080 (LISTEN) nginx 581 www-data 8u IPv4 17080 0t0 TCP :81 (LISTEN) mysqld 631 mysql 19u IPv6 17665 0t0 TCP :3306 (LISTEN) smbd 634 root 33u IPv6 17405 0t0 TCP :445 (LISTEN) smbd 634 root 34u IPv6 17406 0t0 TCP :139 (LISTEN) smbd 634 root 35u IPv4 17407 0t0 TCP :445 (LISTEN) smbd 634 root 36u IPv4 17408 0t0 TCP :139 (LISTEN) miniserv. 733 root 5u IPv4 20506 0t0 TCP :10000 (LISTEN) is a WEBMIN Tool sshd 864 pi 10u IPv6 20688 0t0 TCP [::1]:6010 (LISTEN) sshd 864 pi 11u IPv4 20689 0t0 TCP 127.0.0.1:6010 (LISTEN) node 2041 pi 32u IPv6 25405 0t0 TCP :80 (LISTEN)

si458 commented 1 year ago

ok so it thinks node is already running node 2041 pi 32u IPv6 25405 0t0 TCP *:80 (LISTEN) what does sudo ps aux | grep 2041 return? we need to stop anything running on port 80 to begin with (you can use `kill -9 2041) what guide did you follow to install meshcentral to begin with?

CSW2000 commented 1 year ago

pi@meshcentral2:~ $ node -v v16.20.2 pi@meshcentral2:~ $ npm -v 8.19.4 pi@meshcentral2:~ $ pi@meshcentral2:~ $ sudo ps aux | grep 2041 pi 4150 0.0 0.0 7356 540 pts/0 S+ 14:08 0:00 grep --color=auto 2041 pi@meshcentral2:~ $

si458 commented 1 year ago

@bhinz your issue is because you are probabily using an old version of node (please follow here https://github.com/Ylianst/MeshCentral/issues/5463) you need to use a latest version of node LTS (18) for any mysql/mariadb databases

si458 commented 1 year ago

pi@meshcentral2:~ $ node -v v16.20.2 pi@meshcentral2:~ $ npm -v 8.19.4 pi@meshcentral2:~ $ pi@meshcentral2:~ $ sudo ps aux | grep 2041 pi 4150 0.0 0.0 7356 540 pts/0 S+ 14:08 0:00 grep --color=auto 2041 pi@meshcentral2:~ $

weird? it just showed node running on port 80? whats the output of sudo systemctl status meshcentral