Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No device Show on meshcentral #6340

Closed
sotoloaizamiguel opened this issue Aug 23, 2024 · 16 comments
Closed

No device Show on meshcentral #6340

sotoloaizamiguel opened this issue Aug 23, 2024 · 16 comments
Assignees
Labels

Comments

@sotoloaizamiguel
Copy link

Hi, I have more that 300 device added to my meshcentral. Today I can't see any device on the groups. Can you help me please?
Screenshot 2024-08-23 102324

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

You didn't follow the bug template report, so we can not assist u until you follow it

Please reply with all the information from the bug report (create a new bug report and copy+paste the text)

@sotoloaizamiguel
Copy link
Author

Describe the bug
Hi, I have more that 300 device added to my meshcentral, It's was work fine yesterday. Today I can't see any device on the groups. I restarted the server, now the meshcentral show a socket error

Screenshots
websocketerror

Server Software (please complete the following information):

  • OS: Ubuntu Server
  • Network: WAN
  • Version: 20.04.6
  • Node: 22.7.0

Your config.json file

{
    "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
    "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
    "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
    "settings": {
		"MongoDb": "mongodb://meshcentraluser:pasword@127.0.0.1:27017/meshcentral",
		"DbRecordsDecryptKey": "key",
        "cert": "support.bluetg.com",
        "WANonly": true,
        "_LANonly": true,
        "_sessionKey": "",
		"ipBlockedUserRedirect": "http://bluetg.com/",
        "port": 443,
        "_aliasPort": 443,
        "_redirPort": 80,
        "_redirAliasPort": 80,
		"Compression": true,
        "WsCompression": true,
        "AgentWsCompression": true,
		"DesktopMultiplex": true,
		"_plugins": { "enabled": true },
        "maxInvalidLogin": {
            "time": 5,
            "count": 5,
            "coolofftime": 60
        }
    },
    "domains": {
        "": {
            "titlePicture": "logo-bluetg-horizontal-web-fotter.png",
            "loginPicture": "logo-bluetg-horizontal-web2.png",
            "welcomeText": "A remote solution system",
            "welcomePicture": "17973908.jpg",
            "welcomePictureFullScreen": true,
            "title": "Blue Technology Group",
            "_title2": "Support Portal",
            "_minify": true,
            "newAccounts": false,
            "userNameIsEmail": true,
            "agentInviteCodes": true,
			"userSessionIdleTimeout": 10,
			"geoLocation": true,
			"ipLocation": true,
			"nightMode": 2,
            "authStrategies": {
                "azure": {
                    "newAccounts": true,
                    "clientid": "client_id",
                    "clientsecret": "client_secret",
                    "tenantid": "tenan_id"
                }
            },
            "agentCustomization": {
                "displayName": "Blue Technology Group Remote Agent",
                "description": "Blue Technology Group agent for remote monitoring, management and assistance.",
                "companyName": "Blue Technology Group",
                "serviceName": "Bluetecagent",
                "image": "logo-bluetg-new.png",
                "fileName": "Bluetecagent"
            },
            "agentFileInfo": {
                "icon": "logo-bluetg.ico",
                "filedescription": "Bluetec agent for remote monitoring, management and assistance.",
                "fileversion": "0.1.2.3",
                "internalname": "Bluetecagent",
                "legalcopyright": "© 2024 AO Blue Technology Group",
                "originalfilename": "Bluetecagent",
                "productname": "Bluetecagent",
                "productversion": "v0.1.2.3"
            },
            "assistantCustomization": {
                "title": "Blue Technology Group Assintant",
                "image": "logo-bluetg-horizontal-web3.png",
                "fileName": "Bluetec Assintant"
            },
            "androidCustomization": {
                "title": "Blue Technology Group",
                "subtitle": "Android version",
                "image": "logo-bluetg-horizontal-web3.png"
            },
            "passwordRequirements": {
                "min": 8,
                "max": 128,
                "upper": 1,
                "lower": 1,
                "numeric": 1,
                "nonalpha": 1,
                "reset": 90,
                "force2factor": true,
                "_skip2factor": "127.0.0.1,192.168.2.0/24",
                "oldPasswordBan": 5,
                "banCommonPasswords": false,
                "twoFactorTimeout": 300
            },
            "userConsentFlags": {
                "desktopnotify": true,
                "terminalnotify": false,
                "filenotify": false,
                "desktopprompt": false,
                "terminalprompt": false,
                "fileprompt": false,
                "desktopprivacybar": false
            }
        }
    },
    "letsencrypt": {
        "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
        "email": "support@bluetg.com",
        "names": "support.bluetg.com",
        "skipChallengeVerification": false,
        "production": true
    },
    "smtp": {
        "title": "Bluetec Remote Support Message",
        "host": "smtp.office365.com",
        "port": 587,
        "from": "donotreply@bluetg.com",
        "user": "donotreply@bluetg.com",
        "pass": "paswword",
        "tls": false,
        "_tlsstrict": true,
        "_verifyemail": false,
        "emailDelaySeconds": 300
    },
  "_messaging": {
    "callmebot": true
  }
}

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

ok so your config is all correct, nothing jumps out as wrong.
first as your using linux stop meshcentral systemctl stop meshcentral
and then verify nothing is running still ps aux | grep meshcentral.js
also check nothing is running on port 80 and 443 lsof -Pni
next goto your folder you host your meshcentral from (the folder which contains meshcentral-data meshcentral-data meshcentral-backups etc...
then try running it in manually and checking it starts correctly and no errors node node_modules/meshcentral
then check the web ui,
if the web ui is still missing node
then stop meshcentral and run with full debug and check again node node_modules/meshcentral --debug
NOTE THIS WILL FULL YOUR PAGE WITH LOGS SO PAY CLOSE ATTENSION!
if its STILL missing nodes, then it must be a database issue?
as it wouldnt be showing groups if the thing was completely dead/broken

@sotoloaizamiguel
Copy link
Author

websocketerror1

@sotoloaizamiguel
Copy link
Author

This is the error lo:

-------- 8/23/2024, 3:15:34 AM ---- 1.1.27 --------

(node:1066) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 12:40:50 PM ---- 1.1.27 --------

(node:1082) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 12:43:18 PM ---- 1.1.27 --------

TokenError: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: ad7c7bb7-afdc-4600-9d12-d9536e8b7d00 Correlation ID: be4b9a32-3f25-4710-8bd7-f45478e163c3 Timestamp: 2024-08-23 12:43:18Z
at OAuth2Strategy.parseErrorResponse (/home/bluetguser/node_modules/passport-oauth2/lib/strategy.js:373:12)
at OAuth2Strategy._createOAuthError (/home/bluetguser/node_modules/passport-oauth2/lib/strategy.js:420:16)
at /home/bluetguser/node_modules/passport-oauth2/lib/strategy.js:177:45
at /home/bluetguser/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:196:18
at passBackControl (/home/bluetguser/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage. (/home/bluetguser/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

-------- 8/23/2024, 2:09:12 PM ---- 1.1.27 --------

(node:1082) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead

-------- 8/23/2024, 2:15:53 PM ---- 1.1.27 --------

(node:1114) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 2:46:14 PM ---- 1.1.27 --------

(node:3522) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 2:46:57 PM ---- 1.1.27 --------

(node:1112) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 2:48:45 PM ---- 1.1.27 --------

(node:1117) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 2:51:01 PM ---- 1.1.27 --------

(node:2790) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:26:34 PM ---- 1.1.27 --------

(node:6401) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:30:06 PM ---- 1.1.27 --------

(node:7814) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:36:21 PM ---- 1.1.27 --------

(node:10214) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:38:32 PM ---- 1.1.27 --------

(node:11076) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:40:59 PM ---- 1.1.27 --------

(node:12042) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

-------- 8/23/2024, 3:51:30 PM ---- 1.1.27 --------

(node:16025) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)

@sotoloaizamiguel
Copy link
Author

This meshcentral node module should be bluetec user, right?

Screenshot 2024-08-23 122045

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

You should always install meshcentral with a normal user and then run meshcentral with a normal user,
But I don't think this is the issue why u see groups but no devices.
Have u checked ur database and the tables make sure the is data inside it?

@sotoloaizamiguel
Copy link
Author

I installed again meshcentral, the socket error is gone. But I can't see any device. In the events show the device group and name.
Screenshot 2024-08-23 141812

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

Have u checked the user permissions?

@sotoloaizamiguel
Copy link
Author

The database show data inside
Screenshot 2024-08-23 143350

@sotoloaizamiguel
Copy link
Author

The permissions are ok.

Screenshot 2024-08-23 143647

@sotoloaizamiguel
Copy link
Author

The system show 333 Agent sesions, and when I press show server configuration link, the system show a server disconnected, click to reconnect message.

Screenshot 2024-08-23 143847

Screenshot 2024-08-23 143900

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

If u click ur user in the user permission bit, does it list all groups etc ok?

@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

The disconnect message is generally the server crashing and restarting? But I'm sure u showed us the server error log before and didn't show anything?
I'm not 100% sure without physical access to ur server to help, if u want, email me (check my github profile page) and I'll connect in and have a look :)

@sotoloaizamiguel
Copy link
Author

email sent

Repository owner deleted a comment from sotoloaizamiguel Aug 23, 2024
si458 added a commit that referenced this issue Aug 23, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@si458
Copy link
Collaborator

si458 commented Aug 23, 2024

ok so this issue has been resolved 21e196e
it appears mongodb can randomly at times decide data inside its database ISNT UTF-8 even tho it is?
so to avoid this, we set enableUtf8Validation: false in the mongodb driver so it can carry on instead of errors out
and returning no data at all

@si458 si458 closed this as completed Aug 23, 2024
@si458 si458 self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants