index.html 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217
  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <meta name="description" content="A remote monitoring and management tool">
  7. <meta name="author" content="Ylianst">
  8. <link rel="canonical" href="https://ylianst.github.io/MeshCentral/meshcentral/debugging/">
  9. <link rel="prev" href="../codesigning/">
  10. <link rel="next" href="../devicetabs/">
  11. <link rel="icon" href="../../images/favicon.ico">
  12. <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.40">
  13. <title>Debugging - MeshCentral Documentation</title>
  14. <link rel="stylesheet" href="../../assets/stylesheets/main.8c3ca2c6.min.css">
  15. <link rel="stylesheet" href="../../assets/stylesheets/palette.06af60db.min.css">
  16. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  17. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  18. <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  19. <link rel="stylesheet" href="../../stylesheets/extra.css">
  20. <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  21. </head>
  22. <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="white" data-md-color-accent="indigo">
  23. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  24. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  25. <label class="md-overlay" for="__drawer"></label>
  26. <div data-md-component="skip">
  27. <a href="#websockets-video" class="md-skip">
  28. Skip to content
  29. </a>
  30. </div>
  31. <div data-md-component="announce">
  32. </div>
  33. <header class="md-header" data-md-component="header">
  34. <nav class="md-header__inner md-grid" aria-label="Header">
  35. <a href="../.." title="MeshCentral Documentation" class="md-header__button md-logo" aria-label="MeshCentral Documentation" data-md-component="logo">
  36. <img src="../../images/favicon.ico" alt="logo">
  37. </a>
  38. <label class="md-header__button md-icon" for="__drawer">
  39. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
  40. </label>
  41. <div class="md-header__title" data-md-component="header-title">
  42. <div class="md-header__ellipsis">
  43. <div class="md-header__topic">
  44. <span class="md-ellipsis">
  45. MeshCentral Documentation
  46. </span>
  47. </div>
  48. <div class="md-header__topic" data-md-component="header-topic">
  49. <span class="md-ellipsis">
  50. Debugging
  51. </span>
  52. </div>
  53. </div>
  54. </div>
  55. <label class="md-header__button md-icon" for="__search">
  56. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  57. </label>
  58. <div class="md-search" data-md-component="search" role="dialog">
  59. <label class="md-search__overlay" for="__search"></label>
  60. <div class="md-search__inner" role="search">
  61. <form class="md-search__form" name="search">
  62. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
  63. <label class="md-search__icon md-icon" for="__search">
  64. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  65. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
  66. </label>
  67. <nav class="md-search__options" aria-label="Search">
  68. <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
  69. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
  70. </button>
  71. </nav>
  72. </form>
  73. <div class="md-search__output">
  74. <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
  75. <div class="md-search-result" data-md-component="search-result">
  76. <div class="md-search-result__meta">
  77. Initializing search
  78. </div>
  79. <ol class="md-search-result__list" role="presentation"></ol>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="md-header__source">
  86. <a href="https://github.com/Ylianst/MeshCentral" title="Go to repository" class="md-source" data-md-component="source">
  87. <div class="md-source__icon md-icon">
  88. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  89. </div>
  90. <div class="md-source__repository">
  91. Ylianst/MeshCentral
  92. </div>
  93. </a>
  94. </div>
  95. </nav>
  96. </header>
  97. <div class="md-container" data-md-component="container">
  98. <nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
  99. <div class="md-grid">
  100. <ul class="md-tabs__list">
  101. <li class="md-tabs__item">
  102. <a href="../.." class="md-tabs__link">
  103. Home
  104. </a>
  105. </li>
  106. <li class="md-tabs__item">
  107. <a href="../../install/" class="md-tabs__link">
  108. Install
  109. </a>
  110. </li>
  111. <li class="md-tabs__item md-tabs__item--active">
  112. <a href="../" class="md-tabs__link">
  113. MeshCentral2
  114. </a>
  115. </li>
  116. <li class="md-tabs__item">
  117. <a href="../../design/" class="md-tabs__link">
  118. Design and Architecture
  119. </a>
  120. </li>
  121. <li class="md-tabs__item">
  122. <a href="../../meshcmd/" class="md-tabs__link">
  123. MeshCmd
  124. </a>
  125. </li>
  126. <li class="md-tabs__item">
  127. <a href="../../meshctrl/" class="md-tabs__link">
  128. MeshCtrl
  129. </a>
  130. </li>
  131. <li class="md-tabs__item">
  132. <a href="../../meshrouter/" class="md-tabs__link">
  133. Mesh Router
  134. </a>
  135. </li>
  136. <li class="md-tabs__item">
  137. <a href="../../intelamt/" class="md-tabs__link">
  138. Intel AMT
  139. </a>
  140. </li>
  141. <li class="md-tabs__item">
  142. <a href="../../how-to-contribute/" class="md-tabs__link">
  143. How to Contribute
  144. </a>
  145. </li>
  146. <li class="md-tabs__item">
  147. <a href="../../other/adfs_sso_guide/" class="md-tabs__link">
  148. Other
  149. </a>
  150. </li>
  151. </ul>
  152. </div>
  153. </nav>
  154. <main class="md-main" data-md-component="main">
  155. <div class="md-main__inner md-grid">
  156. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  157. <div class="md-sidebar__scrollwrap">
  158. <div class="md-sidebar__inner">
  159. <nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
  160. <label class="md-nav__title" for="__drawer">
  161. <a href="../.." title="MeshCentral Documentation" class="md-nav__button md-logo" aria-label="MeshCentral Documentation" data-md-component="logo">
  162. <img src="../../images/favicon.ico" alt="logo">
  163. </a>
  164. MeshCentral Documentation
  165. </label>
  166. <div class="md-nav__source">
  167. <a href="https://github.com/Ylianst/MeshCentral" title="Go to repository" class="md-source" data-md-component="source">
  168. <div class="md-source__icon md-icon">
  169. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  170. </div>
  171. <div class="md-source__repository">
  172. Ylianst/MeshCentral
  173. </div>
  174. </a>
  175. </div>
  176. <ul class="md-nav__list" data-md-scrollfix>
  177. <li class="md-nav__item">
  178. <a href="../.." class="md-nav__link">
  179. <span class="md-ellipsis">
  180. Home
  181. </span>
  182. </a>
  183. </li>
  184. <li class="md-nav__item md-nav__item--nested">
  185. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" >
  186. <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
  187. <span class="md-ellipsis">
  188. Install
  189. </span>
  190. <span class="md-nav__icon md-icon"></span>
  191. </label>
  192. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
  193. <label class="md-nav__title" for="__nav_2">
  194. <span class="md-nav__icon md-icon"></span>
  195. Install
  196. </label>
  197. <ul class="md-nav__list" data-md-scrollfix>
  198. <li class="md-nav__item">
  199. <a href="../../install/" class="md-nav__link">
  200. <span class="md-ellipsis">
  201. Quick Start Guide
  202. </span>
  203. </a>
  204. </li>
  205. <li class="md-nav__item">
  206. <a href="../../install/install2/" class="md-nav__link">
  207. <span class="md-ellipsis">
  208. Full Install Guide
  209. </span>
  210. </a>
  211. </li>
  212. </ul>
  213. </nav>
  214. </li>
  215. <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
  216. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
  217. <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
  218. <span class="md-ellipsis">
  219. MeshCentral2
  220. </span>
  221. <span class="md-nav__icon md-icon"></span>
  222. </label>
  223. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
  224. <label class="md-nav__title" for="__nav_3">
  225. <span class="md-nav__icon md-icon"></span>
  226. MeshCentral2
  227. </label>
  228. <ul class="md-nav__list" data-md-scrollfix>
  229. <li class="md-nav__item">
  230. <a href="../" class="md-nav__link">
  231. <span class="md-ellipsis">
  232. MeshCentral2 Guide
  233. </span>
  234. </a>
  235. </li>
  236. <li class="md-nav__item">
  237. <a href="../config/" class="md-nav__link">
  238. <span class="md-ellipsis">
  239. All Configuration Options
  240. </span>
  241. </a>
  242. </li>
  243. <li class="md-nav__item">
  244. <a href="../agents/" class="md-nav__link">
  245. <span class="md-ellipsis">
  246. Agent Information
  247. </span>
  248. </a>
  249. </li>
  250. <li class="md-nav__item">
  251. <a href="../assistant/" class="md-nav__link">
  252. <span class="md-ellipsis">
  253. Assistant
  254. </span>
  255. </a>
  256. </li>
  257. <li class="md-nav__item">
  258. <a href="../codesigning/" class="md-nav__link">
  259. <span class="md-ellipsis">
  260. Code Signing
  261. </span>
  262. </a>
  263. </li>
  264. <li class="md-nav__item md-nav__item--active">
  265. <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
  266. <label class="md-nav__link md-nav__link--active" for="__toc">
  267. <span class="md-ellipsis">
  268. Debugging
  269. </span>
  270. <span class="md-nav__icon md-icon"></span>
  271. </label>
  272. <a href="./" class="md-nav__link md-nav__link--active">
  273. <span class="md-ellipsis">
  274. Debugging
  275. </span>
  276. </a>
  277. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  278. <label class="md-nav__title" for="__toc">
  279. <span class="md-nav__icon md-icon"></span>
  280. Table of contents
  281. </label>
  282. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  283. <li class="md-nav__item">
  284. <a href="#websockets-video" class="md-nav__link">
  285. <span class="md-ellipsis">
  286. Websockets Video
  287. </span>
  288. </a>
  289. </li>
  290. <li class="md-nav__item">
  291. <a href="#meshcentral-server" class="md-nav__link">
  292. <span class="md-ellipsis">
  293. MeshCentral Server
  294. </span>
  295. </a>
  296. <nav class="md-nav" aria-label="MeshCentral Server">
  297. <ul class="md-nav__list">
  298. <li class="md-nav__item">
  299. <a href="#useful-configjs-settings" class="md-nav__link">
  300. <span class="md-ellipsis">
  301. Useful config.js settings
  302. </span>
  303. </a>
  304. </li>
  305. <li class="md-nav__item">
  306. <a href="#understanding-node-and-paths" class="md-nav__link">
  307. <span class="md-ellipsis">
  308. Understanding node and paths
  309. </span>
  310. </a>
  311. </li>
  312. <li class="md-nav__item">
  313. <a href="#unable-to-update-server" class="md-nav__link">
  314. <span class="md-ellipsis">
  315. Unable to update server
  316. </span>
  317. </a>
  318. </li>
  319. <li class="md-nav__item">
  320. <a href="#port-troubleshooting-on-server" class="md-nav__link">
  321. <span class="md-ellipsis">
  322. Port Troubleshooting on server
  323. </span>
  324. </a>
  325. </li>
  326. <li class="md-nav__item">
  327. <a href="#running-meshcentral-server-in-debug-mode" class="md-nav__link">
  328. <span class="md-ellipsis">
  329. Running Meshcentral server in debug mode
  330. </span>
  331. </a>
  332. </li>
  333. <li class="md-nav__item">
  334. <a href="#enabling-trace-in-your-browser-dev-tools" class="md-nav__link">
  335. <span class="md-ellipsis">
  336. Enabling trace in your browser Dev Tools
  337. </span>
  338. </a>
  339. </li>
  340. <li class="md-nav__item">
  341. <a href="#finding-agent-problems" class="md-nav__link">
  342. <span class="md-ellipsis">
  343. Finding agent problems
  344. </span>
  345. </a>
  346. </li>
  347. <li class="md-nav__item">
  348. <a href="#logging-it-all" class="md-nav__link">
  349. <span class="md-ellipsis">
  350. Logging it all
  351. </span>
  352. </a>
  353. </li>
  354. <li class="md-nav__item">
  355. <a href="#restricting-server-to-specific-ips" class="md-nav__link">
  356. <span class="md-ellipsis">
  357. Restricting server to specific IP(s)
  358. </span>
  359. </a>
  360. </li>
  361. <li class="md-nav__item">
  362. <a href="#finding-system-id-types" class="md-nav__link">
  363. <span class="md-ellipsis">
  364. Finding system ID types
  365. </span>
  366. </a>
  367. </li>
  368. <li class="md-nav__item">
  369. <a href="#pull-down-cert-crt-file-from-internet" class="md-nav__link">
  370. <span class="md-ellipsis">
  371. Pull down cert .crt file from internet
  372. </span>
  373. </a>
  374. </li>
  375. </ul>
  376. </nav>
  377. </li>
  378. <li class="md-nav__item">
  379. <a href="#meshagent" class="md-nav__link">
  380. <span class="md-ellipsis">
  381. MeshAgent
  382. </span>
  383. </a>
  384. <nav class="md-nav" aria-label="MeshAgent">
  385. <ul class="md-nav__list">
  386. <li class="md-nav__item">
  387. <a href="#agent-debug-logs-to-server" class="md-nav__link">
  388. <span class="md-ellipsis">
  389. Agent Debug Logs to server
  390. </span>
  391. </a>
  392. </li>
  393. <li class="md-nav__item">
  394. <a href="#determine-agent-capabilities" class="md-nav__link">
  395. <span class="md-ellipsis">
  396. Determine Agent capabilities
  397. </span>
  398. </a>
  399. </li>
  400. <li class="md-nav__item">
  401. <a href="#useful-meshagentmsh-flags" class="md-nav__link">
  402. <span class="md-ellipsis">
  403. Useful MeshAgent.msh flags
  404. </span>
  405. </a>
  406. </li>
  407. <li class="md-nav__item">
  408. <a href="#obtain-generated-msh-file" class="md-nav__link">
  409. <span class="md-ellipsis">
  410. Obtain generated .msh File
  411. </span>
  412. </a>
  413. </li>
  414. <li class="md-nav__item">
  415. <a href="#meshagent-commands" class="md-nav__link">
  416. <span class="md-ellipsis">
  417. MeshAgent Commands
  418. </span>
  419. </a>
  420. </li>
  421. <li class="md-nav__item">
  422. <a href="#on-the-fly-patching-meshagent" class="md-nav__link">
  423. <span class="md-ellipsis">
  424. On the fly Patching MeshAgent
  425. </span>
  426. </a>
  427. </li>
  428. <li class="md-nav__item">
  429. <a href="#agent-debugging-using-meshcore-js-debugger" class="md-nav__link">
  430. <span class="md-ellipsis">
  431. Agent Debugging using MeshCore JS Debugger
  432. </span>
  433. </a>
  434. </li>
  435. <li class="md-nav__item">
  436. <a href="#troubleshooting-agent-connectivity" class="md-nav__link">
  437. <span class="md-ellipsis">
  438. Troubleshooting Agent connectivity
  439. </span>
  440. </a>
  441. </li>
  442. </ul>
  443. </nav>
  444. </li>
  445. <li class="md-nav__item">
  446. <a href="#intel-amt" class="md-nav__link">
  447. <span class="md-ellipsis">
  448. Intel AMT
  449. </span>
  450. </a>
  451. </li>
  452. </ul>
  453. </nav>
  454. </li>
  455. <li class="md-nav__item">
  456. <a href="../devicetabs/" class="md-nav__link">
  457. <span class="md-ellipsis">
  458. Device Tabs
  459. </span>
  460. </a>
  461. </li>
  462. <li class="md-nav__item">
  463. <a href="../plugins/" class="md-nav__link">
  464. <span class="md-ellipsis">
  465. Plugins
  466. </span>
  467. </a>
  468. </li>
  469. <li class="md-nav__item">
  470. <a href="../SSLnletsencrypt/" class="md-nav__link">
  471. <span class="md-ellipsis">
  472. SSL
  473. </span>
  474. </a>
  475. </li>
  476. <li class="md-nav__item">
  477. <a href="../security/" class="md-nav__link">
  478. <span class="md-ellipsis">
  479. Security
  480. </span>
  481. </a>
  482. </li>
  483. <li class="md-nav__item">
  484. <a href="../tokens/" class="md-nav__link">
  485. <span class="md-ellipsis">
  486. Tokens
  487. </span>
  488. </a>
  489. </li>
  490. <li class="md-nav__item">
  491. <a href="../faq/" class="md-nav__link">
  492. <span class="md-ellipsis">
  493. FAQ
  494. </span>
  495. </a>
  496. </li>
  497. <li class="md-nav__item">
  498. <a href="../tipsntricks/" class="md-nav__link">
  499. <span class="md-ellipsis">
  500. Tips n Tricks
  501. </span>
  502. </a>
  503. </li>
  504. <li class="md-nav__item">
  505. <a href="../../messaging/" class="md-nav__link">
  506. <span class="md-ellipsis">
  507. Messaging
  508. </span>
  509. </a>
  510. </li>
  511. <li class="md-nav__item">
  512. <a href="../customization/" class="md-nav__link">
  513. <span class="md-ellipsis">
  514. Customization
  515. </span>
  516. </a>
  517. </li>
  518. <li class="md-nav__item">
  519. <a href="../openidConnectStrategy/" class="md-nav__link">
  520. <span class="md-ellipsis">
  521. openidConnectStrategy
  522. </span>
  523. </a>
  524. </li>
  525. </ul>
  526. </nav>
  527. </li>
  528. <li class="md-nav__item md-nav__item--nested">
  529. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" >
  530. <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
  531. <span class="md-ellipsis">
  532. Design and Architecture
  533. </span>
  534. <span class="md-nav__icon md-icon"></span>
  535. </label>
  536. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
  537. <label class="md-nav__title" for="__nav_4">
  538. <span class="md-nav__icon md-icon"></span>
  539. Design and Architecture
  540. </label>
  541. <ul class="md-nav__list" data-md-scrollfix>
  542. <li class="md-nav__item">
  543. <a href="../../design/" class="md-nav__link">
  544. <span class="md-ellipsis">
  545. Design and Architecture
  546. </span>
  547. </a>
  548. </li>
  549. </ul>
  550. </nav>
  551. </li>
  552. <li class="md-nav__item md-nav__item--nested">
  553. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_5" >
  554. <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
  555. <span class="md-ellipsis">
  556. MeshCmd
  557. </span>
  558. <span class="md-nav__icon md-icon"></span>
  559. </label>
  560. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
  561. <label class="md-nav__title" for="__nav_5">
  562. <span class="md-nav__icon md-icon"></span>
  563. MeshCmd
  564. </label>
  565. <ul class="md-nav__list" data-md-scrollfix>
  566. <li class="md-nav__item">
  567. <a href="../../meshcmd/" class="md-nav__link">
  568. <span class="md-ellipsis">
  569. MeshCmd
  570. </span>
  571. </a>
  572. </li>
  573. </ul>
  574. </nav>
  575. </li>
  576. <li class="md-nav__item md-nav__item--nested">
  577. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_6" >
  578. <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
  579. <span class="md-ellipsis">
  580. MeshCtrl
  581. </span>
  582. <span class="md-nav__icon md-icon"></span>
  583. </label>
  584. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
  585. <label class="md-nav__title" for="__nav_6">
  586. <span class="md-nav__icon md-icon"></span>
  587. MeshCtrl
  588. </label>
  589. <ul class="md-nav__list" data-md-scrollfix>
  590. <li class="md-nav__item">
  591. <a href="../../meshctrl/" class="md-nav__link">
  592. <span class="md-ellipsis">
  593. MeshCtrl
  594. </span>
  595. </a>
  596. </li>
  597. </ul>
  598. </nav>
  599. </li>
  600. <li class="md-nav__item md-nav__item--nested">
  601. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_7" >
  602. <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
  603. <span class="md-ellipsis">
  604. Mesh Router
  605. </span>
  606. <span class="md-nav__icon md-icon"></span>
  607. </label>
  608. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
  609. <label class="md-nav__title" for="__nav_7">
  610. <span class="md-nav__icon md-icon"></span>
  611. Mesh Router
  612. </label>
  613. <ul class="md-nav__list" data-md-scrollfix>
  614. <li class="md-nav__item">
  615. <a href="../../meshrouter/" class="md-nav__link">
  616. <span class="md-ellipsis">
  617. MeshCentral Router
  618. </span>
  619. </a>
  620. </li>
  621. </ul>
  622. </nav>
  623. </li>
  624. <li class="md-nav__item md-nav__item--nested">
  625. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_8" >
  626. <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
  627. <span class="md-ellipsis">
  628. Intel AMT
  629. </span>
  630. <span class="md-nav__icon md-icon"></span>
  631. </label>
  632. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
  633. <label class="md-nav__title" for="__nav_8">
  634. <span class="md-nav__icon md-icon"></span>
  635. Intel AMT
  636. </label>
  637. <ul class="md-nav__list" data-md-scrollfix>
  638. <li class="md-nav__item">
  639. <a href="../../intelamt/" class="md-nav__link">
  640. <span class="md-ellipsis">
  641. Intel AMT
  642. </span>
  643. </a>
  644. </li>
  645. </ul>
  646. </nav>
  647. </li>
  648. <li class="md-nav__item md-nav__item--nested">
  649. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_9" >
  650. <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0">
  651. <span class="md-ellipsis">
  652. How to Contribute
  653. </span>
  654. <span class="md-nav__icon md-icon"></span>
  655. </label>
  656. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
  657. <label class="md-nav__title" for="__nav_9">
  658. <span class="md-nav__icon md-icon"></span>
  659. How to Contribute
  660. </label>
  661. <ul class="md-nav__list" data-md-scrollfix>
  662. <li class="md-nav__item">
  663. <a href="../../how-to-contribute/" class="md-nav__link">
  664. <span class="md-ellipsis">
  665. Contribute to MeshCentral
  666. </span>
  667. </a>
  668. </li>
  669. </ul>
  670. </nav>
  671. </li>
  672. <li class="md-nav__item md-nav__item--nested">
  673. <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_10" >
  674. <label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
  675. <span class="md-ellipsis">
  676. Other
  677. </span>
  678. <span class="md-nav__icon md-icon"></span>
  679. </label>
  680. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
  681. <label class="md-nav__title" for="__nav_10">
  682. <span class="md-nav__icon md-icon"></span>
  683. Other
  684. </label>
  685. <ul class="md-nav__list" data-md-scrollfix>
  686. <li class="md-nav__item">
  687. <a href="../../other/adfs_sso_guide/" class="md-nav__link">
  688. <span class="md-ellipsis">
  689. ADFS SSO Guide
  690. </span>
  691. </a>
  692. </li>
  693. <li class="md-nav__item">
  694. <a href="../../other/meshcentral_satellite/" class="md-nav__link">
  695. <span class="md-ellipsis">
  696. MeshCentral Satellite
  697. </span>
  698. </a>
  699. </li>
  700. </ul>
  701. </nav>
  702. </li>
  703. </ul>
  704. </nav>
  705. </div>
  706. </div>
  707. </div>
  708. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  709. <div class="md-sidebar__scrollwrap">
  710. <div class="md-sidebar__inner">
  711. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  712. <label class="md-nav__title" for="__toc">
  713. <span class="md-nav__icon md-icon"></span>
  714. Table of contents
  715. </label>
  716. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  717. <li class="md-nav__item">
  718. <a href="#websockets-video" class="md-nav__link">
  719. <span class="md-ellipsis">
  720. Websockets Video
  721. </span>
  722. </a>
  723. </li>
  724. <li class="md-nav__item">
  725. <a href="#meshcentral-server" class="md-nav__link">
  726. <span class="md-ellipsis">
  727. MeshCentral Server
  728. </span>
  729. </a>
  730. <nav class="md-nav" aria-label="MeshCentral Server">
  731. <ul class="md-nav__list">
  732. <li class="md-nav__item">
  733. <a href="#useful-configjs-settings" class="md-nav__link">
  734. <span class="md-ellipsis">
  735. Useful config.js settings
  736. </span>
  737. </a>
  738. </li>
  739. <li class="md-nav__item">
  740. <a href="#understanding-node-and-paths" class="md-nav__link">
  741. <span class="md-ellipsis">
  742. Understanding node and paths
  743. </span>
  744. </a>
  745. </li>
  746. <li class="md-nav__item">
  747. <a href="#unable-to-update-server" class="md-nav__link">
  748. <span class="md-ellipsis">
  749. Unable to update server
  750. </span>
  751. </a>
  752. </li>
  753. <li class="md-nav__item">
  754. <a href="#port-troubleshooting-on-server" class="md-nav__link">
  755. <span class="md-ellipsis">
  756. Port Troubleshooting on server
  757. </span>
  758. </a>
  759. </li>
  760. <li class="md-nav__item">
  761. <a href="#running-meshcentral-server-in-debug-mode" class="md-nav__link">
  762. <span class="md-ellipsis">
  763. Running Meshcentral server in debug mode
  764. </span>
  765. </a>
  766. </li>
  767. <li class="md-nav__item">
  768. <a href="#enabling-trace-in-your-browser-dev-tools" class="md-nav__link">
  769. <span class="md-ellipsis">
  770. Enabling trace in your browser Dev Tools
  771. </span>
  772. </a>
  773. </li>
  774. <li class="md-nav__item">
  775. <a href="#finding-agent-problems" class="md-nav__link">
  776. <span class="md-ellipsis">
  777. Finding agent problems
  778. </span>
  779. </a>
  780. </li>
  781. <li class="md-nav__item">
  782. <a href="#logging-it-all" class="md-nav__link">
  783. <span class="md-ellipsis">
  784. Logging it all
  785. </span>
  786. </a>
  787. </li>
  788. <li class="md-nav__item">
  789. <a href="#restricting-server-to-specific-ips" class="md-nav__link">
  790. <span class="md-ellipsis">
  791. Restricting server to specific IP(s)
  792. </span>
  793. </a>
  794. </li>
  795. <li class="md-nav__item">
  796. <a href="#finding-system-id-types" class="md-nav__link">
  797. <span class="md-ellipsis">
  798. Finding system ID types
  799. </span>
  800. </a>
  801. </li>
  802. <li class="md-nav__item">
  803. <a href="#pull-down-cert-crt-file-from-internet" class="md-nav__link">
  804. <span class="md-ellipsis">
  805. Pull down cert .crt file from internet
  806. </span>
  807. </a>
  808. </li>
  809. </ul>
  810. </nav>
  811. </li>
  812. <li class="md-nav__item">
  813. <a href="#meshagent" class="md-nav__link">
  814. <span class="md-ellipsis">
  815. MeshAgent
  816. </span>
  817. </a>
  818. <nav class="md-nav" aria-label="MeshAgent">
  819. <ul class="md-nav__list">
  820. <li class="md-nav__item">
  821. <a href="#agent-debug-logs-to-server" class="md-nav__link">
  822. <span class="md-ellipsis">
  823. Agent Debug Logs to server
  824. </span>
  825. </a>
  826. </li>
  827. <li class="md-nav__item">
  828. <a href="#determine-agent-capabilities" class="md-nav__link">
  829. <span class="md-ellipsis">
  830. Determine Agent capabilities
  831. </span>
  832. </a>
  833. </li>
  834. <li class="md-nav__item">
  835. <a href="#useful-meshagentmsh-flags" class="md-nav__link">
  836. <span class="md-ellipsis">
  837. Useful MeshAgent.msh flags
  838. </span>
  839. </a>
  840. </li>
  841. <li class="md-nav__item">
  842. <a href="#obtain-generated-msh-file" class="md-nav__link">
  843. <span class="md-ellipsis">
  844. Obtain generated .msh File
  845. </span>
  846. </a>
  847. </li>
  848. <li class="md-nav__item">
  849. <a href="#meshagent-commands" class="md-nav__link">
  850. <span class="md-ellipsis">
  851. MeshAgent Commands
  852. </span>
  853. </a>
  854. </li>
  855. <li class="md-nav__item">
  856. <a href="#on-the-fly-patching-meshagent" class="md-nav__link">
  857. <span class="md-ellipsis">
  858. On the fly Patching MeshAgent
  859. </span>
  860. </a>
  861. </li>
  862. <li class="md-nav__item">
  863. <a href="#agent-debugging-using-meshcore-js-debugger" class="md-nav__link">
  864. <span class="md-ellipsis">
  865. Agent Debugging using MeshCore JS Debugger
  866. </span>
  867. </a>
  868. </li>
  869. <li class="md-nav__item">
  870. <a href="#troubleshooting-agent-connectivity" class="md-nav__link">
  871. <span class="md-ellipsis">
  872. Troubleshooting Agent connectivity
  873. </span>
  874. </a>
  875. </li>
  876. </ul>
  877. </nav>
  878. </li>
  879. <li class="md-nav__item">
  880. <a href="#intel-amt" class="md-nav__link">
  881. <span class="md-ellipsis">
  882. Intel AMT
  883. </span>
  884. </a>
  885. </li>
  886. </ul>
  887. </nav>
  888. </div>
  889. </div>
  890. </div>
  891. <div class="md-content" data-md-component="content">
  892. <article class="md-content__inner md-typeset">
  893. <h1>Debugging</h1>
  894. <h2 id="websockets-video">Websockets Video<a class="headerlink" href="#websockets-video" title="Permanent link">&para;</a></h2>
  895. <p>Make sure you understand how MeshCentral works with your browser using chrome developer tools.</p>
  896. <div class="video-wrapper">
  897. <iframe width="320" height="180" src="https://www.youtube.com/embed/3vI4URd3VzU" frameborder="0" allowfullscreen></iframe>
  898. </div>
  899. <h2 id="meshcentral-server">MeshCentral Server<a class="headerlink" href="#meshcentral-server" title="Permanent link">&para;</a></h2>
  900. <h3 id="useful-configjs-settings">Useful config.js settings<a class="headerlink" href="#useful-configjs-settings" title="Permanent link">&para;</a></h3>
  901. <p><a href="https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json">https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json</a></p>
  902. <div class="highlight"><pre><span></span><code><span class="nt">&quot;AgentsInRAM&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
  903. <span class="nt">&quot;AgentUpdateBlockSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">2048</span><span class="p">,</span>
  904. <span class="nt">&quot;agentUpdateSystem&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
  905. <span class="nt">&quot;noAgentUpdate&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
  906. <span class="nt">&quot;WsCompression&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
  907. <span class="nt">&quot;AgentWsCompression&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
  908. </code></pre></div>
  909. <h3 id="understanding-node-and-paths">Understanding node and paths<a class="headerlink" href="#understanding-node-and-paths" title="Permanent link">&para;</a></h3>
  910. <p>Note that when running MeshCentral, you should always run from the path that is parent to node_modules, so you do this:</p>
  911. <div class="highlight"><pre><span></span><code>cd C:\Program Files\Open Source\MeshCentral
  912. node node_modules\meshcentral
  913. </code></pre></div>
  914. <p>You do NOT do this:</p>
  915. <div class="highlight"><pre><span></span><code>cd C:\Program Files\Open Source\MeshCentral\node_modules\meshcentral
  916. node meshcentral
  917. </code></pre></div>
  918. <p>The problem with the second command is that NPM may install missing modules in the incorrect location.</p>
  919. <p>Also, in general I recommend not using the MeshCentral MSI Installer and just install manually unless you are very scared of the command prompt. Anyone that knows a bit about the shell should install MeshCentral like this:</p>
  920. <div class="highlight"><pre><span></span><code>mkdir c:\meshcentral
  921. cd c:\meshcentral
  922. npm install meshcentral
  923. node node_modules\meshcentral
  924. (ctrl-c when done installing optional modules)
  925. node node_modules\meshcentral --install
  926. </code></pre></div>
  927. <p>This way, you have a lot more control over what is going on. In my opinion, the MSI installer basically does the same thing and installs NodeJS for you.</p>
  928. <h3 id="unable-to-update-server">Unable to update server<a class="headerlink" href="#unable-to-update-server" title="Permanent link">&para;</a></h3>
  929. <p>Generally the problem is that MeshCentral can't find the npm tool and therefore, can't run it to see if there is a new version. You can fix this by setting the path to npm in the config.json like this:</p>
  930. <div class="highlight"><pre><span></span><code><span class="p">{</span>
  931. <span class="w"> </span><span class="nt">&quot;settings&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
  932. <span class="w"> </span><span class="nt">&quot;npmPath&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;c:\\npm.exe&quot;</span><span class="p">,</span>
  933. <span class="w"> </span><span class="nt">&quot;npmProxy&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://1.2.3.4:80&quot;</span>
  934. <span class="w"> </span><span class="p">}</span>
  935. <span class="p">}</span>
  936. </code></pre></div>
  937. <p>The problem could also be that you need a proxy, the configuration line to that is above.</p>
  938. <p>You can also manually update. Just stop your server and so this:</p>
  939. <div class="highlight"><pre><span></span><code>mv<span class="w"> </span>node_modules<span class="w"> </span>node_modules_bak
  940. npm<span class="w"> </span>install<span class="w"> </span>meshcentral
  941. node<span class="w"> </span>node_modules/meshcentral
  942. </code></pre></div>
  943. <p>Then wait for all optional modules to install, then once the server starts hit ctrl-c and start up the server again. You can also use the following to help you start/stop the server:</p>
  944. <div class="highlight"><pre><span></span><code>node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--install
  945. node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--uninstall
  946. node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--start
  947. node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--stop
  948. </code></pre></div>
  949. <h3 id="port-troubleshooting-on-server">Port Troubleshooting on server<a class="headerlink" href="#port-troubleshooting-on-server" title="Permanent link">&para;</a></h3>
  950. <p>If you're getting a <code>port 4433 is not available</code> error, this is because another process 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.</p>
  951. <p>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.</p>
  952. <h3 id="running-meshcentral-server-in-debug-mode">Running Meshcentral server in debug mode<a class="headerlink" href="#running-meshcentral-server-in-debug-mode" title="Permanent link">&para;</a></h3>
  953. <p>Debug more will cause MeshCentral to output a lot of debug messages to the console. To display all debug messages, run MeshCentral like this:</p>
  954. <div class="highlight"><pre><span></span><code>node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--debug
  955. </code></pre></div>
  956. <p>A more practical way to run the debug command it to specify what messages you want printed out using a comma seperated list, for example:</p>
  957. <div class="highlight"><pre><span></span><code>node<span class="w"> </span>node_modules/meshcentral<span class="w"> </span>--debug<span class="w"> </span>web,amt,mps
  958. </code></pre></div>
  959. <p>Here is the list of all debug options:</p>
  960. <div class="highlight"><pre><span></span><code>cookie - Cookie encoder
  961. dispatch - Message Dispatcher
  962. main - Main Server Messages
  963. peer - MeshCentral Server Peering
  964. agent - MeshAgent traffic
  965. agentupdate - MeshAgent update
  966. cert - Server Certificate
  967. db - Server Database
  968. email - Email/SMS/Push Traffic
  969. web - Web Server
  970. webrequest - Web Server Requests
  971. relay - Web Socket Relay
  972. httpheaders - Web Server HTTP Headers
  973. authlog - User Authentication Log
  974. amt - Intel AMT
  975. webrelay - Connection Relay
  976. mps - CIRA Server
  977. mpscmd - CIRA Server Commands
  978. </code></pre></div>
  979. <p>You can also specify the <code>debug</code> option in the config.json file in the <code>settings</code> section. For example:</p>
  980. <div class="highlight"><pre><span></span><code>&quot;settings&quot;: {
  981. &quot;debug&quot;: &quot;web,amt,mps&quot;
  982. }
  983. </code></pre></div>
  984. <h3 id="enabling-trace-in-your-browser-dev-tools">Enabling trace in your browser Dev Tools<a class="headerlink" href="#enabling-trace-in-your-browser-dev-tools" title="Permanent link">&para;</a></h3>
  985. <p>You can enable browser console tracing by adding <code>trace=1</code> as a parameter to the URL of the MeshCentral main web page. For example <code>https://myserver.com/?trace=1</code>. Once present, open the browser's console window to see all web client tracing messages.</p>
  986. <p>To log all database queries, change log_statement in /etc/postgresql/13/main/postgresql.conf</p>
  987. <div class="highlight"><pre><span></span><code># CUSTOM
  988. log_statement = &#39;all&#39; # none, ddl, mod, all
  989. </code></pre></div>
  990. <p>The stacktrace was logged to <code>stdout/journalctl</code>. Supposedly, you can enable debug logging for node modules by adding <code>DEBUG=&lt;modulename&gt;</code> to the environment. </p>
  991. <p>Adding this to <code>/etc/systemd/system/meshcentral.service</code> should do it but it didn't seem to do anything. </p>
  992. <p>I think that's because Mesh uses the trace logging in the browser instead of logging things in the server logs. </p>
  993. <div class="highlight"><pre><span></span><code>Environment=DEBUG=mesh*
  994. </code></pre></div>
  995. <p>If you want to change node to meshcentral in journalctl, add this to /etc/systemd/system/meshcentral.service.</p>
  996. <div class="highlight"><pre><span></span><code>SyslogIdentifier=meshcentral
  997. </code></pre></div>
  998. <h3 id="finding-agent-problems">Finding agent problems<a class="headerlink" href="#finding-agent-problems" title="Permanent link">&para;</a></h3>
  999. <p>Using the servers <code>My Server &gt; console</code></p>
  1000. <ul>
  1001. <li><code>agentstatus</code> - Gives you summary counts of problems</li>
  1002. <li><code>agentissues</code> - Gives IP:port and what error</li>
  1003. <li><code>dupagents</code> - Gives duplicateAgent IP's, counts and names</li>
  1004. </ul>
  1005. <h3 id="logging-it-all">Logging it all<a class="headerlink" href="#logging-it-all" title="Permanent link">&para;</a></h3>
  1006. <p>To log everything that's possible, prepare the log directory.</p>
  1007. <div class="highlight"><pre><span></span><code>mkdir /meshcentral/meshcentral-logs/
  1008. chown tactical:tactical logs
  1009. ln -s ../meshcentral-logs/log.txt /meshcentral/meshcentral-data/log.txt
  1010. </code></pre></div>
  1011. <p>And then add this to your config.</p>
  1012. <div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nt">&quot;meshErrorLogPath&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;/meshcentral/meshcentral-logs/&quot;</span><span class="p">,</span>
  1013. <span class="w"> </span><span class="nt">&quot;authLog&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;/meshcentral/meshcentral-logs/auth.log&quot;</span><span class="p">,</span>
  1014. <span class="w"> </span><span class="nt">&quot;log&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
  1015. <span class="w"> </span><span class="s2">&quot;cookie&quot;</span><span class="p">,</span>
  1016. <span class="w"> </span><span class="s2">&quot;dispatch&quot;</span><span class="p">,</span>
  1017. <span class="w"> </span><span class="s2">&quot;main&quot;</span><span class="p">,</span>
  1018. <span class="w"> </span><span class="s2">&quot;peer&quot;</span><span class="p">,</span>
  1019. <span class="w"> </span><span class="s2">&quot;web&quot;</span><span class="p">,</span>
  1020. <span class="w"> </span><span class="s2">&quot;webrequest&quot;</span><span class="p">,</span>
  1021. <span class="w"> </span><span class="s2">&quot;relay&quot;</span><span class="p">,</span>
  1022. <span class="w"> </span><span class="s2">&quot;webrelaydata&quot;</span><span class="p">,</span>
  1023. <span class="w"> </span><span class="s2">&quot;webrelay&quot;</span><span class="p">,</span>
  1024. <span class="w"> </span><span class="s2">&quot;mps&quot;</span><span class="p">,</span>
  1025. <span class="w"> </span><span class="s2">&quot;mpscmd&quot;</span><span class="p">,</span>
  1026. <span class="w"> </span><span class="s2">&quot;swarm&quot;</span><span class="p">,</span>
  1027. <span class="w"> </span><span class="s2">&quot;swarmcmd&quot;</span><span class="p">,</span>
  1028. <span class="w"> </span><span class="s2">&quot;agentupdate&quot;</span><span class="p">,</span>
  1029. <span class="w"> </span><span class="s2">&quot;agent&quot;</span><span class="p">,</span>
  1030. <span class="w"> </span><span class="s2">&quot;cert&quot;</span><span class="p">,</span>
  1031. <span class="w"> </span><span class="s2">&quot;db&quot;</span><span class="p">,</span>
  1032. <span class="w"> </span><span class="s2">&quot;email&quot;</span><span class="p">,</span>
  1033. <span class="w"> </span><span class="s2">&quot;amt&quot;</span><span class="p">,</span>
  1034. <span class="w"> </span><span class="s2">&quot;httpheaders&quot;</span><span class="p">,</span>
  1035. <span class="w"> </span><span class="s2">&quot;websocket&quot;</span>
  1036. <span class="w"> </span><span class="p">],</span>
  1037. </code></pre></div>
  1038. <p>You'll then have 3 files:</p>
  1039. <div class="highlight"><pre><span></span><code>-rw-rw-r--<span class="w"> </span><span class="m">1</span><span class="w"> </span>tactical<span class="w"> </span>tactical<span class="w"> </span><span class="m">2593</span><span class="w"> </span>Feb<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="m">12</span>:22<span class="w"> </span>auth.log
  1040. -rw-r--r--<span class="w"> </span><span class="m">1</span><span class="w"> </span>tactical<span class="w"> </span>tactical<span class="w"> </span><span class="m">147593</span><span class="w"> </span>Feb<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="m">12</span>:31<span class="w"> </span>log.txt
  1041. -rw-rw-r--<span class="w"> </span><span class="m">1</span><span class="w"> </span>tactical<span class="w"> </span>tactical<span class="w"> </span><span class="m">381</span><span class="w"> </span>Feb<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="m">12</span>:02<span class="w"> </span>mesherrors.txt
  1042. </code></pre></div>
  1043. <p><code>log.txt</code> will now log everything in the Trace tab</p>
  1044. <h3 id="restricting-server-to-specific-ips">Restricting server to specific IP(s)<a class="headerlink" href="#restricting-server-to-specific-ips" title="Permanent link">&para;</a></h3>
  1045. <p>When doing debugging on my development server, I use this line in the settings section to block all agent connections except the agent I want:</p>
  1046. <div class="highlight"><pre><span></span><code>&quot;agentAllowedIp&quot;: [ &quot;192.168.2.147&quot; ],
  1047. </code></pre></div>
  1048. <p>Of course, this is just for debugging.</p>
  1049. <h3 id="finding-system-id-types">Finding system ID types<a class="headerlink" href="#finding-system-id-types" title="Permanent link">&para;</a></h3>
  1050. <p><a href="https://serverurl/meshagents">https://serverurl/meshagents</a> aka trying figure out what this is</p>
  1051. <p><img alt="ID" src="../images/determine-id.png" /></p>
  1052. <h3 id="pull-down-cert-crt-file-from-internet">Pull down cert .crt file from internet<a class="headerlink" href="#pull-down-cert-crt-file-from-internet" title="Permanent link">&para;</a></h3>
  1053. <p><a href="https://github.com/Ylianst/MeshCentral/issues/1662#issuecomment-666559391">See #1662</a> We have run into this challenge before, where our .crt file expired and then all our agents were unable to connect. In our case, the TLS cert was available on the internet, and thus, we were able to use these commands to update it:</p>
  1054. <div class="highlight"><pre><span></span><code><span class="nb">echo</span><span class="w"> </span>-n<span class="w"> </span><span class="se">\|</span><span class="w"> </span>openssl<span class="w"> </span>s_client<span class="w"> </span>-connect<span class="w"> </span>yourdomain.com:443<span class="w"> </span><span class="m">2</span>&gt;<span class="w"> </span>/dev/null<span class="se">\|</span><span class="w"> </span>sed<span class="w"> </span>-ne<span class="w"> </span><span class="s1">&#39;/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p&#39;</span><span class="w"> </span>&gt;<span class="w"> </span>/opt/meshcentral/meshcentral-data/webserver-cert-public.crt
  1055. service<span class="w"> </span>meshcentral<span class="w"> </span>restart
  1056. </code></pre></div>
  1057. <h2 id="meshagent">MeshAgent<a class="headerlink" href="#meshagent" title="Permanent link">&para;</a></h2>
  1058. <p>Troubleshooting agent</p>
  1059. <div class="highlight"><pre><span></span><code>./meshagent<span class="w"> </span>-state
  1060. </code></pre></div>
  1061. <h3 id="agent-debug-logs-to-server">Agent Debug Logs to server<a class="headerlink" href="#agent-debug-logs-to-server" title="Permanent link">&para;</a></h3>
  1062. <p>This automatically downloads all agent error logs into <code>meshcentral-data/agenterrorlogs.txt</code></p>
  1063. <p><a href="https://github.com/Ylianst/MeshCentral/blob/aa58afcc3a5d738177ab7a7b6d0228d72af82b85/meshcentral-config-schema.json#L100">Set</a> in <code>config.json</code></p>
  1064. <div class="highlight"><pre><span></span><code><span class="nt">&quot;agentLogDump&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span>
  1065. </code></pre></div>
  1066. <h3 id="determine-agent-capabilities">Determine Agent capabilities<a class="headerlink" href="#determine-agent-capabilities" title="Permanent link">&para;</a></h3>
  1067. <p>On the server goto the agents console tab. Type:</p>
  1068. <div class="highlight"><pre><span></span><code>info
  1069. </code></pre></div>
  1070. <h3 id="useful-meshagentmsh-flags">Useful MeshAgent.msh flags<a class="headerlink" href="#useful-meshagentmsh-flags" title="Permanent link">&para;</a></h3>
  1071. <p><a href="https://github.com/Ylianst/MeshAgent/blob/master/meshcore/agentcore.h#L190">https://github.com/Ylianst/MeshAgent/blob/master/meshcore/agentcore.h#L190</a></p>
  1072. <div class="highlight"><pre><span></span><code><span class="err">co</span><span class="kc">ntr</span><span class="err">olCha</span><span class="kc">nnel</span><span class="err">Debug=</span><span class="mi">1</span>
  1073. <span class="err">logUpda</span><span class="kc">te</span><span class="err">=</span><span class="mi">1</span>
  1074. </code></pre></div>
  1075. <h3 id="obtain-generated-msh-file">Obtain generated .msh File<a class="headerlink" href="#obtain-generated-msh-file" title="Permanent link">&para;</a></h3>
  1076. <p>If you need a trick to get the .msh file, you can add ?debug=1 to the URL and click "Add Agent", there will be an extra link to download it.</p>
  1077. <h3 id="meshagent-commands">MeshAgent Commands<a class="headerlink" href="#meshagent-commands" title="Permanent link">&para;</a></h3>
  1078. <div class="highlight"><pre><span></span><code>MeshAgent run
  1079. MeshAgent dbTool.js list
  1080. </code></pre></div>
  1081. <p>Forcing Core version from Cmdline</p>
  1082. <ul>
  1083. <li>Download meschore.js and rename to CoreModule.js and put it alongside MeshAgent.exe</li>
  1084. <li>Stop MeshAgent service</li>
  1085. <li>Run <code>MeshAgent.exe dbTool.js import CoreModule</code></li>
  1086. </ul>
  1087. <h3 id="on-the-fly-patching-meshagent">On the fly Patching MeshAgent<a class="headerlink" href="#on-the-fly-patching-meshagent" title="Permanent link">&para;</a></h3>
  1088. <p><a href="https://github.com/Ylianst/MeshAgent/issues/89#issuecomment-949901720">MeshAgent#89 (comment)</a></p>
  1089. <p>There are two ways to do this... When debugging, and making changes, you can modify the .js file directly, and just save it in the same folder as the agent binary... The agent will use the .js file from disc if it's there, if it's newer than the one compiled in the binary. You don't even need to restart the agent. You can just clear the core, and reload the core.....</p>
  1090. <p>When you are satisfied with your changes to the .js file, you can use the clipboard, in the following fashion:</p>
  1091. <div class="highlight"><pre><span></span><code>meshagent<span class="w"> </span>-exec<span class="w"> </span><span class="s2">&quot;require(&#39;clipboard&#39;).nativeAddCompressedModule(&#39;foo&#39;);process.exit();&quot;</span>
  1092. </code></pre></div>
  1093. <p>if the file you modified isn't in the same folder as the agent binary, you can use the following command if you don't want to move the file, and edit it directly in the modules folder:</p>
  1094. <div class="highlight"><pre><span></span><code>meshagent<span class="w"> </span>-exec<span class="w"> </span><span class="s2">&quot;setModulePath(&#39;pathToFolder&#39;);require(&#39;clipboard&#39;).nativeAddCompressedModule(&#39;foo&#39;);process.exit();&quot;</span>
  1095. </code></pre></div>
  1096. <p>This command is just like the previous, except it searches for modules in the path specified.</p>
  1097. <p>Just substitute foo, with the name of the module that you modified. It will load the module from disc, compress it, and save it into the clipboard.. So you can just load up your editor for ILibDuktape_Polyfills.c, and find where that particular module is defined... and paste directly from the clipboard... The clipboard will contain all the necessary C code to uncompress and load the module.</p>
  1098. <p>If the compressed result is relatively long, it will auto break it up into multiple lines to work around an issue with visual studio's maximum string literal limitations.</p>
  1099. <h3 id="agent-debugging-using-meshcore-js-debugger">Agent Debugging using MeshCore JS Debugger<a class="headerlink" href="#agent-debugging-using-meshcore-js-debugger" title="Permanent link">&para;</a></h3>
  1100. <p><a href="https://github.com/Ylianst/MeshAgent/issues/119">(#119)</a> How to test changes to the meshagent and recompile them.</p>
  1101. <ul>
  1102. <li>Copy duktape-debugger.js to the mesh directory on the target machine.</li>
  1103. <li>From the console tab of the agent, enter this command, substituting the port number you want to use instead of 9999
  1104. <code>eval "attachDebugger({ webport: 9999 })"</code></li>
  1105. </ul>
  1106. <p>Then open your browser to http://localhost:9999 or whatever port you used.</p>
  1107. <div class="admonition note">
  1108. <p class="admonition-title">Note</p>
  1109. <p>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.</p>
  1110. </div>
  1111. <h3 id="troubleshooting-agent-connectivity">Troubleshooting Agent connectivity<a class="headerlink" href="#troubleshooting-agent-connectivity" title="Permanent link">&para;</a></h3>
  1112. <p>If an agent keeps disconnecting and reconnecting, add this line to the "settings" section of the config.json:</p>
  1113. <div class="highlight"><pre><span></span><code>&quot;agentping&quot;: 30
  1114. </code></pre></div>
  1115. <p>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:</p>
  1116. <div class="highlight"><pre><span></span><code>&quot;agentpong&quot;: 30
  1117. </code></pre></div>
  1118. <p>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:</p>
  1119. <div class="highlight"><pre><span></span><code>&quot;agentpong&quot;: 90
  1120. </code></pre></div>
  1121. <p>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.</p>
  1122. <p>If you ever get the same problem but on the browser side, you can also use one of these:</p>
  1123. <div class="highlight"><pre><span></span><code>&quot;browserping&quot;: 30
  1124. &quot;browserpong&quot;: 30
  1125. </code></pre></div>
  1126. <p>Same idea, browser side instead of agent side.</p>
  1127. <h2 id="intel-amt">Intel AMT<a class="headerlink" href="#intel-amt" title="Permanent link">&para;</a></h2>
  1128. <p>To debug issues, confirm that Intel AMT is active and there MeshCentral is not showing any red errors on the "Intel AMT" line:</p>
  1129. <p><img alt="" src="../images/amt_troubleshoot1.png" /></p>
  1130. <p>Next, you can go in the "My Server / Trace" tab and enable tracing on the "Intel AMT Manager" like this:</p>
  1131. <p><img alt="" src="../images/amt_troubleshoot2.png" /></p>
  1132. <p>You can then open another tab and select to power off or power on Intel AMT, you should see "performPowerAction" with 2 or 8 depending on power on/off.</p>
  1133. <p><img alt="" src="../images/amt_troubleshoot3.png" /></p>
  1134. </article>
  1135. </div>
  1136. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  1137. </div>
  1138. <button type="button" class="md-top md-icon" data-md-component="top" hidden>
  1139. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
  1140. Back to top
  1141. </button>
  1142. </main>
  1143. <footer class="md-footer">
  1144. <div class="md-footer-meta md-typeset">
  1145. <div class="md-footer-meta__inner md-grid">
  1146. <div class="md-copyright">
  1147. </div>
  1148. </div>
  1149. </div>
  1150. </footer>
  1151. </div>
  1152. <div class="md-dialog" data-md-component="dialog">
  1153. <div class="md-dialog__inner md-typeset"></div>
  1154. </div>
  1155. <script id="__config" type="application/json">{"base": "../..", "features": ["navigation.tabs", "navigation.expand", "navigation.top", "navigation.instant"], "search": "../../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
  1156. <script src="../../assets/javascripts/bundle.525ec568.min.js"></script>
  1157. </body>
  1158. </html>