Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.29k stars 573 forks source link

Windows Server 2016 Crash #4759

Open sysopdm opened 2 years ago

sysopdm commented 2 years ago

Describe the bug When logging off a Windows Server 2016 machine with the Mesh Agent installed, the server crashes and reboots.

I had this happen on multiple machines for several customers now. The common denominator appears to be all running Windows Server 2016.

To Reproduce Steps to reproduce the behavior: Log off Windows Server 2016 machine and click disconnect button and within a few seconds, server (agent) crashes and reboots.

Expected behavior The remote machine shouldn't crash.

Screenshots If applicable, add screenshots to help explain your problem.

Server Software (please complete the following information):

Client Device (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

{
  "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "_cert": "myserver.mydomain.com",
    "_WANonly": true,
    "_LANonly": true,
    "_sessionKey": "MyReallySecretPassword1",
    "_port": 443,
    "_aliasPort": 443,
    "_redirPort": 80,
    "_redirAliasPort": 80
  },
  "domains": {
    "": {
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "myemail@mydomain.com",
    "names": "myserver.mydomain.com",
    "production": false
  }
}
smartekIT commented 2 years ago

It does the same with me when logging into Windows11 and the connection to the agent some how drops, the meshcentral server installed on ubuntu crashes and restart the service without showing any errors on the meshcentral server log.

smartekIT commented 2 years ago

@Ylianst can we please get your attention on this? Thanks heaps

mbsouth commented 1 year ago

@sysopdm

To Reproduce Steps to reproduce the behavior: Log off Windows Server 2016 machine and click disconnect button and within a few seconds, server (agent) crashes and reboots.

Same here for several machines.

krayon007 commented 1 year ago

The wording is a little confusing. Are you saying the agent is crashing or the server is crashing?

sysopdm commented 1 year ago

The wording is a little confusing. Are you saying the agent is crashing or the server is crashing?

Not the MeshCentral Server, it's the Windows Server 2016 machine running the agent that crashes, crashes and reboots.

Frostfach commented 1 year ago

i can confirm this Bug - i can provide a minidump from a Server 2016 that crashed at logon of a User.

si458 commented 1 year ago

im not seeing this issue at all? i run the agent on a server 2016 active directory and i login/logout over RDP every day? have you tried updating to the latest agent release from december 2022? you also dont say what version of meshcentral you are running, please can you try updating to the latest version of it also

sysopdm commented 1 year ago

Running MC version 1.1.1 / Agent Version Compile Time: 12:12:34, Dec 9 2022 When use you RDP it works flawlessly every time, no issues. The problem is when you go to Desktop -> Connect Session starts fine, you do what you need to do and you logout of Server 2016, the Server 2016 will crash within a few seconds. It's a strange one, I know.

si458 commented 1 year ago

When use you RDP it works flawlessly every time, no issues. The problem is when you go to Desktop -> Connect

oh you mean a physical logoff not a virtual one! hmmm will try later with our AD and see what happens, dont want to upset the site in the middle of the day haha

si458 commented 1 year ago

@sysopdm ive just tried 'server 2016' on proxmox, no issues here? fresh install with all updates, logged in using the vnc console on proxmox, then connected with meshcentral, signed out and no reboots? even tried logging in from meshcentral then signing out, its just not crashing the server or the agent? what services do you have installed on the server 2016?

sysopdm commented 1 year ago

Only role is AD at the moment.

From: Simon Smith @.> Reply-To: Ylianst/MeshCentral @.> Date: Thursday, January 19, 2023 at 11:32 AM To: Ylianst/MeshCentral @.> Cc: sysopdm @.>, Mention @.***> Subject: Re: [Ylianst/MeshCentral] Windows Server 2016 Crash (Issue #4759)

@sysopdm ive just tried it 'server 2016' on proxmox, no issues here? fresh install with all updates, logged in using the vnc console on proxmox, then connected with meshcentral, signed out and no reboots? even tried logging in from meshcentral then signing out, its just not crashing the server or the agent? what services do you have installed on the server 2016?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

si458 commented 1 year ago

@sysopdm OOOOO i dont know what i did but i got it to crash!? server-2016-error

sysopdm commented 1 year ago

Maybe a memory leak somewhere?

From: Simon Smith @.> Reply-To: Ylianst/MeshCentral @.> Date: Thursday, January 19, 2023 at 12:39 PM To: Ylianst/MeshCentral @.> Cc: sysopdm @.>, Mention @.***> Subject: Re: [Ylianst/MeshCentral] Windows Server 2016 Crash (Issue #4759)

@sysopdm OOOOO i dont know what i did but i got it to crash!?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

si458 commented 1 year ago

@sysopdm no matter what i try now, i cant get it to crash again now @Frostfach @mbsouth what is your server setup? what roles are installed? do any of you do something in particular while in your session and then log out for it to crash? e.g open certain files, change settings, updates?

sysopdm commented 1 year ago

No, I could just login and logout and it’ll crash, I agree, it doesn’t crash everytime for me as well, maybe 1 out 3 times?

Only have the AD & DNS roles installed (It’s a DC).

From: Simon Smith @.> Reply-To: Ylianst/MeshCentral @.> Date: Thursday, January 19, 2023 at 1:18 PM To: Ylianst/MeshCentral @.> Cc: sysopdm @.>, Mention @.***> Subject: Re: [Ylianst/MeshCentral] Windows Server 2016 Crash (Issue #4759)

@sysopdm no matter what i try now, i cant get it to crash again now @Frostfach @mbsouth what is your server setup? what roles are installed? do any of you do something in particular while in your session and then log out for it to crash? e.g open certain files, change settings, updates?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

mbsouth commented 1 year ago

@Frostfach @mbsouth what is your server setup? what roles are installed?

Sorry for the delay...!

Frostfach commented 1 year ago

you don't have to say sorry ;) it's great that you do that Job! For my Part its all VM's running on VMWare ESXI 7.3 and above - i have had the problem with a Terminal Server, AD, Fileserver, App Server (but as @sysopdm mentioned it happens not all the time - for me it's 1 out of 10 i would say ?!? ).... so no real same base for the same error - exeppt in only happend for me on Windows Server 2016 - Windows Server 2022 did not jet show this error to me

sysopdm commented 1 year ago

Same here,  only happened on server 2016.On Feb 2, 2023, at 3:07 AM, Frostfach @.***> wrote: you don't have to say sorry ;) it's great that you do that Job! For my Part its all VM's running on VMWare ESXI 7.3 and above - i have had the problem with a Terminal Server, AD, Fileserver, App Server .... so no real same base for the same error - exeppt in only happend for me on Windows Server 2016 - Windows Server 2022 did not jet show this error to me

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

silversword411 commented 1 year ago

There's a memory leak on 2016 I believe, monitor memory and see if it's crashing because of resource exhaustion.

Frostfach commented 1 year ago

Okay, i have scanned as @silversword411 recomended for memory leaks. But for me today one Terminal Server crashed twice after logoff from the console User, there was no memory leak that i could see at that point. Again Server 2016 on ESXI ...

n1smithy commented 4 months ago

Same here. After Installing the Agent in the first minutes disconnecting was okay, but after a few minutes or when I tried to log the user out, the server crashed. That's way noooot good!

si458 commented 4 months ago

@n1smithy yes sadly this hasn't been fixed yet.

so the best way is to not logout if u use the connect button!

Just use the disconnect button in the webui instead and leave the user logged in (not ideal I no!)

U can however, use the rdp connect button instead, which works a treat :)

n1smithy commented 4 months ago

Hey Simon, how are you?

Well, the problem is, that RDP does not work with my Docker-and-external-reverse-proxy-configuration. And I dunno if the reverse proxy is the problem. :-/

si458 commented 4 months ago

@n1smithy open a discussion on github, include all ur configs like reverse proxy, Docker compose, config.json, username/domain u use to login to the rdp with and we can have a look.

Off the top of my head, make sure that rdp is enabled on ur server and nla is enabled too.