MeshCentral
MeshCentral copied to clipboard
Issues with Windows Agent Features
My current setup is a Windows Server running IIS on the front, and a MeshCentral Server on an Ubuntu Virtual Server in the back. I have it running through a Reverse Proxy in IIS with the websockets working properly. Everything was working for a while.
My current issue: I can no longer gain access to Desktop, Terminal, Files, etc... I can only see General, Events, Details, and Console.
- The agent will not respond to console commands
- I have tried to clear core and upload both default and recovery cores
- I have tried to uninstall and reinstall the agent
- I have renamed node and did another npm pull
- I have gone to latest version, and stable version
- I have restarted the server (both linux and windows)
- I have tried to install both from direct in mesh, and from invitation link
- I have tried both 32bit and 64bit installs (just in case)
The only thing I see is the status of the agent connected, nothing else seems to respond. Interestingly enough, if I install the Assistant on the same machine, that allows me all features.
Please let me know if you have any ideas or solutions.
please can you follow the bug report template in the future as it has critical information to help with your issue what version are you using? how are the windows server and ubuntu VM connected together? what hypervisor are you using?
My current MeshCentral version setting right now is Stable - 1.0.0, I was using Latest 1.0.45.
I am using VMWare Workstation on the Windows Server, the network connection is set to "Bridged" and set to replicate the physical network connection state.
Here is my config.json
{
"__comment__" : "This is a sample configuration file, edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
"settings": {
"Cert": "jiynn.xyz",
"MongoDb": "mongodb://127.0.0.1:27017/meshcentral",
"_MongoDbCol": "meshcentral",
"WANonly": false,
"LANonly": false,
"_Minify": 1,
"_SessionTime": 30,
"_SessionKey": "MyReallySecretPassword",
"Port": 4430,
"RedirPort": 800,
"AgentPong": 300,
"AliasPort": 443,
"_AllowLoginToken": true,
"_AllowFraming": true,
"_WebRTC": false,
"_SelfUpdate": true,
"_UserAllowedIP": "127.0.0.1,::1,192.168.0.100",
"_LocalDiscovery": { "name": "Local server name", "info": "Information about this server" },
"TlsOffload": "127.0.0.1,192.168.50.200,::1",
"_MpsTlsOffload": true
},
"domains": {
"": {
"title": "MeshCentral",
"_title2": "Servername",
"userQuota": 1048576,
"meshQuota": 248576,
"newAccounts": 1,
"footer": "https://adamjtimmons.us.to",
"certUrl": "jiynn.xyz:443",
"image": "agent-logo.png"
},
"customer1": {
"dns": "customer1.myserver.com",
"title": "Customer1",
"title2": "TestServer",
"newAccounts": 1,
"auth": "sspi",
"footer": "Test",
"_certUrl": "https://192.168.2.106:443/"
},
"info": {
"share": "C:\\ExtraWebSite"
}
},
"letsencrypt": {
"email": "[email protected]",
"names": "jiynn.xyz",
"rsaKeySize": 3072,
"production": false
},
"_peers": {
"serverId": "server1",
"servers": {
"server1": { "url": "wss://192.168.2.133:443/" },
"server2": { "url": "wss://192.168.1.106:443/" }
}
},
"_smtp": {
"host": "smtp.myserver.com",
"port": 25,
"from": "[email protected]",
"tls": false
}
}
My current MeshCentral version setting right now is Stable - 1.0.0, I was using Latest 1.0.45.
i dont believe rolling back is possible as an upgrade might have database changes which an older version cant understand can you try running the latest version and see if you still have these issues?
I already have gone back and forth in order to see if the issues remained, uninstalling and reinstalling the agent as this was done. Still no luck
can you try doing a complete fresh install of the server and the agent on another computer?
can you also go into the My Server
tab, is the anything listed under the Server State
section?
like invalid signature
can you also see if the is any server errors using the show server error log
in the My Server
tab?
can you also go into the console
on the My Server
tab and type info
and let us know the reply?
Server Has no Error Logs Nothing weird listed under server state
info{ "meshVersion": "v1.0.45", "nodeVersion": "v17.9.0", "runMode": "Hybrid (LAN + WAN) mode", "productionMode": true, "database": "MongoDB", "dbChangeStream": false, "dbBulkOperations": false, "platform": "linux", "arch": "x64", "pid": 16181, "uptime": 815.215707015, "cpuUsage": { "user": 6780659, "system": 4097983 }, "memoryUsage": { "rss": 156852224, "heapTotal": 43814912, "heapUsed": 41438128, "external": 48884378, "arrayBuffers": 47799412 }, "warnings": [ { "msg": "Redirection web server must be active on port 80 for Let's Encrypt to work." } ], "allDevGroupManagers": [] }
What windows server version are you running?
Windows Server 2019 Standard v1809
"warnings": [ { "msg": "Redirection web server must be active on port 80 for Let's Encrypt to work." } ],
how are you doing the SSL? you said its IIS doing reverse proxy to the Ubuntu VM?
EDIT:
"letsencrypt": { "email": "[email protected]", "names": "jiynn.xyz", "rsaKeySize": 3072, "production": false },
i think this can be commented out/removed if the IIS is doing the SSL certificate
I also run SSL through LetsEncrypt on my IIS server, I'll comment it out.
https://discord.gg/2nmGP8hq - unoffical meshcentral discord might be easier chatting here, saves comment after comment after comment
One thing you can try is to stop the agent background service, then try to run the agent in console mode, to see what if any errors are reported.
You can run it this way:
MeshAgent run
One thing you can try is to stop the agent background service, then try to run the agent in console mode, to see what if any errors are reported.
You can run it this way:
MeshAgent run
OMG i never knew that, just tried that haha, amazing!
C:\Program Files\Mesh Agent>meshagent run Connecting to: wss://jiynn.xyz:443/agent.ashx Connected.
That's all I get
There must be something the server doesn't like. It looks like the agent connects fine, but the server isn't sending a core to the agent. It looks like the control channel is not authenticating.
Well, interestingly enough, I started another computer I had installed an agent on before this issue showed up, and it works perfectly fine, all features available and responding to console commands... Not sure what has changed, but new installs don't work.
So it seems the issue was the DB and MSH files... they are not generating correctly... I've had to take working DB and MSH files from another computer that connects properly and share those with the ones not working... Is there a way to fix these files for future installs?
Do you know which entry in the msh file was causing the problem?
I think it was the Mesh ID, when running the server manually, I got this error message:
Agent connected with invalid domain/mesh, holding connection (192.168.50.199:61958, mesh//$pXomGb0tsgX743csZyZzRqEIr9Ab0pIEJ@8uc6u1Cx9$DlX0xTt6rxpyVZlvkpd).
I did have to replace the DB file as well
I'm a little late to the party, however, I noticed a couple of things with your configuration file:
-
I assume you're running your server in hybrid mode, so why don't you just comment out
WANonly
andLANonly
? -
You appear to be offloading TLS to your IIS server, yet your
TlsOffload
setting appears to be pointing at the MC server itself. Shouldn't it be pointed at the IIS server?
I have the same issue, while using IIS as a reverse proxy.
@chk-mytoys I'm going to close this issue as its stale. Please can you open a fresh bug report, follow its template and include all the info it wants and I can have a fresh look!