C4A groups no populating

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

Cubert wrote: Mon Dec 23, 2024 9:00 pm Yes, Its not til 3.7.0.5,


Gotcha - updating now.

PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

Setting up the cache server at this location so I won't get the connection timeouts to the repository.
I have made this part work before, but now, after double-checking and triple-checking, it isn't working...
I have set the variables for the location and defined them in the agent template:
password-error.png
password-error.png (68 KiB) Viewed 6325 times
template.png
template.png (19.85 KiB) Viewed 6325 times

PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

Getting the same script error on another client site that worked before, and we haven't changed anything on it related to the cache folder, username, password, etc.

At one point, didn't the scripts create 2 sub-folders under the location drive (%drive%\chocolatey\packages\)??
The location drive may be used for several things - and in order to keep it organized and prevent having a bunch of package files and .nupkg files in the root of the shared folder, all of the P4A files should be in a sub-folder.

I'll see what it does when I get it working again.

User avatar
Cubert
Posts: 2694
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: C4A groups no populating

Post by Cubert »

Make sure your version reads 3.7.0.6

This should resolve that issue. The reason for the issue is we added international support to the Sources script which looks to have not played well with your settings. I have add back the changes made and now have added a switch to allows the EU to switch between UTF8 and UTF8 with BOM.

This was changed in 3.7.0.4 originally.


Leaving this box unchecked will caus it to use the original code base for UNC caching. International users that are experencing issues due to special symbols failing to encode and decode in UTF8 can select this box and any new UNC sources will use the new code base that deploys UTF8 with BOM.

Screenshot 2024-12-30 111253.jpg
Screenshot 2024-12-30 111253.jpg (120.79 KiB) Viewed 6083 times


You may be required to redeploy your sources. Make sure agents are set to use UNC but not have had UNC deployed yet. This way the agents attempt to reset the sources including UNC sources.

Screenshot 2024-12-30 112027.jpg
Screenshot 2024-12-30 112027.jpg (9.04 KiB) Viewed 6083 times

PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

I had to delete my local plugins folder to reload them and reflect v3.7.0.6
Do I need to run a custom script to change the EDF for 'UNC Cache Enabled' or is there a setting to handle this and uncheck them all at once in the tool?

Also, should 'UNC Cache Enabled' be checked or unchecked on the Cache Manager?

And what about the sub-folder question in my last post?

I think I'm getting close, but there sure are a LOT of 'make sure you do this before that, and that before this' and c is a pre-requisite of b and zz a requirement of rr --- all things that your scripts should check and cover (and create informational log errors to direct us on fixing these issues) imo.
Thanks

PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

Well... the 3.7.0.6 with the 'Use International Encoding' unchecked didn't fix the issue.
I still get:
L5 F70 Value (P1): LocationDrive Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEINFO T: 0.1366731
L6 F70 Value (P1): LocationUser Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEUSER T: 0.1389018
L7 F20 SetType(P1):1 Parameter(P2): VariableName(P3):mycachepass T: 0.140189
L8 F70 Value (P1): mycachepass Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEPASS T: 0.1407155
L47 F139 Note (P1): :MISSINGCACHEPASS T: 0.1407155
L48 F29 Message (P1): 'The agents location does not have a configured PASSWORD credentials to access drive, exiti...' T: 0.1413813
L49 F67 Sql (P1): 'INSERT IGNORE INTO `plugin_p4a_chocolatey_logs`

I know the credentials are correct b/c we have written 2 additional scripts:
1 to write the credentials out to a plain text file that we can verify, and
1 to copy files from a domain computer to another domain computer using the cache location and the stored location credentials (on the cache manager, which is a 3rd machine on the network) in Automate.
Both work.

Is this another one of those things that we just have to wait 24 hours to see if if it "works itself out"?

User avatar
Cubert
Posts: 2694
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: C4A groups no populating

Post by Cubert »

I am having a problem identifying your log provided, Can you send me the entire log if available and script name showing being executed.

While looking for your script lines listed in log, we started testing some of our UNC code. We found an issue in our environment. It looks like sometime during the last several months ConnectWise putout an update that has broken the UNC functionality we originaly used to capture usernames and passwords with.


The original problem we faced when plugin 3.0 was created, was that we did not get consistant passwords from %locationpass% across Labtech/Automate hosts. Many times we would receive <HiddenPassword> or blank as a return when using.
At the time, Automate stored these values unencrypted in the database in the the `Locations` table as SCPassword for the locationID.

We used a simple query to obtain this value in Automate script by query which worked for years.

Code: Select all

SELECT SCPassword FROM locations WHERE LocationID = '%locationid%' and ClientID ='%clientid%'

However during our resent testing, we found that we are now getting an encrypted value for this query (Kudos for them!). We also retested capturing the values of %locationpass% and we are now able to return this value in our environment.


A quick fix to this issus is to disable line 43 and add a new line (44) that sets a contant value of @mycachepass@ = %locationpass%. This will allow the password to be correctly generated and added to the @UNCWorkingSTRING@

Screenshot 2025-01-02 124604.jpg
Screenshot 2025-01-02 124604.jpg (113.41 KiB) Viewed 5996 times


I will be putting out an update shortly to fix this now that we know it's an issue. I want to also add in a control to allow you to modify EDFs in bulk. This will allow you to change agent statuses and reinit any function that needs resets.


My team is also discussing the removal of this function as a seperate configuration under the locations tab for script defaults and having users enter the UNC as just another source address in the global repo manager. But before we can do this we need to be able to assign sources to agents and locations. This would prevent a location UNC from being distrbuted across clients.

I would like to hear your feedback on having all sources managed in a single place and in a similar mannor, having sources enabled by client.

PL-MSTech
Posts: 70
Joined: Mon Jul 31, 2023 10:07 pm
1

Re: C4A groups no populating

Post by PL-MSTech »

Made that change
script.png
script.png (114.33 KiB) Viewed 5989 times
Reloaded system cache... unset and reset cache manager (not sure if that was necessary)... sent cmd to update UNC Cache on that machine... and still getting this (entire log)...

INFORMATION:
The agents location does not have a configured PASSWORD credentials to access drive, exiting script without agent changes. Launch location console and add a location drive and credentials.

RESULTS:
P4A Chocolatey Cache Management Results
The Script(6272) was successful in the Then section.
Script: S6272 - Starting at Server Time: Thursday, January 2, 2025 1:44:31 PM
IF F1 T: 1.097073
L2 F20 SetType(P1):11 Parameter(P2):'Select count(*) from plugin_p4...' VariableName(P3):SUSPENDED T: 1.097073
L3 F70 Value (P1): SUSPENDED Comparer (P2): 2 To (P3): 1 Jump (P4): 0 T: 1.097073
L4 F139 Note (P1): :RUNCACHEUPDATE T: 1.097073
L5 F70 Value (P1): LocationDrive Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEINFO T: 1.097073
L6 F70 Value (P1): LocationUser Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEUSER T: 1.097073
L7 F20 SetType(P1):1 Parameter(P2): VariableName(P3):mycachepass T: 1.097073
L8 F70 Value (P1): mycachepass Comparer (P2): 2 To (P3): Jump (P4): :MISSINGCACHEPASS T: 1.097073
L47 F139 Note (P1): :MISSINGCACHEPASS T: 1.097073
L48 F29 Message (P1): 'The agents location does not have a configured PASSWORD credentials to access drive, exiti...' T: 1.097073
L49 F67 Sql (P1): 'INSERT IGNORE INTO `plugin_p4a_chocolatey_logs`
(`ComputerID`,
`LogDate`,
`Log`)
VALUES ('...' T: 1.097073
L50 F129 Jump (P1): T: 1.097073


And even though this machine is marked as the cache manager, it is only loading the package files into the C:\ProgramData\chocolatey\lib folder, it is not copying them to the location share. I guess the script is exiting due to the "missing credentials" before it performs any of those functions.

User avatar
Cubert
Posts: 2694
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: C4A groups no populating

Post by Cubert »

I am working on the cache manager script today and should have the issues resolved by end of day.

Just a general note:
During testing we found interesting results. The log entry produced the following return. %CachePass% is not always the same as %LocationPass%, and user or location user are not interchangable.
Screenshot 2025-01-05 114356.jpg
Screenshot 2025-01-05 114356.jpg (18.06 KiB) Viewed 5912 times
Results of log function:

Code: Select all

cache pass = [MouseCheeze]  location pass =[BoogieMan] username = [CWAWK01\Owner] drive = [%drive%] Location drive = [\\SVRDC00\CacheCWA] location user [JANUS\cachemanager]

So for the scripts to function correctly, the scripts are using %locationdrive% , %locationuser%, and % locationpass%. Location password is set by the change password function provided with the drive information below.

Screenshot 2025-01-05 115102.jpg
Screenshot 2025-01-05 115102.jpg (25.31 KiB) Viewed 5912 times

Using any other method to set these variables may cause script failure.

User avatar
Cubert
Posts: 2694
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: C4A groups no populating

Post by Cubert »

Build 3.7.0.8 should now be out and available. AutoUpdate should be updating plugin to this new build today if it has not already happened for users.

Should resolve the Cache Management issue being reported.

Here is the new view of the client console, we've added a new tab to allow you quick access to agent EDFs and we have taken the same concept with Source management as we did with Application management. You can now add as many sources as you like globally and then assign those sources at the Client, Location or agent level from the client console.

We also added some new logic to enabling approved applications so that agent react to changes in the app list.

Screenshot 2025-01-06 113101.jpg
Screenshot 2025-01-06 113101.jpg (136.45 KiB) Viewed 5873 times

Post Reply

Return to “Chocolatey For Automate”