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

Windows zabbix agent could not be installed if C:\programdata\zabbix folder missing #882

Open
DYKenoby opened this issue Aug 2, 2023 · 0 comments

Comments

@DYKenoby
Copy link

DYKenoby commented Aug 2, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.13.0
  • Ruby: 2.7.4p191
  • Distribution: Alt linux 10
  • Module version: v9.2.0

How to reproduce (e.g Puppet code you use)

$tmpdir = $facts['windows_env']['TMP'];

download_file { 'get zabbix-installer.msi':
url => "https:///zabbix_agent-${zabbix_version}-windows-amd64-openssl.msi",
destination_directory => $tmpdir,
destination_file => "zabbix_agent-windows-amd64-openssl.msi",
}

class { 'zabbix::agent':
zabbix_version => $zabbix_version,
manage_resources => true,
manage_choco => false,
zabbix_package_agent => "Zabbix Agent (64-bit)",
zabbix_package_state => present,
zabbix_package_provider => 'windows',
zabbix_package_source => "${tmpdir}/zabbix_agent-windows-amd64-openssl.msi",
}

What are you seeing

Error: Could not set 'file' on ensure: No such file or directory - A directory component in C:/ProgramData/zabbix/zabbix_agentd.conf20230802-2972-nhiw
gb.lock does not exist or is a dangling symbolic link (file: /etc/puppet/code/environments/production/modules/zabbix/manifests/agent.pp, line: 357)
Error: Could not set 'file' on ensure: No such file or directory - A directory component in C:/ProgramData/zabbix/zabbix_agentd.conf20230802-2972-nhiw
gb.lock does not exist or is a dangling symbolic link (file: /etc/puppet/code/environments/production/modules/zabbix/manifests/agent.pp, line: 357)
Wrapped exception:
No such file or directory - A directory component in C:/ProgramData/zabbix/zabbix_agentd.conf20230802-2972-nhiwgb.lock does not exist or is a dangling
 symbolic link
Error: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.conf]/ensure: change from 'absent' to 'file' failed: Could not set 'file' o
n ensure: No such file or directory - A directory component in C:/ProgramData/zabbix/zabbix_agentd.conf20230802-2972-nhiwgb.lock does not exist or is
a dangling symbolic link (file: /etc/puppet/code/environments/production/modules/zabbix/manifests/agent.pp, line: 357)
Notice: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.d]: Dependency File[C:/ProgramData/zabbix/zabbix_agentd.conf] has failures
: true
Warning: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.d]: Skipping because of failed dependencies
Warning: /Stage[main]/Zabbix::Agent/Service[Zabbix Agent]: Skipping because of failed dependencies
Notice: Applied catalog in 3.02 seconds

What behaviour did you expect instead

Notice: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.conf]/ensure: defined content as '{sha256}c71c71d5e97c915325295803c8c201ba
b4ca55e02a5f48d5a5dc3b83b24e0c69'
Info: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.conf]: Scheduling refresh of Service[Zabbix Agent]
Notice: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.d]/ensure: created
Info: /Stage[main]/Zabbix::Agent/File[C:/ProgramData/zabbix/zabbix_agentd.d]: Scheduling refresh of Service[Zabbix Agent]
Notice: /Stage[main]/Zabbix::Agent/Service[Zabbix Agent]: Triggered 'refresh' from 2 events
Notice: Applied catalog in 4.15 seconds

Output log

Any additional information you'd like to impart

Created folder C:\programdata\zabbix manually, fixed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant