zabbix-agent-chocolatey icon indicating copy to clipboard operation
zabbix-agent-chocolatey copied to clipboard

Upgrade to 6.4.5 or 6.4.6 fails with cannot create a file when that file already exists

Open anthonysomerset opened this issue 2 years ago • 0 comments

When i attempt to update zabbix-agent from older versions (confirmed 6.2.3 and 5.4.3) the upgrade fails with following error

Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): a

Extracting 64-bit C:\ProgramData\chocolatey\lib\zabbix-agent\tools\zabbix_agent-6.4.6-windows-amd64-openssl.zip to C:\Users\asomerset\AppData\Local\Temp\chocolatey\chocolatey\zabbix...
C:\Users\asomerset\AppData\Local\Temp\chocolatey\chocolatey\zabbix
Error installing Zabbix Agent
ERROR: Cannot create a file when that file already exists.

The upgrade of zabbix-agent was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\zabbix-agent\tools\chocolateyInstall.ps1'.
 See log for details.

Current workarounds that work - and do not seem to be entirely consistent:

  1. Stop Zabbix Agent Service and redo upgrade
  2. Stop Zabbix Agent Service, Delete the Bin files in Program Files/Zabbix Agent and redo upgrade
  3. In some even weirder edge cases when bin files can't be deleted (locked by event viewer process no less), stop, service, rename them and then run the upgrade

anthonysomerset avatar Sep 13 '23 10:09 anthonysomerset