Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade fails #65

Open
genebean opened this issue Jun 29, 2015 · 8 comments
Open

Upgrade fails #65

genebean opened this issue Jun 29, 2015 · 8 comments

Comments

@genebean
Copy link

I have Chocolatey set to upgrade itself via Puppet but with the 0.9.9.7 release and now with the 0.9.9.8 release I get the following error:

PS C:\Windows\system32> puppet agent -t
Notice: Ignoring --listen on onetime run
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error loading fact C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facts.rb: cannot load such file -- util/sssd
Info: Caching catalog for adm-recruitdb.uwg.westga.edu
Info: Applying configuration version '1435590280'
←[1;31mError: Could not update: Execution of 'C:\ProgramData\chocolatey\bin\choco.exe upgrade chocolatey -dvy ' returned
 1: Chocolatey v0.9.9.7
Chocolatey is running on Windows v 6.1.7601.65536
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurati
onMilliseconds, Int32 increaseRetryByMilliseconds)
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurati
onMilliseconds, Int32 increaseRetryByMilliseconds)
Maximum tries of 3 reached. Throwing error.
Attempting to delete choco.exe.old ran into an issue:
 Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
Command line: "C:\ProgramData\chocolatey\choco.exe" upgrade chocolatey -dvy
Received arguments: upgrade chocolatey -dvy

When investigating on systems that show this problem I see in task manager that there are two choco.exe processes still running. One just has "chocolatey" as its description but the other says "ShimGen generated shim". If I kill these then Puppet can upgrade things just fine.

I am seeing this problem on 2008 R2, 2012, and 2012 R2.

@ferventcoder
Copy link
Contributor

It appears you have a hanging command running out there. I wonder if this is the result of something else?

Can you pass along the logs of 0.9.9.7/0.9.9.8 upgrade attempts? I want to see if there are any blind calls to list running in the background.

@genebean
Copy link
Author

genebean commented Jul 4, 2015

Sorry for the delay... where would I find the logs you are looking for?

@ferventcoder
Copy link
Contributor

Depends on where the choco install is located, but likely C:\ProgramData\chocolatey\logs

@genebean
Copy link
Author

genebean commented Jul 7, 2015

Uploaded the log to https://gist.github.com/genebean/9d042133cacc7ebf3512 Check out around line 603.

@ferventcoder
Copy link
Contributor

Have you tried to upgrade choco in previous versions or is this the first time?

@genebean
Copy link
Author

genebean commented Jul 8, 2015

The is the second version in a row that I have had the same issue.

@ferventcoder
Copy link
Contributor

This is 0.9.9.x upgrading to 0.9.9+ series though, which is believed to work. But apparently it is failing.

@ferventcoder
Copy link
Contributor

@genebean followup here - what I think I see happening is that something is running choco in the background.

DavidS pushed a commit to DavidS/puppetlabs-chocolatey that referenced this issue Mar 24, 2017
(MODULES-4098) Sync the rest of the files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants