Merge pull request #4291 from silversword411/master

typo hunting round 2...and some docs
This commit is contained in:
Ylian Saint-Hilaire 2022-07-19 15:09:43 -07:00 committed by GitHub
commit e3600aa59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 292 additions and 4 deletions

251
.vscode/settings.json vendored
View File

@ -13,45 +13,99 @@
"addusertodevice", "addusertodevice",
"addusertodevicegroup", "addusertodevicegroup",
"addusertousergroup", "addusertousergroup",
"adminaccount",
"adminname",
"agentallowedip", "agentallowedip",
"agentblockedip",
"agentconfig", "agentconfig",
"agentconsole", "agentconsole",
"agentcustomization",
"agentdownload", "agentdownload",
"agenterrorlogs", "agenterrorlogs",
"agentidletimeout",
"agentkey",
"agentnoproxy", "agentnoproxy",
"agenttype",
"agentupdateblocksize",
"agentupdatetest",
"agentwscompression",
"aliasport",
"allevents",
"allowaccountreset", "allowaccountreset",
"alreadyinstalled",
"amtacmactivation", "amtacmactivation",
"amtmanager",
"amtoff", "amtoff",
"amton", "amton",
"amtonly", "amtonly",
"amtreset", "amtreset",
"amtscanner",
"apikey", "apikey",
"appmetrics",
"ashx", "ashx",
"atag",
"authcookie", "authcookie",
"authenticode", "authenticode",
"authlog",
"authlogfile",
"Authn", "Authn",
"autofido", "autofido",
"awsrds", "awsrds",
"backgroundonly", "backgroundonly",
"backupcode", "backupcode",
"backuppath",
"callbackurl", "callbackurl",
"ccmp", "ccmp",
"certfiles", "certfiles",
"certpfx", "certpfx",
"certpfxpass", "certpfxpass",
"certurl", "certurl",
"cfile",
"changedevice",
"changenode",
"chatnotify", "chatnotify",
"CIRA", "CIRA",
"ciralocalfqdn",
"ckey", "ckey",
"clearpower",
"clientid", "clientid",
"clientsecret", "clientsecret",
"cmds",
"companyname",
"configfile",
"configfiles",
"configkey",
"connectionstring",
"cookieipcheck",
"cookiesamesite",
"coolofftime", "coolofftime",
"coredumps", "coredumps",
"createaccount",
"createmesh", "createmesh",
"createusergroup", "createusergroup",
"crowdsec", "crowdsec",
"crypted",
"cscli", "cscli",
"cuser",
"datapath",
"datastr",
"dbconfig",
"dbencryptkey",
"dbexport",
"dbexportmin",
"dbimport",
"dblistconfigfiles",
"dbmerge",
"dbpullconfigfiles",
"dbpulldatafiles",
"dbpushconfigfiles",
"dbshowconfigfile",
"defaultuserwebstate",
"deletedefaultdomain",
"deletedomain",
"deletemesh", "deletemesh",
"deleteuser",
"deleteusergroup",
"desktopnotify", "desktopnotify",
"desktopprivacybar", "desktopprivacybar",
"desktopprompt", "desktopprompt",
@ -65,37 +119,72 @@
"devicesharing", "devicesharing",
"devicetoast", "devicetoast",
"devid", "devid",
"displayname",
"dnssuffix",
"domaindefaults", "domaindefaults",
"domainid", "domainid",
"dont", "dont",
"dumpcores",
"editdevice", "editdevice",
"editdevicegroup", "editdevicegroup",
"editgroup", "editgroup",
"editmesh", "editmesh",
"edituser", "edituser",
"emailexists",
"emailverified", "emailverified",
"entityid", "entityid",
"errlogpath",
"esversion",
"etype",
"eventlogger",
"exactport",
"exactports",
"extractall",
"extralinks", "extralinks",
"fastcert",
"fileaccess",
"filenotify", "filenotify",
"fileprompt", "fileprompt",
"filespath",
"filteredusers",
"filterid",
"firebaserelay",
"forceduserwebstate",
"fullrights", "fullrights",
"fullscreen", "fullscreen",
"gatewaymac",
"generateinvitelink", "generateinvitelink",
"getnetworkinfo",
"getsysinfo", "getsysinfo",
"getwspass",
"groupid", "groupid",
"guestname", "guestname",
"hashpass",
"hashpasssplit",
"hashpassword",
"Hilaire", "Hilaire",
"httpheaders", "httpheaders",
"idexists",
"idhex",
"idpurl", "idpurl",
"iframe", "iframe",
"ignoreagenthashcheck",
"indexagenterrorlog",
"indexmcrec",
"installtext",
"intelamt",
"interactiveonly", "interactiveonly",
"interuser", "interuser",
"invitecodes", "invitecodes",
"ipkvm", "ipkvm",
"iplayer",
"ipranges",
"Jitsi", "Jitsi",
"jumpcloud", "jumpcloud",
"keyfile", "keyfile",
"lanonly",
"LAPI", "LAPI",
"lastaddr",
"lastconnect", "lastconnect",
"ldapauth", "ldapauth",
"ldapoptions", "ldapoptions",
@ -103,104 +192,222 @@
"ldapuseremail", "ldapuseremail",
"ldapusername", "ldapusername",
"ldapusers", "ldapusers",
"leok",
"letsencrypt",
"limiteddesktop", "limiteddesktop",
"limitedevents", "limitedevents",
"Linaro",
"listdevicegroups", "listdevicegroups",
"listdevices", "listdevices",
"listdomains", "listdomains",
"listevents", "listevents",
"listusergroups", "listusergroups",
"listuserids",
"listusers", "listusers",
"listusersessions", "listusersessions",
"listusersofdevicegroup", "listusersofdevicegroup",
"loadconfigfromdb",
"localfile",
"localpath",
"localurl", "localurl",
"lockagentdownload", "lockagentdownload",
"locksettings",
"logindomain", "logindomain",
"loginfooter", "loginfooter",
"loginkey", "loginkey",
"loginkeyfile",
"loginpass", "loginpass",
"logintoken",
"logintokengen",
"logintokenkey",
"logintokens", "logintokens",
"loginuser", "loginuser",
"logouturl", "logouturl",
"mailserver",
"mailtokengen",
"maintenancemode",
"managedevices", "managedevices",
"manageusers", "manageusers",
"maxfidokeys", "maxfidokeys",
"maxlen",
"mcpath",
"mcrdesktop", "mcrdesktop",
"mcrec",
"mcrfiles", "mcrfiles",
"Mebx", "Mebx",
"meshadmin", "meshadmin",
"meshagent", "meshagent",
"meshagents",
"meshauth",
"meshcentral", "meshcentral",
"meshcmd",
"meshcore", "meshcore",
"meshctrl", "meshctrl",
"mesherrors",
"meshid", "meshid",
"meshidname",
"meshmail",
"meshname", "meshname",
"meshquota", "meshquota",
"meshrelay",
"meshrights", "meshrights",
"meshscanner",
"meshtype", "meshtype",
"Messagebox", "Messagebox",
"Messenging", "Messenging",
"minfo",
"minifyall",
"minifycore",
"mongodbcol",
"moutput",
"movetodevicegroup", "movetodevicegroup",
"mpsaliasport",
"mpscert",
"mpsdebug",
"mpsport",
"mpsserver",
"mqttbroker",
"MSCHA", "MSCHA",
"mstsc", "mstsc",
"multiresponse",
"myaccountname",
"mypassword",
"nameexists",
"nedbtodb",
"netif",
"newaccountemaildomains", "newaccountemaildomains",
"newaccountname",
"newaccounts", "newaccounts",
"newaccountspass", "newaccountspass",
"newaccountsrights", "newaccountsrights",
"newgroupname", "newgroupname",
"newobj",
"newpassword",
"noagentupdate",
"noamt", "noamt",
"noauth",
"noav",
"nodeconnect",
"nodecount",
"nodeid", "nodeid",
"nodeids", "nodeids",
"nodeinfo", "nodeinfo",
"nodepath",
"nodewindows",
"nofiles", "nofiles",
"nofirewall",
"nonalpha", "nonalpha",
"nonewgroups",
"noterminal", "noterminal",
"notools",
"nousers",
"novnc", "novnc",
"npmpath",
"npmproxy", "npmproxy",
"npmtag",
"ODELAY",
"offloader", "offloader",
"oidc", "oidc",
"openurl", "openurl",
"orphanagentuser", "orphanagentuser",
"osdesc",
"osinfo",
"otphkeys",
"otpkeys",
"otpsecret",
"parentpath",
"passwordrequirements", "passwordrequirements",
"PKCK", "PKCK",
"plivo", "plivo",
"plusplus",
"poweraction", "poweraction",
"powerevents", "powerevents",
"publicid",
"randompass", "randompass",
"rauth",
"rawdata",
"rcookie",
"realname", "realname",
"recordpath",
"redir", "redir",
"rediraliasport",
"redirections", "redirections",
"redirport",
"redirserver",
"relaydns",
"relayport",
"remotecontrol", "remotecontrol",
"remotefile", "remotefile",
"remotepath",
"removeallusersfromusergroup",
"removedevicegroup", "removedevicegroup",
"removedomain", "removedomain",
"removefromdomain", "removefromdomain",
"removefromusergroup", "removefromusergroup",
"removemeshuser", "removemeshuser",
"removesubdomain",
"removetestagents",
"removeuser", "removeuser",
"removeuserfromdevice", "removeuserfromdevice",
"removeuserfromdevicegroup", "removeuserfromdevicegroup",
"removeuserfromusergroup",
"removeusergroup", "removeusergroup",
"resetaccount",
"resetpass", "resetpass",
"responseid", "responseid",
"rightsstr",
"rname",
"rnamel",
"runasuser", "runasuser",
"runasuseronly", "runasuseronly",
"runcommand", "runcommand",
"runcommands", "runcommands",
"runmode",
"runonservererror",
"runonserverupdated",
"selfupdate",
"senderid",
"sendgrid", "sendgrid",
"sendinviteemail", "sendinviteemail",
"serverfiles", "serverfiles",
"serverid",
"serverinfo", "serverinfo",
"serverkey",
"serverupdate",
"servicename",
"servicepath",
"sessionkey",
"sessionrecording", "sessionrecording",
"sessiontime",
"settodomain", "settodomain",
"shareid",
"showall",
"showallmeshes",
"showevents", "showevents",
"showiplocations",
"showitem",
"showmeshes",
"shownodes",
"showpower",
"showsmbios",
"showusergroups",
"showusers",
"siteadmin", "siteadmin",
"sitestyle", "sitestyle",
"smsserver",
"specificupdate",
"splitip",
"srights", "srights",
"ssid", "ssid",
"sspi", "sspi",
"startack",
"statsevents", "statsevents",
"Strs", "Strs",
"subdir",
"swarmallowedip",
"swarmport",
"swarmserver",
"sysinfo",
"syslogauth", "syslogauth",
"syslogjson", "syslogjson",
"syslogtcp", "syslogtcp",
@ -208,30 +415,74 @@
"tenantid", "tenantid",
"terminalnotify", "terminalnotify",
"terminalprompt", "terminalprompt",
"termsize",
"titlepicture", "titlepicture",
"tkip", "tkip",
"tlscertcheck", "tlscertcheck",
"tlsoffload",
"tlsrootcert",
"tlsstrict", "tlsstrict",
"tokenrequired",
"translateall",
"translationpath",
"trustedcert", "trustedcert",
"trustedproxy",
"TTLS", "TTLS",
"tunnelws",
"tunnelwsstate",
"tzoffset", "tzoffset",
"ugroup",
"ugroups",
"ugrp", "ugrp",
"ugrpid", "ugrpid",
"uicustomevent",
"unadmin",
"unsealkey",
"uploadack",
"uploaderror",
"uploadstart",
"useid", "useid",
"userallowedip", "userallowedip",
"userblockedip",
"userbroadcast", "userbroadcast",
"userconsentflags", "userconsentflags",
"usercount",
"usergroups", "usergroups",
"userid", "userid",
"userids", "userids",
"usernameisemail",
"userquota", "userquota",
"Usersessionidletimeout",
"vaultpullconfigfiles",
"vaultpushconfigfiles",
"verifyemail", "verifyemail",
"viewonly", "viewonly",
"wakedevices", "wakedevices",
"wanonly",
"webemailspath",
"webpublicpath",
"webpush",
"webrelayserver",
"webrtc", "webrtc",
"webrtconfig",
"webviewspath",
"welcomepicture", "welcomepicture",
"welcometext", "welcometext",
"winservice",
"wscompression", "wscompression",
"wssessioncount",
"wssessions",
"xdomains",
"xenv",
"xinstall",
"xjslint",
"xmeshes",
"xpad",
"xrestart",
"xuninstall",
"xxprocess",
"xxurl",
"xxxprocess",
"Ylian", "Ylian",
"yubikey" "yubikey"
] ]

View File

@ -21,6 +21,12 @@ Make sure you understand how MeshCentral works with your browser using chrome de
"AgentWsCompression": false, "AgentWsCompression": false,
``` ```
### Port Troubleshooting on server
If you're getting a `port 4433 is not available` error, this is because someone else is using this port, very likely another instance of MeshCentral. If your MeshCentral server is bound to ports 81/444 MeshCentral could not get port 80/443 and got the next available ones.
In general the problem is that you are running two MeshCentral instances at the same time. Probably one as a background Windows Service and one in the command line. Which ever instance can grab port 4433 will have a running MPS and CIRA should work, but the second instance will not have port 4433 and CIRA will not work.
### Enabling trace in your browser Dev Tools ### Enabling trace in your browser Dev Tools
`Trace=1` as a parameter in chrome dev tools for debugging `Trace=1` as a parameter in chrome dev tools for debugging
@ -215,6 +221,37 @@ Then open your browser to http://localhost:9999 or whatever port you used.
!!!note !!!note
If you pause the debugger, and happen to forget about it, the agent will automatically kill itself and restart because it will think that a thread is stuck. Default debugger timeout is 10 minutes, you may find a log entry saved to disk saying "Microstack Thread STUCK", or something similar. If you pause the debugger, and happen to forget about it, the agent will automatically kill itself and restart because it will think that a thread is stuck. Default debugger timeout is 10 minutes, you may find a log entry saved to disk saying "Microstack Thread STUCK", or something similar.
### Troubleshooting Agent connectivity
If an agent keeps disconnecting and reconnecting, add this line to the "settings" section of the config.json:
```
"agentping": 30
```
This will cause MeshCentral to "ping" the agent every 30 seconds and the agent to respond with a "pong" each time. That usually solves the issue however, it does generate more traffic. If that works, you can remove the line and try this line instead:
```
"agentpong": 30
```
This will cause MeshCentral to "pong" the agent every 30 seconds, the agent will not respond. This usually fixes the issue, but you have half the traffic. I would also increase the time like:
```
"agentpong": 90
```
This is the best, you have one way traffic to all agents every 90 seconds. The larger the number you can get away with the better.
If you ever get the same problem but on the browser side, you can also use one of these:
```
"browserping": 30
"browserpong": 30
```
Same idea, browser side instead of agent side.
## Intel AMT ## Intel AMT
To debug issues, confirm that Intel AMT is active and there MeshCentral is not showing any red errors on the "Intel AMT" line: To debug issues, confirm that Intel AMT is active and there MeshCentral is not showing any red errors on the "Intel AMT" line:

View File

@ -201,7 +201,7 @@ function CreateMeshCentralServer(config, args) {
// Check if translate.json is in the "meshcentral-data" folder, if so use that and translate default pages. // Check if translate.json is in the "meshcentral-data" folder, if so use that and translate default pages.
var translationFile = null, customTranslation = false; var translationFile = null, customTranslation = false;
if (require('fs').existsSync(obj.path.join(obj.datapath, 'translate.json'))) { translationFile = obj.path.join(obj.datapath, 'translate.json'); console.log("Using translate.json in meshentral-data."); customTranslation = true; } if (require('fs').existsSync(obj.path.join(obj.datapath, 'translate.json'))) { translationFile = obj.path.join(obj.datapath, 'translate.json'); console.log("Using translate.json in meshcentral-data."); customTranslation = true; }
if (translationFile == null) { if (require('fs').existsSync(obj.path.join(__dirname, 'translate', 'translate.json'))) { translationFile = obj.path.join(__dirname, 'translate', 'translate.json'); console.log("Using default translate.json."); } } if (translationFile == null) { if (require('fs').existsSync(obj.path.join(__dirname, 'translate', 'translate.json'))) { translationFile = obj.path.join(__dirname, 'translate', 'translate.json'); console.log("Using default translate.json."); } }
if (translationFile == null) { console.log("Unable to find translate.json."); process.exit(); return; } if (translationFile == null) { console.log("Unable to find translate.json."); process.exit(); return; }
@ -369,7 +369,7 @@ function CreateMeshCentralServer(config, args) {
// Check if we need to install, start, stop, remove ourself as a background service // Check if we need to install, start, stop, remove ourself as a background service
if (((obj.args.xinstall == true) || (obj.args.xuninstall == true) || (obj.args.start == true) || (obj.args.stop == true) || (obj.args.restart == true))) { if (((obj.args.xinstall == true) || (obj.args.xuninstall == true) || (obj.args.start == true) || (obj.args.stop == true) || (obj.args.restart == true))) {
var env = [], xenv = ['user', 'port', 'aliasport', 'mpsport', 'mpsaliasport', 'redirport', 'exactport', 'rediraliasport', 'debug']; var env = [], xenv = ['user', 'port', 'aliasport', 'mpsport', 'mpsaliasport', 'redirport', 'exactport', 'rediraliasport', 'debug'];
for (i in xenv) { if (obj.args[xenv[i]] != null) { env.push({ name: 'mesh' + xenv[i], value: obj.args[xenv[i]] }); } } // Set some args as service environement variables. for (i in xenv) { if (obj.args[xenv[i]] != null) { env.push({ name: 'mesh' + xenv[i], value: obj.args[xenv[i]] }); } } // Set some args as service environment variables.
var serviceFilePath = null; var serviceFilePath = null;
if (obj.fs.existsSync(obj.path.join(servicepath, 'winservice.js'))) { serviceFilePath = obj.path.join(servicepath, 'winservice.js'); } if (obj.fs.existsSync(obj.path.join(servicepath, 'winservice.js'))) { serviceFilePath = obj.path.join(servicepath, 'winservice.js'); }
@ -757,7 +757,7 @@ function CreateMeshCentralServer(config, args) {
obj.syslogtcp.log("MeshCentral v" + getCurrentVersion() + " Server Start", obj.syslogtcp.LOG_INFO); obj.syslogtcp.log("MeshCentral v" + getCurrentVersion() + " Server Start", obj.syslogtcp.LOG_INFO);
} }
// Check top level configuration for any unreconized values // Check top level configuration for any unrecognized values
if (config) { for (var i in config) { if ((typeof i == 'string') && (i.length > 0) && (i[0] != '_') && (['settings', 'domaindefaults', 'domains', 'configfiles', 'smtp', 'letsencrypt', 'peers', 'sms', 'sendgrid', 'sendmail', 'firebase', 'firebaserelay', '$schema'].indexOf(i) == -1)) { addServerWarning('Unrecognized configuration option \"' + i + '\".', 3, [ i ]); } } } if (config) { for (var i in config) { if ((typeof i == 'string') && (i.length > 0) && (i[0] != '_') && (['settings', 'domaindefaults', 'domains', 'configfiles', 'smtp', 'letsencrypt', 'peers', 'sms', 'sendgrid', 'sendmail', 'firebase', 'firebaserelay', '$schema'].indexOf(i) == -1)) { addServerWarning('Unrecognized configuration option \"' + i + '\".', 3, [ i ]); } } }
// Read IP lists from files if applicable // Read IP lists from files if applicable

View File

@ -318,7 +318,7 @@ if (args['_'].length == 0) {
console.log(" --id '[groupid]' - Device group identifier (or --group)."); console.log(" --id '[groupid]' - Device group identifier (or --group).");
} }
console.log(" --group [groupname] - Device group name (or --id)."); console.log(" --group [groupname] - Device group name (or --id).");
console.log(" --hours [hours] - Validity period in hours or 0 for infinit."); console.log(" --hours [hours] - Validity period in hours or 0 for infinite.");
console.log("\r\nOptional arguments:\r\n"); console.log("\r\nOptional arguments:\r\n");
console.log(" --flags [mode] - Mode flag for link type (0 = both, 1 = interactive only, 2 = background only)"); console.log(" --flags [mode] - Mode flag for link type (0 = both, 1 = interactive only, 2 = background only)");
break; break;