Get The Scoop On What's New
Want to know what Plugins4Automate is doing for ConnectWise Automate? Come check out our blog and find out about new products and updates that we are working on! https://www.plugins4labtech.com/blogs/blog

Plugin (mostly) not working for us

Support and questions for using and managing Chocolatey NuGet inside of Labtech
Post Reply
HenningIdrift
Posts: 1
Joined: Mon Apr 08, 2019 7:20 pm

Plugin (mostly) not working for us

Post by HenningIdrift » Thu May 16, 2019 4:43 pm

We only have part of the plugin working. And not the good parts.
Please help/advice us on how to proceed.
We are using version 3.0.0.16 of the chocolatey for automate plugin
We have (a few times) tried dropping all tables and restarting the Database agent to have the tables recreated.
Our CW Automate solution is running onpremise.

In the Chocolatey for automate license info (clicking the rocket) it says valid until june 22, 2019 and Agents Licensed: 1 .

When restarting the Database agent the following error is logged in Plugin_ChocolateyForAutomate_Errors:
LTAgent v190.138 - 5/16/2019 6:33:13 PM - Plugin Error ChocolateyForAutomate, Version=3.0.0.16, Culture=neutral, PublicKeyToken=null: SetSQLColumn count doesn't match value count at row 2:::

Observations so far, these WORK:
It seems to deploy the chocolatey toolkit ok to all computers after enabling a location
We can run a version scan from the location view of an applcation, and the scripts are run on each agent and a chocolatey inventory is updated with number of apps etc. correctly (all applications) (GetVersions command in SQL table)

PUSH ALL WORKSTATIONS
Attempt to push install a applcation to all workstations results in the following message in Plugin_ChocolateyForAutomate.txt log on the labtech server:
Command Manager has [1] pending commands:::
LTAgent v190.138 - 5/16/2019 3:24:32 PM - Plugin ChocolateyForAutomate, Version=3.0.0.16, Culture=neutral, PublicKeyToken=null: Failed execution of commands - Index (zero based) must be greater than or equal to zero and less than the size of the argument list.:::
LTAgent v190.138 - 5/16/2019 3:24:32 PM - Plugin ChocolateyForAutomate, Version=3.0.0.16, Culture=neutral, PublicKeyToken=null: Chocolatey_Command_Manager completed.:::

And no command or scripts can be seen attempted to run on the agent.
Observing the SQL I can see an insert into plugin_p4l_chocolatey_commands with InstallAllWorkstations command beeing done, with the correct clientid and issuedate, and I can see the executedate beeing updated when running, but nothing happening on the agent/endpoint.

PUSH SINGLE WORKSTATION
Running an install on a single workstation has simular symptoms to all workstation, command logged in SQL is Install
We get the same error in Plugin_ChocolateyForAutomate.txt "Index (zero based) must be greater than..."
However we CAN see a command (not a script) beeing run on the single workstation, and this actually seem to install the application correctly.
For the application I am testing with (7zip.install) it logs the following execute command in labtech:
"cmd!!! /C C:\programdata\Chocolatey\choco.exe install 7zip.install -y"
We have tried both with the application installed and uninstalled and it installs if not installed and gives an error that already installed if it's already installed.
While it does install the application, it DOES not update the SQL plugin_p4l_chocolatey_commands table with executedate, it simply stays (NULL) and thus this command is repeatedly attempted every 10 minute cycle until
we manually delete the row from SQL or insert an executedate manually in the table.

UPDATE SINGLE WORKSTATION and UPDATE ALL WORKSTATIONS
Seems to work ok from Plugin_ChocolateyForAutomate.txt , we can see there is [1] pending commands and the SQL plugin_p4l_chocolatey_commands get updated with executedate,
command (in table) is UpdateC for single workstation and UpdateClient for all.
On UPDATE ALL we get a line per workstation in Plugin_ChocolateyForAutomate.txt:
Exectuing commands on agent ID 5879 Command = UpdateClient App = 7zip.install:::

However nothing happens on any of the workstations, no command or script can be observed running to trigger chocolate and actually do any work.

REMOVE SINGLE WORKSTATION.
Remove command is logged in SQL plugin_p4l_chocolatey_commands but upon execution it DOES not update the SQL plugin_p4l_chocolatey_commands table with executedate.
Since the executedata is not updated, this command is reattempted each 10 minute cycle.
Plugin_ChocolateyForAutomate.txt displays the following error:
LTAgent v190.138 - 5/16/2019 6:26:59 PM - Plugin ChocolateyForAutomate, Version=3.0.0.16, Culture=neutral, PublicKeyToken=null: Failed execution of commands - Index (zero based) must be greater than or equal to zero and less than the size of the argument list.:::
It does run a command (no script) doing an "cmd!!! /C C:\programdata\Chocolatey\choco.exe uninstall 7zip.install -y" and this seems to work correctly.

REMOVE ALL WORKSTATIONS (UNTESTED)
This is not tested, we don't want to play with that before the others are working.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest