Open schories opened 9 months ago
just wondering if you have watched the peering video and set it up correctly at all? https://www.youtube.com/watch?v=j8xIRGScju0
i dont think some of your config.json
settings are correct?
i would have to look into it
Update: fixed URL typos
Thank you for the the quick reply. Yes, we watched the video.
Our config is based on it, as shown at 5:27 https://youtu.be/j8xIRGScju0?si=JAHvXuiSVf5542NZ&t=327
"peers": {
"serverId": "sample-backend-test01",
"servers": {
"sample-backend-test01": { "url": "wss://sample-backend-test01.domain.com:443/" },
"sample-backend-test02": { "url": "wss://sample-backend-test02.domain.com:443/" },
"sample-backend-test03": { "url": "wss://sample-backend-test03.domain.com:443/" }
}
},
Please, let me know where the setup may be wrong - I'd be happy if this would "just" be a configuration issue. Your advice is greatly appreciated!
Btw. Same issue also with MongoDB 6.x - so it seems not to be related to MongoDB.
sorry was just a quick glimpse im just busy doing other stuff so will get round to looking at it properly later
also wss://sample-backend-test02.domain:443/
is this a mistake in your copy+paste? shouldnt it be domain.com:443
?
Excellent catch! That wasn't the issue sadly. I fixed the typo above, I apologize.
summary
When the user is selected to become a member of the selected usergroup, nothing happens. No error message in meshcentral gui, no error message in meshcentral log or meshcentral console (when invoked interactively). Instead a strange document
The process of adding the user to the usergroup can be repeated – as long as the meshcentral server is running – but the user won’t be added to the usergroup.
However, after fully restarting meshcentral server and then repeating to add the same user to the same usergroup, it suddenly works.
But only for users and usergroups existing prior to the restart of meshcentral. Meaning newly created usergroups and users will be affected from the same issue – until meshcentral server is fully restarted and the procedure is repeated one more time.
The strange document remains in the database as garbage forever. It won’t be cleaned up.
main findings
This issue only happens, when a mongodb replica set cluster is used.
If a normal single mongodb connection is used by a single meshcentral instance the issue is NOT occurring AS LONG AS changestream is set to false: "dbChangeStream": false (default).
However, once changestream is enabled ("dbChangeStream": true)
the issue reproducibly occurs.
steps to exactly reproduce the issue
document1
system information:
update: fixed URL typos meshcentral config.json (domains & secrets changed)
MongoDB
Version 7.0.5 (stable), 3 node replica cluster, running on Node.js v20.11.0
Meshcentral