Page 2 of 5

Re: C4A groups no populating

Posted: Tue Jun 04, 2024 4:25 pm
by Cubert
Ah, that's not right... Let me go check, it should be getting the same Group ID as the rest of the sub groups.

Won't hurt anything and will work as normal just not tucked away inside master group.

Re: C4A groups no populating

Posted: Wed Dec 18, 2024 8:16 pm
by PL-MSTech
I got frustrated with trying to make this work over a year ago and although have not used it, have kept the subscription running, intending to get back to it once some of the bugs got straightened out.... hopefully some have.

Looking at it today, I noticed the same issue... the EDFs were selected, but they were not populating into the groups (all search settings and scripts were correct) - so I went into each client, DE-selected Enable Servers, Enable Workstations, and Auto Install Approved Applications, then RE-selected them, and the machines are starting to populate into the groups.... so hopefully THAT part is working.

In attempting to set the "Approved Applications", I have gone into the main plugin interface and selected the apps I want to be enabled for all clients across the board (including the compatibility extension, windowsupdate extension, and core extension.... as well as 7-zip) - I went into each of those and executed Install Application Globally, opened each of them again and executed "Enable Application". I have waited a while, but when I go back into the client screen, there are still NO packages in "Managed Applications".
What do I need to do to make apps "Managed Applications" GLOBALLY without having to do it in each client?

And is it possible for you guys to make more searches for us to verify that everything is working properly (or help identify where it is breaking)? We can do it manually with some searches and scripts, but some should be provided.... such as a search group for "Failed Deployment", "Failed installation of Managed Applications", "No Managed Applications for these clients", and probably some others.

Thanks

Re: C4A groups no populating

Posted: Thu Dec 19, 2024 6:29 pm
by Cubert
Sorry for the delay, I started writing this post when I arrived this morning and here it is nearly 2 PM and I finally got put together a video that will guide you through the basics of Chocolatey for Automate Version 3.7

Please forgive my production value,

https://youtu.be/Zhnpq4Y9suk


First things we want to check, are you on the latest build 3.7.2? Lots has changed over the last year so making sure we are up to date will help us resolve your issues.


What do I need to do to make apps "Managed Applications" GLOBALLY without having to do it in each client?
The design of Chocolatey for Automate is not to manage clients as a whole. Things may take place that could cause issues you were not expecting and then it would be a global mess with a push of a button. But we do offer a function to push an application out globally or to remove an application globally. Just click an application from the global apps list to launch a application management tool.



This is how to trouble shoot an agent that’s “Ghosted” (missing Managed Packages data)

Everything we need to know about an agent can be summed up in the Chocolatey EDFs for the agent. Open the agent console and visit the EDF setting for the agent.


• Most Important – Is Chocolatey Approved? If not, what you are seeing in client console is accurate.
• Next, is Chocolatey Installed EDF checked?
• Do you have a Last Scan Date?

These two EDFs are key to the agent processing and displaying the current status of agent at the client console level. The last scan date lets you know when the last scan on agent happened.
1.png
1.png (75.82 KiB) Viewed 6195 times

How the system works. When you enable an agent for Chocolatey, the Chocolatey Approved EDF is checked. This causes the Chocolatey For Automate group to add the agent to their list.


2.png
2.png (403.7 KiB) Viewed 6195 times


Any agent in this group will be scheduled to be scanned by the P4A Scan Chocolatey Packages script daily. But before this can happen, another search takes place and sees that the agent is enabled but Chocolatey Installed EDF is not checked. This causes agent to join the C4A Deploy Chocolatey group. The agent remains in this group until Chocolatey is installed. When Chocolatey install script completes, it will change the EDF “Chocolatey Installed” to checked. This in turn cause the agent to disqualify for the C4A Install Chocolatey group and it will exit the Chocolatey Install group. Once this happens, the agent should be scheduled a normal scan during the next scan cycle. Once this scan completes, You should have agent package data and logs which were returned by the agent during the scanning script. You can check the agent script logs for script execution and returned data to validate agent is responding correctly.

The same process works for sources and caches, there is a EDF to enable the function, and a EDF to confirm the function was completed.

EDF:
Enable Extra Sources and Sources Enabled
Use UNC Cache and UNC Cache Enabled
Auto Install Approved Applications and Approved Applications Installed

Each of these EDFs have the other EDF as a validation that the function has been performed on the agent. If you wanted to let’s say, redeploy sources to an agent because of a change. Make the source change in the plugin, then uncheck the Sources Enabled leaving the Enable Extra Sources checked. This will cause the agent to rejoin the C4A Manage Sources group, That group will auto assign the C4A Chocolatey Sources script to agent, Agent will execute script and upon completion will have reset its sources to the current values assigned to it and will have rechecked the Sources Enabled EDF. This will then cause agent to disjoin from the C4A Manage Sources group.

Same goes for all three EDF sets. To stop Chocolatey on agent just uncheck the Chocolatey Approved checkbox and the agent will no longer scan or attempt any Chocolatey tasks.

I hope this helps you identify where along the path you agents reside and what to look for. You can adjust the script timing in the groups to speed up or slow down the processes. You can also add multiple schedules of the scan script in primary group, running scans 2 or 3 times a day. This will speed up flow of data. A typical agent may need up to 48 hours to start reporting data. This is because it maybe working its way through several temp groups as it gets configured to manage Chocolatey. The scanning of data is last on the list of configuration setups and must wait on other tasks to complete first. Adjust the group scripts schedules can improve this time frame some allowing to tune the performance of the plugin.


If you are still having issues, send me a screenshot of an agents EDFs and any script logs and I’ll have a look for you.

Re: C4A groups no populating

Posted: Thu Dec 19, 2024 9:45 pm
by PL-MSTech
For the ones that I unchecked and re-checked Enable and Auto Install on yesterday, I am looking at a new client...

Yes, the version is current, but the latest one appears to be 3.7.0.2, not 3.7.2.

They are in the main group.
All of the agents in this client group now have Chocolatey as the only managed application....
**** when I executed "Install Application Globally" for 7zip - is the application supposed to show as an "Approved Application" inside each client? Because it is not.... so I am manually approving it inside this client to see if it works now.
Here are the EDF settings for a machine in this client...
edf.png
edf.png (33.34 KiB) Viewed 6185 times
So it is approved and the last scan date is 12/18.
Not sure why the version is 1.1.0... maybe it was already installed? Shouldn't C4A have updated it? In the following screenshot, it shows that the "Last Update" was a month ago... not sure why - as C4A wasn't even enabled for this client until yesterday.
managedapps.png
managedapps.png (18.92 KiB) Viewed 6185 times
Several scripts have run since yesterday, but I am not sure which are relevant...
Like I said, I just enabled this client for C4A yesterday, so there have only been 9 scripts run on this machine I am taking as an example:
scripts.png
scripts.png (78.85 KiB) Viewed 6185 times
Here are the script logs (separated by a blank line - newest on top):

The Script(6248) was successful in the Then section.
Script: S6248 - Starting at Server Time: Thursday, December 19, 2024 2:15:25 PM
IF F1 T: 0.877284
L4 F235 T: 0.895051
L5 F70 Value (P1): VOLUMEDATA Comparer (P2): 8 To (P3): ('51','664' Jump (P4): :INSERTVOLUMES T: 41.8712585
L8 F139 Note (P1): :INSERTVOLUMES T: 41.8712585
L9 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_bitlocker_volumes (`ClientID`,`ComputerID`,`VolumeType`,`Mou...' T: 41.8712585
L10 F235 T: 41.8712585
L11 F67 Sql (P1): 'DELETE FROM plugin_p4a_bitlocker_volumes WHERE ComputerID = '664' and MountPoint NOT IN ('...' T: 56.5292806
L12 F235 T: 56.5292806
L13 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_bitlocker_protectors (`ComputerID`,`ProtectorType`,`MountPoi...' T: 62.7930144
L14 F235 T: 62.9280085
L15 F70 Value (P1): REMOVEKEYDATA Comparer (P2): 2 To (P3): ) Jump (P4): :REMOVEALLKEYS T: 77.8050096
L19 F258 Label Name (P1): :REMOVEALLKEYS T: 77.8050096
L20 F67 Sql (P1): DELETE FROM plugin_p4a_bitlocker_protectors WHERE ComputerID = '664' T: 77.8050096
L21 F29 Message (P1): Removing all keys from database T: 77.8206569
L22 F259 T: 77.8362783

Removing all keys from database

The Script(6259) was successful in the Then section.
Script: S6259 - Starting at Server Time: Thursday, December 19, 2024 1:07:28 PM
IF F1 T: 1.0318781
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.0318781
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0318781
L4 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 1.0318781
L5 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :USEWINGET T: 1.0475154
L6 F139 Note (P1): :USECHOCOLATEY T: 1.0475154
L7 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):PACKAGES T: 1.0475154
L8 F90 File (P1): %LTSVCDir%\C4A\autoinstall.ps1 T: 1.0776636
L9 F109 Delimiter (P2): Variable (P3): @Installs@ T: 11.1426823
L10 F29 Message (P1): install failed T: 29.178797
L11 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Approved...' T: 29.178797
L12 F129 Jump (P1): 0 T: 29.178797

install failed

The Script(6264) was successful in the Then section.
Script: S6264 - Starting at Server Time: Wednesday, December 18, 2024 7:30:59 PM
IF F1 T: 1.082008
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.082008
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0976403
L4 F31 Control (P1): 1 T: 1.0976403
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 24.7824501
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 24.7843601
L7 F139 Note (P1): :STARTSCAN T: 24.7843601
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 24.7843601
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 26.7945266
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 32.9095396
L11 F70 Value (P1): '('664','51','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 40.9195741
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '664'; INSERT...' T: 40.9195741
L13 F235 T: 40.9195741
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 42.9267327
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 42.9267327
L16 F235 T: 42.9267327
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 48.9655465
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 48.9655465
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 48.9666738
L21 F139 Note (P1): :TESTSOURCES T: 48.9666738
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 48.9666738
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 48.9666738
L24 F235 T: 48.9666738
L25 F139 Note (P1): :RUNVERSIONSCAN T: 56.9773209
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 56.9773209
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 56.9891775
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 63.1658161
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 154.3934221
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 154.3934221
L31 F129 Jump (P1): 0 T: 154.4014674

The Script(6260) was successful in the Then section.
Script: S6260 - Starting at Server Time: Wednesday, December 18, 2024 5:48:28 PM
IF F1 T: 0.9909609
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 0.9909609
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0065685
L4 F235 T: 1.0740796
L5 F20 SetType(P1):1 Parameter(P2):'REPLACE INTO extrafielddata Va...' VariableName(P3):SQLUPDATE T: 28.3522703
L6 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Chocolat...' T: 28.3522703
L7 F29 Message (P1): Reset to default repository on local agent successful. T: 28.3522703
L8 F129 Jump (P1): 0 T: 28.3522703

Reset to default repository on local agent successful.

The Script(6256) was successful in the Then section.
Script: S6256 - Starting at Server Time: Wednesday, December 18, 2024 1:57:54 PM
IF F1 T: 0.9393085
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 0.9393085
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 0.9549608
L4 F139 Note (P1): :INSTALLCHOCO T: 0.9549608
L5 F114 File (P1): 'C:\ProgramData\chocolatey\choc...' Check (P2): 0 Jump (P3): :CHOCOINSTALLSUCCESS T: 0.9549608
L11 F139 Note (P1): :CHOCOINSTALLSUCCESS T: 6.5819958
L12 F235 T: 6.5819958
L13 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 13.839435
L14 F20 SetType(P1):1 Parameter(P2):'REPLACE INTO extrafielddata Va...' VariableName(P3):SQLUPDATE T: 13.839435
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 13.839435
L16 F29 Message (P1): Install of chocolatey to local agent successful. T: 13.839435

Install of chocolatey to local agent successful.

The Script(6264) was successful in the Then section.
Script: S6264 - Starting at Server Time: Wednesday, December 18, 2024 1:37:42 PM
IF F1 T: 1.0291743
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.0447936
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0447936
L4 F31 Control (P1): 1 T: 1.0447936
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 37.2444679
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 37.2444679
L7 F139 Note (P1): :STARTSCAN T: 37.2444679
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 37.2444679
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 39.2712203
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 45.3027722
L11 F70 Value (P1): '('664','51','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 67.4558529
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '664'; INSERT...' T: 67.4558529
L13 F235 T: 67.4558529
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 71.492719
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 71.492719
L16 F235 T: 71.5090106
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 75.5585795
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 75.5585795
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 75.5585795
L21 F139 Note (P1): :TESTSOURCES T: 75.5585795
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 75.5585795
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 75.5585795
L24 F235 T: 75.5585795
L25 F139 Note (P1): :RUNVERSIONSCAN T: 83.6665225
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 83.6665225
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 83.6665225
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 85.7041142
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 178.024768
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 178.024768
L31 F129 Jump (P1): 0 T: 178.024768


Now... I do not have a cache server setup at this location, as there is no server running there, so if it is necessary to have one due to repository limits, it will take some work on my end with the sharing and permissions to get that setup to work on a peer-to-peer network.
Your post on "New WinGet Support in 3.7" doesn't specify whether or not it has the same limits on connections... would enabling it in this scenario work best (IF we can determine where the problem lies)?

Thanks

Re: C4A groups no populating

Posted: Thu Dec 19, 2024 9:56 pm
by PL-MSTech
Also...
I am going to let your scripts, etc. work so that we can better determine where my issues are... so I am going to try NOT to do any manual installation, etc. on this client.
However, I did notice this... when I click "Mass Install", why does it show MULTIPLE instances of "Enabled Software" in the list?
mass install.png
mass install.png (26.32 KiB) Viewed 6184 times
Maybe this points to identify one of the issues??

I will also note that on the same client I am testing on (in the other post, etc.)... even though those 9 scripts have run, there are ZERO Logs in the client Chocolatey console...
logs.png
logs.png (20.16 KiB) Viewed 6184 times

Re: C4A groups no populating

Posted: Fri Dec 20, 2024 4:45 pm
by Cubert
Sorry for the late reply, took me awhile to work through each question .


Your first question:

When I executed "Install Application Globally" for 7zip, is the application supposed to show as an "Approved Application" inside each client? Because it is not. So I am manually approving it inside this client to see if it works now.

The short answer is no, it does not. However, I can see where that maybe should happen. We tend to err on the side of caution and try not to do too many things globally. The impact to an MSP could be significant if they are hosting 5K worth of agents and click the wrong button. This is why we typically do not make things automatically a global setting.

But in this case, by deploying an application globally, you are approving it for everyone that is currently enabled. I will discuss this with the team and see if we get consensus to make this adjustment.

Next Question:

Not sure why the version is 1.1.0... maybe it was already installed? Shouldn't C4A have updated it? In the following screenshot, it shows that the "Last Update" was a month ago... not sure why - as C4A wasn't even enabled for this client until yesterday.

That is exactly it. Chocolatey was already installed. During the Chocolatey Deployment function, the agent is first tested to see if Chocolatey already exists. If so, it captures the version and exits. The deployment process does not attempt updates.

The last update is auto set to 31 days old by default. As a new client, all agents start out showing as out of date. Once they start to scan and update, this data will become less than 30 days and the status will be green. The "Current" icon represents actions taken on the agent recently. Offline or failing agents will not show green icons.

Next Question:

Several scripts have run since yesterday, but I am not sure which are relevant...
Like I said, I just enabled this client for C4A yesterday, so there have only been 9 scripts run on this machine I am taking


That sounds about right. You will have scans by default daily. You will run chocolatey deploy atleast once on each agent. Twice means that the group rescheduled script a second time before agent actually ran script and completed. If this happens a lot then you can adjust the groups script execution from every half hour to every hour and that should resolve things. "The agent does not get demoted from group fast enougn to miss a second scheduling." Allowing more time between schedulings will give agent extra time to leave group after first Deploy Chocolatey script execution.


Next Question:

Here are the script logs (separated by a blank line - newest on top):

The Script(6248) was successful in the Then section.
Script: S6248 - Starting at Server Time: Thursday, December 19, 2024 2:15:25 PM
IF F1 T: 0.877284
L4 F235 T: 0.895051
L5 F70 Value (P1): VOLUMEDATA Comparer (P2): 8 To (P3): ('51','664' Jump (P4): :INSERTVOLUMES T: 41.8712585
L8 F139 Note (P1): :INSERTVOLUMES T: 41.8712585
L9 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_bitlocker_volumes (`ClientID`,`ComputerID`,`VolumeType`,`Mou...' T: 41.8712585
L10 F235 T: 41.8712585
L11 F67 Sql (P1): 'DELETE FROM plugin_p4a_bitlocker_volumes WHERE ComputerID = '664' and MountPoint NOT IN ('...' T: 56.5292806
L12 F235 T: 56.5292806
L13 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_bitlocker_protectors (`ComputerID`,`ProtectorType`,`MountPoi...' T: 62.7930144
L14 F235 T: 62.9280085
L15 F70 Value (P1): REMOVEKEYDATA Comparer (P2): 2 To (P3): ) Jump (P4): :REMOVEALLKEYS T: 77.8050096
L19 F258 Label Name (P1): :REMOVEALLKEYS T: 77.8050096
L20 F67 Sql (P1): DELETE FROM plugin_p4a_bitlocker_protectors WHERE ComputerID = '664' T: 77.8050096
L21 F29 Message (P1): Removing all keys from database T: 77.8206569
L22 F259 T: 77.8362783

Removing all keys from database


Not Chocolatey logs, This is a BitLocker log. :D


Next Log:


The Script(6259) was successful in the Then section.
Script: S6259 - Starting at Server Time: Thursday, December 19, 2024 1:07:28 PM
IF F1 T: 1.0318781
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.0318781
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0318781
L4 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 1.0318781
L5 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :USEWINGET T: 1.0475154
L6 F139 Note (P1): :USECHOCOLATEY T: 1.0475154
L7 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):PACKAGES T: 1.0475154
L8 F90 File (P1): %LTSVCDir%\C4A\autoinstall.ps1 T: 1.0776636
L9 F109 Delimiter (P2): Variable (P3): @Installs@ T: 11.1426823
L10 F29 Message (P1): install failed T: 29.178797
L11 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Approved...' T: 29.178797
L12 F129 Jump (P1): 0 T: 29.178797

install failed


This ones could be an issue, I need to know what is in the clients approved apps list as approved. A screenshot would help me here.

My thoughts are that the auto install approved packages was checked and there were no approved packages to install at the client level so a blank list was generated causing installs to fail. If this is the case then I will make some changes to script to exit with a proper log.



Next Log:

The Script(6264) was successful in the Then section.
Script: S6264 - Starting at Server Time: Wednesday, December 18, 2024 7:30:59 PM
IF F1 T: 1.082008
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.082008
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.0976403
L4 F31 Control (P1): 1 T: 1.0976403
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 24.7824501
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 24.7843601
L7 F139 Note (P1): :STARTSCAN T: 24.7843601
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 24.7843601
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 26.7945266
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 32.9095396
L11 F70 Value (P1): '('664','51','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 40.9195741
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '664'; INSERT...' T: 40.9195741
L13 F235 T: 40.9195741
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 42.9267327
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('664',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 42.9267327
L16 F235 T: 42.9267327
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 48.9655465
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 48.9655465
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 48.9666738
L21 F139 Note (P1): :TESTSOURCES T: 48.9666738
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 48.9666738
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 48.9666738
L24 F235 T: 48.9666738
L25 F139 Note (P1): :RUNVERSIONSCAN T: 56.9773209
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 56.9773209
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 56.9891775
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 63.1658161
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 154.3934221
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 154.3934221
L31 F129 Jump (P1): 0 T: 154.4014674


This is the Scan script validating your current packages, versions and sources . should happen atleast once per day. can happen once per hour and be within norms.



Question:

I will also note that on the same client I am testing on (in the other post, etc.)... even though those 9 scripts have run, there are ZERO Logs in the client Chocolatey console...

The Chocolatey Agent logs are currently pulled during daily scans and are a parsed subset of the ""C:\ProgramData\chocolatey\logs\chocolatey.log""

The chocolatey.log file is filled with MB's of data for each agent and can span weeks if not months. We do not want all that junk being saved into SQL inside Automate. To prevent this, we parse this log file by date and by CODE. We only save data that matches the date = today and CODE = \[ERROR\]. THis will only happen when issues arrise during installs, updates or sourcing issues.

Sample of the log:

Code: Select all

2024-11-07 21:28:19,677 38032 [INFO ] - KB2919355|1.0.20160915
2024-11-07 21:28:19,680 38032 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2024-11-07 21:28:19,682 38032 [ERROR] - Exiting with 0
I agree that we should also be using this area to post logs generated by our plugin. It makes since to include these here for reference. I will add this to our roster.



Next Question:

However, I did notice this... when I click "Mass Install", why does it show MULTIPLE instances of "Enabled Software" in the list?


That is odd? I am not able to reproduce that error so it must be something inside you deployment. I would need to see the Approved software list for your client.

This is what it should look like.
Screenshot 2024-12-20 114353.png
Screenshot 2024-12-20 114353.png (684.85 KiB) Viewed 6151 times

Re: C4A groups no populating

Posted: Fri Dec 20, 2024 4:58 pm
by Cubert
On a side note!

It is good measure to include in your approved apps list Chocolatey and each of its dependencies. It greases the Chocolatey gears, making installs and updates more reliable.

Screenshot 2024-12-20 115727.png
Screenshot 2024-12-20 115727.png (187.71 KiB) Viewed 6147 times

Re: C4A groups no populating

Posted: Fri Dec 20, 2024 6:31 pm
by Cubert
We just pushed out build 3.7.0.3, should auto update tonight.

If you want it now you can download it here.

https://delivery.shopifyapps.com/-/01c7 ... e6a2a2c18f

Re: C4A groups no populating

Posted: Fri Dec 20, 2024 6:49 pm
by PL-MSTech
1. RE: "Install Application Globally" - if this option is in fact supposed to enable the application globally for all enabled clients, it doesn't seem to have worked... in the case for this client that I am using as an example, I still had to open the client, click "Approve Apps" and approve 7zip, as it was still disabled -- probably a couple of hours after executing the "Install Application Globally"

2. So if an old version of Chocolatey is already installed, when is it supposed to upgrade it? I can't think of a case where I would NOT want the deployment to update it...??? If the deployment doesn't update it, when does it get updated? 2.4.1 is an approved app, but it isn't even updating it AFTER deployment... all but one of these machines are all still on 1.1.0, the other one
is showing version 0.10.15

3. Logs... yes, there may have been no approved packages... as in #1 above, I thought that "Install Application Globally" had enabled the apps, but it had not... so I enabled them in the client itself... so here are the logs today...

The Script(6264) failed in the Then section at step 30. The reason: SQL Execute failed processing query
Script: S6264 - Starting at Server Time: Friday, December 20, 2024 9:47:29 AM
IF F1 T: 0.8392844
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 0.8392844
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 0.8392844
L4 F31 Control (P1): 1 T: 0.8392844
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 29.0089857
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 29.0089857
L7 F139 Note (P1): :STARTSCAN T: 29.0089857
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 29.0089857
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 33.021274
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 35.0464305
L11 F70 Value (P1): '('285','16','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 41.0575343
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '285'; INSERT...' T: 41.0575343
L13 F235 T: 41.0575343
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 45.0684795
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('285',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 45.0684795
L16 F235 T: 45.0684795
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 49.101572
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 49.1026935
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 49.1026935
L21 F139 Note (P1): :TESTSOURCES T: 49.1026935
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 49.1026935
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 49.1026935
L24 F235 T: 49.1026935
L25 F139 Note (P1): :RUNVERSIONSCAN T: 55.1308693
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 55.1308693
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 55.1308693
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 59.1658131
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 140.5639558
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 140.5639558

The Script(6264) failed in the Then section at step 30. The reason: SQL Execute failed processing query
Script: S6264 - Starting at Server Time: Friday, December 20, 2024 5:47:30 AM
IF F1 T: 0.0653146
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 0.0653146
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 0.0653146
L4 F31 Control (P1): 1 T: 0.0653146
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 12.1091843
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 12.1091843
L7 F139 Note (P1): :STARTSCAN T: 12.1091843
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 12.1091843
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 16.1251177
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 22.167517
L11 F70 Value (P1): '('285','16','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 30.2123028
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '285'; INSERT...' T: 30.2123028
L13 F235 T: 30.2123028
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 32.2440843
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('285',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 32.2440843
L16 F235 T: 32.2596928
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 38.2841176
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 38.2841176
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 38.2841176
L21 F139 Note (P1): :TESTSOURCES T: 38.2841176
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 38.2841176
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 38.3015298
L24 F235 T: 38.3015298
L25 F139 Note (P1): :RUNVERSIONSCAN T: 44.3589138
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 44.3589138
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 44.3589138
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 46.390039
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 120.6561198
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 120.6561198

The Script(6264) failed in the Then section at step 30. The reason: SQL Execute failed processing query
Script: S6264 - Starting at Server Time: Friday, December 20, 2024 1:47:31 AM
IF F1 T: 0.6977011
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 0.6977011
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 0.6977011
L4 F31 Control (P1): 1 T: 0.6977011
L5 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):USEWINGET T: 28.8338018
L6 F70 Value (P1): USEWINGET Comparer (P2): 2 To (P3): 1 Jump (P4): :WINGETSCAN T: 28.8338018
L7 F139 Note (P1): :STARTSCAN T: 28.8338018
L8 F154 Folder (P1): %LTSVCDir%\C4A T: 28.8338018
L9 F90 File (P1): %LTSVCDir%\C4A\scanpackages.ps1 T: 32.8603328
L10 F109 Delimiter (P2): Variable (P3): @PACKAGES@ T: 34.8859989
L11 F70 Value (P1): '('285','16','chocolatey','1.1....' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 41.8783566
L12 F67 Sql (P1): 'DELETE FROM `plugin_p4a_chocolatey_installed_packages`
WHERE `ComputerID` = '285'; INSERT...' T: 41.8783566
L13 F235 T: 41.8783566
L14 F171 ValueOne (P1): 6 Operator (P2): 1.1.0
ValueTwo (P3): Variable (P4): T: 43.8827268
L15 F67 Sql (P1): 'REPLACE INTO extrafielddata Values('285',(SELECT ID FROM extrafield WHERE Name = 'Current ...' T: 43.8827268
L16 F235 T: 43.8827268
L17 F70 Value (P1): ChocoLogs Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 47.9043725
L19 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):UNCENABLED T: 47.9043725
L20 F70 Value (P1): UNCENABLED Comparer (P2): 2 To (P3): 0 Jump (P4): :TESTSOURCES T: 47.9043725
L21 F139 Note (P1): :TESTSOURCES T: 47.9043725
L22 F20 SetType(P1):11 Parameter(P2):'SELECT count(*) FROM extrafiel...' VariableName(P3):SOURCEENABLED T: 47.9043725
L23 F70 Value (P1): SOURCEENABLED Comparer (P2): 2 To (P3): 1 Jump (P4): :RUNVERSIONSCAN T: 47.9043725
L24 F235 T: 47.9043725
L25 F139 Note (P1): :RUNVERSIONSCAN T: 55.9318391
L26 F20 SetType(P1):11 Parameter(P2):'SELECT distinct group_concat(R...' VariableName(P3):SOURCEPACKAGES T: 55.9329511
L27 F90 File (P1): %LTSVCDir%\C4A\packageversions.ps1 T: 55.9329511
L28 F109 Delimiter (P2): Variable (P3): @VERSIONS@ T: 57.9417559
L29 F70 Value (P1): '('7zip.install','24.9.0'),('ad...' Comparer (P2): 9 To (P3): ) Jump (P4): 1 T: 136.2105445
L30 F67 Sql (P1): 'CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT...' T: 136.2105445

4. A couple of logs are showing up now...
Logs
Logs
20241220a.png (49.28 KiB) Viewed 6143 times
Managed apps
Managed apps
20241220b.png (38.35 KiB) Viewed 6143 times
Installed software
Installed software
20241220c.png (69.07 KiB) Viewed 6143 times

5. Approved Apps...
Approved apps
Approved apps
20241220d.png (86.33 KiB) Viewed 6143 times
Yes, I have thought there was something wrong in my deployment for a LONG time, since I have never been able to make ANY aspect of this plugin work... for what, 2yrs now? Granted, I have only dug in a time or two - but got frustrated every time I (or a tech that I have delegated it to) has tried...
I think you need to provide some sort of script that generates you a support file that I can send to you... it should have info with EVERY RELEVANT ASPECT of my system about the tables, scripts, versions, etc. in order for you to determine what the issue is without our having to go back and forth on this forum with screenshots and manually typed theories about what MIGHT be happening.... either that, or someone needs to remote to my machine and check everything out to see what is broken.

Re: C4A groups no populating

Posted: Sat Dec 21, 2024 1:08 am
by PL-MSTech
Ok, I am gaining ground... remoted to a machine and tried "choco upgrade chocolatey -y" as well as force, etc.
I got:
"ERROR: The requested operation cannot be performed on a file with a user-mapped section open."
Checked all processes and Bitdefender logs as well as all dashboards, alerts, blocks, etc. in the Gravityzone console.... zero errors... I did however, make an exception in the Bitdefener policy for the programdata\chocolatey folder. and voila -- it installed.
I made a global exclusion in Bitdefender and applied it to all client machines for the chocolatey folder.
Manually issued a command in Screenconnect to all client machines to upgrade chocolatey and it seemed to work except for max connections to repository on sites w/o a cache server.
NOW... machines seem to be updating... I will check them tomorrow.

Apparently Bitdefender had some files (dlls?? or script ability) blocked or locked in the chocolatey folder, but there was not "action" to see anywhere where it was actively blocking the upgrade, etc.
I suspected that it had to be something in my environment... but didn't know where to look... this is where perhaps a detailed support log would indicated to you what to have me try or look at....?