MeshCentral icon indicating copy to clipboard operation
MeshCentral copied to clipboard

Meshagent in windows server not showing in meshcentral

Open sufailDesk opened this issue 2 years ago • 10 comments

Meshagent has copied into windows server after connecting through RDP and then installed in it. But it is not showing in meshcentral like other agents which are running in my physical machines.

sufailDesk avatar Aug 17 '22 04:08 sufailDesk

Is should work. Stop the agent service, open an administrator command prompt, got to "c:\program files\mesh agent" (or what ever you path is) and running the meshagent like this:

meshagent.exe run

It have the agent run in console mode and see if it's connecting or what it's trying to do. Hopefully it will be clear what is going on.

Ylianst avatar Aug 17 '22 04:08 Ylianst

I'm seeing this too after a period of time, Restart the meshcentral server itself then suddenly the device being added shows up? (Restarting the agent didn't help)

si458 avatar Aug 17 '22 05:08 si458

When I run MeshCentral.exe run it returns Unable to open database (1/10) Unable to open database (2/10).......

sufailDesk avatar Aug 17 '22 07:08 sufailDesk

Did you stop the background service first, before running the command line?

krayon007 avatar Aug 17 '22 14:08 krayon007

Yes, I did. Console returns AutoRetry Connect in 2909 milliseconds AutoRetry Connect in 3709 milliseconds AutoRetry Connect in 5259 milliseconds

sufailDesk avatar Aug 18 '22 05:08 sufailDesk

Created an account just to add-on that were having the same issue. Brand new agents are not appearing in the Console (either searching or just showing up) until the service is restarted. We are running 1.0.63, Mongodb 6.0. Verified in Trace that the agent is "new" and "verified agent connection" but does not appear in the list. Rebooted both Mesh and Mongo and upon Login, the agents appeared OK.

kberrylst avatar Aug 18 '22 16:08 kberrylst

Created an account just to add-on that were having the same issue. Brand new agents are not appearing in the Console (either searching or just showing up) until the service is restarted. We are running 1.0.63, Mongodb 6.0. Verified in Trace that the agent is "new" and "verified agent connection" but does not appear in the list. Rebooted both Mesh and Mongo and upon Login, the agents appeared OK.

@kberrylst do you have session recording enabled at all? i found with it enabled this happened very frequently, but disabled it and it seems to be fine now?

si458 avatar Aug 18 '22 18:08 si458

Created an account just to add-on that were having the same issue. Brand new agents are not appearing in the Console (either searching or just showing up) until the service is restarted. We are running 1.0.63, Mongodb 6.0. Verified in Trace that the agent is "new" and "verified agent connection" but does not appear in the list. Rebooted both Mesh and Mongo and upon Login, the agents appeared OK.

@kberrylst do you have session recording enabled at all? i found with it enabled this happened very frequently, but disabled it and it seems to be fine now?

Yes we do have session recording enabled.

kberrylst avatar Aug 18 '22 18:08 kberrylst

Created an account just to add-on that were having the same issue. Brand new agents are not appearing in the Console (either searching or just showing up) until the service is restarted. We are running 1.0.63, Mongodb 6.0. Verified in Trace that the agent is "new" and "verified agent connection" but does not appear in the list. Rebooted both Mesh and Mongo and upon Login, the agents appeared OK.

@kberrylst do you have session recording enabled at all? i found with it enabled this happened very frequently, but disabled it and it seems to be fine now?

Yes we do have session recording enabled.

try disabling it, restart meshcentral, see how you get on as that seems to fix it for me

si458 avatar Aug 18 '22 18:08 si458

Related - #4374 There was an older report of this bug, which was closed with no resolution - https://github.com/Ylianst/MeshCentral/issues/1691

I can confirm we're observing the exact same symptom (session recording enabled). When installing the MeshAgent on a new end user device, the server log presents the following (at this stage the device hasn't appeared in Mesh):

4:41:55 PM - AGENT: Verified agent connection to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (XXX.XXX.XXX.XXX:17510). 4:41:55 PM - AGENT: New agent at XXX.XXX.XXX.XXX:17510

After a restart of Mesh, the server log shows the below and the device appears:

4:47:08 PM - AGENT: Verified agent connection to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (XXX.XXX.XXX.XXX:39475). 4:47:08 PM - AGENT: New agent at XXX.XXX.XXX.XXX:39475 4:47:08 PM - WEBREQUEST: (XXX.XXX.XXX.XXX) /agent.ashx/.websocket 4:47:08 PM - HTTPHEADERS: GET, /agent.ashx/.websocket, {"host":"MESHCENTRAL.DOMAIN.COM","upgrade":"websocket","connection":"Upgrade","sec-websocket-key":"XXXXXXXXXXXX","sec-websocket-version":"13"} 4:47:04 PM - AGENT: Agent disconnect XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (XXX.XXX.XXX.XXX:38766) id=Unknown

Confirming the below facts:

  • Attempting meshcentral.exe run, simply produces:
    • Connecting to: wss://MESHCENTRAL.DOMAIN.COM:443/agent.ashx perpetually
  • Session recording is enabled
  • Multicasting for mesh/amt is disabled
  • Nothing being blocked by the firewall
  • The issue is always fixed immediately following a restart of the MeshCentral service and for a short while thereafter, new MeshAgent installs will connect in as expected

Shane1390 avatar Aug 25 '22 03:08 Shane1390

PLEASE FOLLOW #4449

si458 avatar Oct 31 '23 23:10 si458