Open tomsik-radek opened 4 months ago
yes we are aware, no idea why it happens, im going to try and look into it now i can build the agents myself for all platforms it happens on linux too, a simple fix is to monitor its usage and if above say 500mb, then restart the service
yes we are aware, no idea why it happens, im going to try and look into it now i can build the agents myself for all platforms it happens on linux too, a simple fix is to monitor its usage and if above say 500mb, then restart the service
Would there be a way to do this internally? I don't have any monitoring software I could use. At most restart the service every x days. And I assume there is no way to "remote into" the agent? One of the dependencies has to be leaking, right?
Would a ProcessExplorer memory dump help? Do you know anyone who can read it? The file is almost a gig btw.
you can run service restart
from the console
tab of the device in meshcentral, this will restart the service 👍
I got same problem with high memory usage of meshagent on all platform: Linux, Windows, VPS... I haven't heard problem from Mesh server hosting on Public IP. From the post of @krayon007 and Meshcentral documentation:
The “AgentPong” line instructs the server to send data to the agent each 300 seconds and the agent by default will send data to the server every 120 seconds. As long as NGINX timeouts are longer than this, connections should remain open.
So agent try to send data every 120 sec to server with only 60 sec (default value of NGINX) timeout of Nginx Proxy Manager (NPM), making connection still open, maybe a bug. Meshagent will create more new connections and memory leaked. My Meshcentral server put behind NPM, I tried to put this in advanced tab, greater than 120 sec:
proxy_read_timeout 200s;
proxy_connect_timeout 200s;
proxy_send_timeout 200s;
Seem memory problem gone.
I haven't tried on other reversed proxy but I think all are same problem.
Hope it help.
I have don't have either ping or pong enabled.
{
"settings": {
"Cert": "snip",
"WANonly": true,
"Port": 4430,
"AliasPort": 443,
"RedirPort": 800,
"AllowLoginToken": true,
"AllowFraming": true,
"AllowHighQualityDesktop": true,
"TlsOffload": "127.0.0.1",
"agentCoreDump": false,
"Compression": true,
"WsCompression": true,
"AgentWsCompression": true,
"PublicPushNotifications": true,
"WebRTC": true,
"webrtcConfig": {
"iceServers": [
{ "urls": "stun:stun.services.mozilla.com" },
{ "urls": "stun:stun.l.google.com:19302" }
]
},
"MaxInvalidLogin": {
"time": 5,
"count": 5,
"coolofftime": 30
},
"postgres": {
"user": "snip",
"password": "snip",
"port": "5432",
"host": "localhost"
}
},
"domains": {
"": {
"Title": "snip Support",
"NewAccounts": false,
"CertUrl": "https://snip.com:443/",
"GeoLocation": true,
"allowSavingDeviceCredentials": true,
"CookieIpCheck": false,
"mstsc": true,
"altmessenging": {
"name": "Jitsi",
"url": "https://meet.jit.si/myserver-{0}"
},
"SessionRecording": {
"onlySelectedUsers": true,
"onlySelectedUserGroups": true,
"onlySelectedDeviceGroups": true,
"index": true,
"maxRecordingDays": 120,
"protocols": [
1,
2,
200
]
}
}
}
I do use this to monitor and restart mesh agent. https://github.com/amidaware/community-scripts/blob/main/scripts_staging/Win_Mesh_CheckForAgentProblems.ps1
Agreed it's something to do with agents disconnecting from the mesh a lot, either sleep, stuttering network connect or the link
"_unknownUserRootRedirect": "https://www.youtube.com/watch?v=2Q_ZzBGPdqE",
I see you copied the advanced config example for the most part...I thought that was a good addition :)
"_unknownUserRootRedirect": "https://www.youtube.com/watch?v=2Q_ZzBGPdqE",
I see you copied the advanced config example for the most part...I thought that was a good addition :)
How did I miss that one? It needs an XcQ link.
I got same problem with high memory usage of meshagent on all platform: Linux, Windows, VPS... I haven't heard problem from Mesh server hosting on Public IP. From the post of @krayon007 and Meshcentral documentation:
The “AgentPong” line instructs the server to send data to the agent each 300 seconds and the agent by default will send data to the server every 120 seconds. As long as NGINX timeouts are longer than this, connections should remain open.
So agent try to send data every 120 sec to server with only 60 sec (default value of NGINX) timeout of Nginx Proxy Manager (NPM), making connection still open, maybe a bug. Meshagent will create more new connections and memory leaked. My Meshcentral server put behind NPM, I tried to put this in advanced tab, greater than 120 sec:
proxy_read_timeout 200s;
proxy_connect_timeout 200s;
proxy_send_timeout 200s;
Seem memory problem gone.
I haven't tried on other reversed proxy but I think all are same problem. Hope it help.
Will try and report back, thanks
It needs an XcQ link.
I considered that...but decided to go another way 🤣
you can run
service restart
from theconsole
tab of the device in meshcentral, this will restart the service 👍
yes I'm aware, but there doesn't seem to be a way to do it automatically other than a script
Linux is easy, just a cron to restart systemtl, but Windows Task Scheduler can't restart a service or a process.
Sure it can, just script the powershell above. I use TRMM to monitor/fix for now till we find all the leaks.
but Windows Task Scheduler can't restart a service or a process.
Sure it can, just script the powershell above. I use TRMM to monitor/fix for now till we find all the leaks.
but Windows Task Scheduler can't restart a service or a process.
TRMM? By the name I'm guessing it's an RMM software, but it's too generic for google
Ah, TRMM. Yeah, I have been eyeing that for a while. Shame it's hardcoded for port 443. I will need to try this out. Hopefully the RDP experience is less crap than MeshCentral
@tomsik-radek tacticalrmm use meshcentral for its remote control and i believe also the rdp, if meshcentrals RDP is CRAP, then plz do explain or open an issue if you are having issues!
@tomsik-radek tacticalrmm use meshcentral for its remote control and i believe also the rdp, if meshcentrals RDP is CRAP, then plz do explain or open an issue if you are having issues!
I apologize. I shouldn't have said it like that. I do have many issues with the RDP implementation, but as you said, those belong in a separate tickets. Meaningless insults like this are... meaningless. There is no use in saying "this sucks" without saying why. I'm aware TacticalRMM is built on top of MeshCentral.
UI is always difficult to perfect.
Mesh working in the constraints of a browser makes it even harder.
TRMM isn't built on mesh. TRMM uses and integrates with mesh via its software interface. It uses it for the desktop, file and remote terminal features, everything else is completely separate via a separate agent.
@Shivangraj yes don't worry about that, if u check with ps aux
u can see it did restart, the is just a warning
Need to look into why it shows that error?
service restart
getting error for ubuntu
`> service restart Command returned an exception error: waitExit() aborted because thread is exiting
service restart Command returned an exception error: waitExit() aborted because thread is exiting sudo service restart`
Will it fail if you restart it with systemctl?
Describe the bug I have encountered this on both Linux (Debian and Fedora) and Windows Server 2022. Right now I only see it on Windows, so I'm reporting this as a Windows issue. Agent is customized with my name
To Reproduce Steps to reproduce the behavior:
Screenshots![image](https://github.com/Ylianst/MeshCentral/assets/37541545/8f2675d5-c820-4042-bb06-7326e07802e4)
Server Software (please complete the following information):
Remote Device (please complete the following information):
Additional context Add any other context about the problem here.
Your config.json file
"Custom NGINX Configuration" in NGINX Proxy Manager