choco.exe missing

Support and questions for using and managing Chocolatey NuGet inside of Labtech
mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

choco.exe missing

Post by mmoyse »

Apologies, we seem to be hitting a lot of problems rolling this out. Having fixed the locations issue and it is now actually trying to install the applications, I'm seeing errors on the client:

Code: Select all

cmd.exe!!! /c "@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
WARNING: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.
Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
Then it decides it can't find the executable

Code: Select all

0|C:\ProgramData\chocolatey\bin\choco.exe
File or Directory Does Not Exist
Which results in

Code: Select all

cmd!!! /C C:\programdata\Chocolatey\choco.exe install 7zip.install -y
'C:\programdata\Chocolatey\choco.exe' is not recognized as an internal or external command,
operable program or batch file.
I *think* I need to force it to install the framework but I can't see how to do this and I don't understand how it's failing to find choco.exe but thinks there is a valid install so it doesn't try to repair or re-install.

mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

Re: choco.exe missing

Post by mmoyse »

OK, the Framework isn't installing I think because of the TLS issue but I have the magic box ticked. It looks like the @shellresult@ doesn't contain the expected string but instead the output of the Powershell script that is a result of the TLS issue:-(

It never applies the fix so never installs the framework...
Screenshot 2021-05-27 142655.png
Screenshot 2021-05-27 142655.png (106.99 KiB) Viewed 5434 times

mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

Re: choco.exe missing

Post by mmoyse »

One of our machines, no framework, no attempts, no last execution time - all since the day I installed it :-(
Screenshot 2021-05-27 162810.png
Screenshot 2021-05-27 162810.png (25.33 KiB) Viewed 5430 times

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

Re: choco.exe missing

Post by Cubert »

I believe this maybe due to limit issues we been seeing lately. We are testing several new updates now to see if we are able mitigate some of these issue.

Please stand by..

mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

Re: choco.exe missing

Post by mmoyse »

If it is limits, is there a way of hosting our own copy of the repository? That would fix the problem surely? We'd only need to keep in sync with the packages we decide to allow.

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

Re: choco.exe missing

Post by Cubert »


mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

Re: choco.exe missing

Post by mmoyse »

I'm not convinced this is limits. I've just checked a machine that has been in the list to install Chocolatey for a couple of weeks now and still doesn't have it. The maintenance script runs and tells me choco.exe can't be found and then appears to do nothing to resolve it.

The script seems to bomb out a lot with "Repository data from POSH Execute failed to deliver expected data."
Screenshot 2021-06-06 164041.png
Screenshot 2021-06-06 164041.png (154.33 KiB) Viewed 5274 times

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

Re: choco.exe missing

Post by Cubert »

All the log you are showing me here are "Else" logs. This means that these are attempts to install or update applications or updating repo. not install framework. If agents are getting these commands then Chocolatey framework was successfully installed and now the plugin is working on installing and updating applications or other functions.

My concern is that from the log error you show, you are requesting a repo app version update to repopulate the current versions on the public repo. This is all and good but it should only be happening to a single agent and not a list of them.

There should only ever be 1 agent ID that gets this request. The automation inquires as to whom has this task with the following query. if value > 0 then we have a agent to schedule the repo updates against.

Code: Select all

SELECT `Value` FROM plugin_p4l_chocolatey_properties WHERE `Name` = 'REPOSCANNERID'

From what I am seeing here it looks like you have many agents trying the same function. Can you run SQL query and confirm to whom the task is presently assigned? If you can answer if that agent is in the list of logs? and then send us the server plugin logs for Chocolatey for Automate?

I have reviewed our functions and do not see how more than 1 agent could be assigned this task. There is no loop to assign multiple scheduled scripts to agents for this function. I have also reviewed the functions that do loop through multiple agents and non assign the repo update task. I also confirmed that script functions all have terminators at the end so you can not cross over functions inside script.

Look forward to seeing the data you can provide.

mmoyse
Posts: 38
Joined: Tue May 25, 2021 9:28 am
2

Re: choco.exe missing

Post by mmoyse »

It returns 2796 which is the ID of the Automate server which is called Automate and does not appear in the list.
Attachments
Plugin_ChocolateyForAutomate_Errors.zip
(6.18 KiB) Downloaded 172 times

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

Re: choco.exe missing

Post by Cubert »

Interesting, I am seeing about 20 agent get this repo command. I'll look at that later but first is the overwhelming install failures in the list.

In the install function we have a (IF) test that says

IF is ONLINE and Agent current running commands are < 2 then execute installer else log as a failure. Well its not a failure just not online or is already running other tasks and is busy.

This although accurate could log a friendlier message. So the 71 installing failures your seeing in log are most likely running commands over 2. I am making a modification to this in 2 ways. Number 1 will be to make message easier to understand as this is not a failure but a delay and we will add in why to log. (Agent is offline or agent is running excessive commands.) Number two is to add in a adjuster to the running commands so you can set that excessive value instead of hard coding it to the number 2. This will allow you to adjust the excessive count to any number you like allowing you to push past agents that maybe slower to execute commands. Although we do this test so we do not load down an agent that is already acting slow the number 2 maybe to strict a number for some MSPs that would otherwise allow more commands in queue.

So I do not think that the install failures are a plugin issue but an agent command queuing issue.

Here is the SQL query we use to see if agents are ready for installs

Code: Select all

SELECT a.ID,a.ClientID,a.ComputerID,c.LocationID,A.Application,a.Command,IF(c.LastContact > date_add(now(),interval -5 minute),'Yes','No') As Online, (SELECT COUNT(*) FROM commands WHERE Status > 3 and ComputerID = a.ComputerID) As RunningCMDs FROM plugin_p4l_chocolatey_commands a LEFT JOIN computers c on a.ComputerID = c.ComputerID Where ExecuteDate IS NULL;

If command = INSTALL then look at RunningCMDs number to see if it is 2 or more or if agent says Online = no

Any agent ID that reports either will be skipped and will be re run again later.

mmoyse wrote: Tue Jun 08, 2021 2:42 pm It returns 2796 which is the ID of the Automate server which is called Automate and does not appear in the list.

Post Reply

Return to “Chocolatey For Labtech”