amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.

Home Page:https://docs.tacticalrmm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error getting mesh device id : did not receive a valid HTTP response

zagub59 opened this issue · comments

Server Info (please complete the following information):

  • OS: Debian 12
  • Browser: Firefox
  • RMM Version (as shown in top left of web UI): 0.18.2

Installation Method:

  • Standard

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 2.7.0
  • Agent OS: Windows Server 2022

Describe the bug
TacticalRMM is set up on a Debian 12 VM behind Nginx Proxy Manager and was working fine on v0.17.

After updating to 0.18.2 and running script "TacticalRMM - Install Mesh Agent if it's not installed", an error is thrown :
Caught exception while downloading 'MeshAgent.exe' from API: "Unable to connect to mesh to get group id information"
===== Stacktrace =====
System.Net.WebException: Le serveur distant a retourn une erreur: (400) Demande incorrecte.
Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

This was working before updating to 0.18.2.

When launching /rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py check_mesh from SSH, I have this error :
Mesh device group: TacticalRMM
Auth token ok:*****************************
Mesh url ok:
ws://127.0.0.1:4430/control.ashx?auth=********************************
Error getting mesh device id:
did not receive a valid HTTP response

I also had to disable the option "Sync Mesh Perms with TRMM:" as I was not able to login to MeshCentral anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Go to an agent in Tactical
  2. Click on Run script
  3. Scroll down to TacticalRMM - Install Mesh Agent if it's not installed and add TRMM_API_KEY in env vars
  4. See error

Expected behavior
Mesh agent downloaded as expected
No error thrown when testing with /rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py check_mesh

Any idea how to deal with it ?

Thank you very much for your help!

Maybe config.json from meshcentral could be useful to debug so here it is 👍 {
"settings": {
"cert": "mesh..com",
"mongoDb": "mongodb://127.0.0.1:27017",
"mongoDbName": "meshcentral",
"WANonly": true,
"minify": 1,
"port": 4430,
"aliasPort": 443,
"redirPort": 800,
"allowLoginToken": true,
"allowFraming": true,
"_agentPing": 60,
"agentPong": 300,
"allowHighQualityDesktop": true,
"_trustedproxy": "CloudFlare,192.168.50.50",
"_tlsOffload": "192.168.50.50",
"agentCoreDump": false,
"compression": true,
"wsCompression": true,
"agentWsCompression": true,
"maxInvalidLogin": { "time": 5, "count": 5, "coolofftime": 30 }
},
"domains": {
"": {
"title": "",
"title2": "",
"titlePicture": "
",
"welcomePicture": "",
"welcomeText": "",
"footer": "
************",
"newAccounts": false,
"certUrl": "https://mesh.****.com",
"geoLocation": true,
"cookieIpCheck": false,
"mstsc": true
}
}
}

For those who might encounter this issue, I had the answer on Discord :
you have to follow steps 4 and 5 of this doc : https://docs.tacticalrmm.com/mesh_integration/#running-your-own-existing-or-separate-meshcentral-server
Thanks again @wh1te909 !