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
3.96k stars 536 forks source link

meshcmd hangs after running a MeshCentral2 cira_setup.mescript #929

Open kriskep opened 4 years ago

kriskep commented 4 years ago

On Linux, the meshcmd script hangs at the end after excecuting a cira_setup.mescript. The CIRA setup is done correctly, but the script does not return, causing some issues in automated setups. Logs:

Setting up MEI...
Setting up LME...
Script Started
Policies removed successfully
Adding root certificate...
Management Presence Server (MPS) successfully added
Found matching (primary) mps: Intel(r) AMT:Management Presence Server 0
Setting policy...
Policy added successfully
Remote Access user interfaces set to: BIOS & OS Enabed
Parsing block parameters
Setting Environment Detection
Environment Detection set successfully
Script Completed
*** UNCAUGHT EXCEPTION: timers.onElapsed() callback handler on '()'  => TypeError: 1 not callable ***
Ylianst commented 4 years ago

I just tested this using 64bit MeshCMD on Windows to a remote machine and it worked for me:

C:\tmp>meshcmd amtscript --host 192.168.2.106 --user admin --pass XXXXXX --script cira-setup.mescript
Script Started
Policies removed successfully
Adding root certificate...
Management Presence Server (MPS) successfully added
Found matching (primary) mps: Intel(r) AMT:Management Presence Server 0
Setting policy...
Policy added successfully
Remote Access user interfaces set to: BIOS & OS Enabed
Parsing block parameters
Setting Environment Detection
Environment Detection set successfully
Script Completed

I see you are running local, I will test with that configuration next...

Ylianst commented 4 years ago

I did not find this problem, but fixed a bunch of other problems I found and it will be all in the next published release.

bmorgenthaler commented 4 years ago

I'm also running into this exact issue on an Ubuntu 18.04.4 LTS system.

$ sudo meshcmd AmtScript --script setup.mescript --pass 'XXXX' Setting up MEI... Setting up LME... Script Started Policies removed successfully Adding root certificate... Management Presence Server (MPS) successfully added Found matching (primary) mps: Intel(r) AMT:Management Presence Server 0 Setting policy... Policy added successfully Remote Access user interfaces set to: BIOS & OS Enabed Parsing block parameters Setting Environment Detection ERROR: WSMAN call failed: Error #400 Script Completed *** UNCAUGHT EXCEPTION: Error: timers.onElapsed() callback handler on '()' => TypeError: 1 not callable ***