Help Getting Chocolatey for Automate Going

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.
User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Yes this will make sure chocolatey and its extensions also get updated regularly.

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

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

I added those packages... still only three "Managed Applications" on my one standalone machine.
And for the site with the caching agent, :
4 machines have ONLY googlechrome
2 machines have 7zip.install, jre8, and googlechrome
9 machines have 7zzip.install, googlechrome, and vlc
3 machines have 7zip.install, jre8, googlechrome, firefox, notepadplusplus.install, and putty install
1 machines have 7zip.install, googlechrome, firefox, putty.install, and vlc
3 machines have 7zip.install, googlechrome, firefox, and vlc
3 machines have 7zip.install, jre8, googlechrome, firefox, notepadplusplus.install, and windirstat

For 1 of the machines w/ only chrome, I see this in one log:
>>The Application [chocolatey-core.extension] is set to ignore updates and installs or is not installed, skipping app updates.
Where does it think it is set to ignore anything? As you can see in the pick above of the global, it is set to ENABLE for auto updates.
Same thing for the compatibility extension, the chocolatey app itself, as well as the others that aren't installed.

This is getting extremely frustrating - especially with no documentation.

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

This is where you will need to understand how Chocolate framework is used. You will receive Chocolatey logs and response to commands the plugin is trying to execute but if the state of things are not right the plugin will appear not to be working but in actually its Chocolatey that is failing.

So first I will ask a few starter questions to get an idea of the deployment.

Are all agent at same location (network)?
Are all agents set to stand alone (lone wolf)?

Have you tried to "push" the extensions to chocolatey to any agent manually?

The reason for these questions is, You have 25 agents total from what your list is displaying, Some have the extensions installed (google successfully installed on some) and not others and if all are set to stand alone then this would be exactly what I would expect to see.

From your description your systems are in some variation of install and if they are stand alone the reason is your hitting the Chocolatey blocks on public repo. This means every time the cycle hits you have 25 agents trying to bum rush the public repository to start installs or updates. The first 5 or so machines will get to make a request or 2 until block hits and then your denied access for 1 hour (minimum, this does scale up as you continue to make requests).

So what you would see as a result of this is agents with very inconsistent installs and some agent that may not had a chance to get a install in. This prevents the chocolatey extensions from being installed which then prevents google from being installed and so on..


If you are using caching services then I would try and push extensions manually to all agents to see if that gets the majority over the "bump".

Let me know more about environment if this does not fit your current scenario

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Documentation for plugin operations is here

viewforum.php?f=84


Documentation for how Chocolatey works is here

Chocolatey.org

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

The Application [chocolatey-core.extension] is set to ignore updates and installs or is not installed, skipping app updates.
This log maybe a bit to much in one log. It is trying to tell you that it skipped an UPDATE, skipping a update can happen for several reasons as log details. I suspect we should rewrite log to say:
The Application [chocolatey-core.extension] most likely is not installed yet so updating it can not happen till its first installed or the package is set to ignore updates, skipping app updates.

This is really what it should be saying... Half your apps are still uninstalled but are set as approved to install and update. The log is stating that the agent does not have package installed so trying an update is skipped. The next step in process is to install package to which that most likely times out due to block.

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

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

Edit... just saw your note about pushing the extensions manually to the machines to see if that will get things going...
I assume the mass installer is best for that... I know I can select multiple machines, but can I not also select multiple apps to install in 'mass'?
Thanks

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

I believe its one app at a time in mass

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

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

Ok, so 24hrs later now... chocolatey, chocolatey-compatibility.extension, and chocolatey-core.extension are all showing up in Managed Applications for the machines (those have all been showing up since shortly after I deployed them manually yesterday)... BUT no additional global apps are showing in Managed Applications.
So what's next? Why are the global apps not showing up in Managed Applications? Even if some of the apps were previously installed, and Chocolatey for Automate is skipping over them b/c they are up to date, shouldn't they show up as Managed now?

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Ok lets have a look at an agent.

The first thing I would compare is the list the plugin has against the list the agent has.

Run command on agent to get a list of software and versions Chocolatey sees installed.

Code: Select all

choco list -r
Is the list the same? If so then we need to look at the script logs, Can you post any script logs for Chocolatey script from agent so we can see the full process?

First it looks for updates for currently installed packages if any and skips over Approved packages not currently shown in agents list. The next steps are to install any software that is not installed on agent.


If you have more than a few agents at any location (network) then you should be using the Caching Feature. This prevents Chocolatey Repo blocks for multiple IPs from a single network making more than 5 requests in an hour. If your using the caching feature then verify all packages are available on the local share. If they are not there they will not be installed to all agents.

If your using caching and all package files are on the share. then we need to look at script to see if it is calling install commands or if it shows some error as it loops through each approved app.

If caching is not in use then I can expect this behavior, we can still verify that the script is looping through the install process but we may find that the returns from command is a HTML notice of a 400 Error blocking access.

I await your logs so I can see what its trying to do.

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

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

Ok, the first machine in my list is XXX2PZSJ - this site uses a caching agent.

Globally enabled applications in Chocolatey for Automate:
7zip.install
jre8
chocolatey-compatibility.extension
windirstat
dropbox
dekstopinfo
vlc
putty.install
chocolatey-core.extension
notepadplusplus.install
palemoon
adobereader
chocolatey
firefox
googlechrome

In the Automate client, the machine has these apps listed in 'Managed Applications'
googlechrome
chocolatey
chocolatey-compatibility.extension
chocolatey-core.extension

In your instructions, you said to run 'choco list -r' but I think that gets a list of all apps available in the choco repo (it listed 217 packages)...
instead, I ran 'choco list --localonly' and got this:

C:\WINDOWS\system32>choco list --local-only
Chocolatey v1.1.0
chocolatey 1.1.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
3 packages installed.

Looking at the site I am working with now, there are no files in some of the directories on the caching server... the empty directories are as follows:
7zip.install.23.1.0
chocolatey.2.2.2
Firefox.117.0.0
notepadplusplus.install.8.5.6
putty.install.0.79.0
windirstat.1.1.2.20161210

The other directories have files in them, but the empty directories still don't correspond to all of the missing apps on machines.

I deleted the "packages" folders in both c:\windows\ltsvc\chocolatey -AND- in the shared folder defined in the location "script and template variables" and ran the "update repo cache" again

I do see .nupkg files in the root of the packages folder... just looks like all the packages aren't downloading.
I do see 1 failed command: "Remove Directory" Parameters "%ltsvcdir%\Chocolatey\packages" output "Error deleting directories - check local log file"

I looked at LTErrors.txt and see this...

30.347 - 8/29/2023 4:06:20 PM - Error Deleting File: C:\Windows\LTSvc\Chocolatey\packages\dropbox.181.4.5678.nupkg, The process cannot access the file 'C:\Windows\LTSvc\Chocolatey\packages\dropbox.181.4.5678.nupkg' because it is being used by another process.:::
LTService v230.347 - 8/29/2023 4:06:20 PM - Error Deleting File: C:\Windows\LTSvc\Chocolatey\packages\dropbox.181.4.5678\Dropbox 181.4.5678 Offline Installer.x64.exe, The process cannot access the file 'C:\Windows\LTSvc\Chocolatey\packages\dropbox.181.4.5678\Dropbox 181.4.5678 Offline Installer.x64.exe' because it is being used by another process.:::
LTService v230.347 - 8/29/2023 4:06:20 PM - Error Deleting Folder: C:\Windows\LTSvc\Chocolatey\packages\dropbox.181.4.5678, The directory is not empty.
:::

Another error in the machine log:
Parameters: cmd.exe!!! /c "%ltsvcdir%\Chocolatey\ChocoCacher.exe %ltsvcdir%\Chocolatey\packages http://chocolatey.org/api/v2/package/firefox/"
Output: Downloading: Firefox.117.0.0.nupkg
Download Failed: https://download.mozilla.org/?product=f ... g=${locale}
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at ChocoCacher.PackageCacher.DownloadFile(String url, String destination)
Download Failed: https://download.mozilla.org/?product=f ... g=${locale}
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at ChocoCacher.PackageCacher.DownloadFile(String url, String destination)

If you need to look at more log files, a call with a screenshare of the machine would be a lot easier and quicker!

Update: It got the .nupkg files for each app (I see them in c:\windows\ltsvc\chocolatey\packages), but it didn't again install anything into the folders below (same ones as the other apps listed above)...
7zip.install.23.1.0
chocolatey.2.2.2
Firefox.117.0.0
notepadplusplus.install.8.5.6
putty.install.0.79.0
windirstat.1.1.2.20161210

Also, the files/folders have not copied back over to the caching share at location "script and template variables" and ran the "update repo cache" -- it remains empty... where is the script supposed to check/copy/sync the packages folders?

Locked

Return to “Chocolatey For Automate”