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.24k stars 568 forks source link

MeshAgent after move to Windows Server not showing in MeshCentral #5186

Open panenka opened 1 year ago

panenka commented 1 year ago

I made a new installation of MeshCentral on new Windows Server 2022 and restore configuration from old server on W10. IP address and name of server has been changed. Old MeshCentral server has been stopped. It looks that everything works one month, only previously connected MeshAgents are not connected now. I've been tried to uninstall, reninstall Agent from new server, delete group and add agents again, but still is not working. MeshAgent run shows only AutoRetry Conect in xxxxx milliseconds. Didn't found anything on server log from website, I didn't tried to search any other logs on server.

si458 commented 1 year ago

You need to change ur config.json to your new dns name pointing to your new server

Also, you will have to reinstall the agents on ur computers with the new dns name and new ip address

please also follow the bug template in the future as it has information that is needed to help you

panenka commented 1 year ago

my config.json is very empty

{
   "settings": {
      "lanonly": true, 
      "_minify": true
   }, 
   "domains": {
      "": {
         "footer": "a.s.", 
         "newaccounts": false
      }
    }
  }
}
si458 commented 1 year ago

How did u access ur old server? Via a dns name or ip address? You still need to uninstall/reinstall the agent on all ur computers for them to use the new computer name or ip address OR Rename the new server to the old name and change its ip to the old ip and away it should go

panenka commented 1 year ago

Rename is not possible, because old server remains for different usage, only MeshCentral server role has been detached from it. I've been use ip address and dns name too. But it is not configured anywhere on config. So I don't know, where to write it. Name into certificate part?

   "settings": {
    "_cert": "myserver.mydomain.com", 

And ip address? Or is not needed?

si458 commented 1 year ago

An ip address won't work really, it needs to be a dns name..

I don't use the lanonly version, I use it wan based (in the cloud) so you need a dns name

But the issue I think you will have is that all the agents will be looking for the old ip address and dns name So you will need to uninstall the agents on all the machines and install the new version

I'm not 100% sure, maybe @silversword411 has any suggestions?

panenka commented 1 year ago

Tried to add "cert" part into json and discovery (last installer tab). Didn't helped. Changed to Mixed mode and now it is working for my computer. 2nd computer coudn't install agent - ends with error [AD262CB981431433] ..\microscript\ILibDuktape_ScriptContainer.c:1667 (0,0) uncaught: 'cannot read property \x27split\x27 of null'

silversword411 commented 1 year ago

I think we've built migration methods/scripts, but it's of no use after you've lost access to old server, and the ability to script setting changes on all the agents. You should have taken care of this before loosing access to your old server/IP.

And this would be something we'd charge for because it's all custom work.

Uninstall and reinstall with new server that's working is where you're at now...and you should definitely be using DNS names regardless of LAN/WAN because of certs.

panenka commented 1 year ago

Sorry, I don't understand you. I have no problem to access devices and uninstall old agent. But I have problem run installation, because of error above. BTW I've tried install 2 years old version with success, but 3 newer installations couldn't run. AV is disabled.

dasilvasp commented 3 weeks ago

2024-10-18_16h10_18 When trying to install Mesh on a Windows 11 computer, it displays the image error.

The same setup works perfectly on several other machines. I ran sfc /scannow, chkdsk /f /r, with no error logs in the event viewer.

Can you help?

Error: [2024-10-18 03:41:07 PM] [AD262CB981431433] ..\microscript\LibDuktape_ScriptContainer.c:1667 (0,0) uncaught: 'cannot read property \x27split\x27 of null'

Ao tentar instalar o Mesh em um computador com Windows 11, apresenta o erro da imagem.

O mesmo setup funciona perfeitamente em outra várias máquinas. Rodei sfc /scannow, chkdsk /f /r, sem logs de erros no visualizador de eventos.

Podem ajudar?

Erro: [2024-10-18 03:41:07 PM] [AD262CB981431433] ..\microscript\LibDuktape_ScriptContainer.c:1667 (0,0) uncaught: 'cannot read property \x27split\x27 of null'

si458 commented 3 weeks ago

@dasilvasp please look at issues To install meshagent on windows 11 24h2, you must have wmic nstalled first! Then setup meshagent! https://github.com/Ylianst/MeshCentral/issues/6457