Open AnonSS opened 3 years ago
@AnonSS Does C:/Program Files (x86)/nxlog/conf/
exist currently on the system throwing the error?
@genebean no it does not currently reside. I have also created the folders manually and it throws other errors. However, the NXLog app did exist at some point but was unistalled in order to test this module.
Do you mind sharing exactly how you are calling the module so I can try and reproduce the problem?
Certainly. I am using the exact way the Readme suggests:
class {'nxlog':
conf_dir => 'C:/Program Files (x86)/nxlog/conf', # note the /'s here
conf_file => 'nxlog.conf',
ensure_setting => latest,
nxlog_root => 'C:\Program Files (x86)\nxlog',
}
nxlog::config::extension { 'gelf':
ext_module => 'xm_gelf',
}
nxlog::config::input { 'eventlog_gelf':
input_module => 'im_mseventlog',
}
nxlog::config::output { 'om_udp':
output_file_path => 'C:\\Program Files (x86)\\nxlog\\data\\dataeventlog-gelf.txt',
output_module => 'om_file',
}
nxlog::config::output { 'logserver':
output_address => '192.168.0.48',
output_module => 'om_udp',
output_port => '6514',
}
nxlog::config::route { 'local':
route_destination => [ 'local_json', ],
route_source => [ 'eventlog_json', ],
}
nxlog::config::route { '1':
route_destination => [ 'logserver', ],
route_source => [ 'eventlog_gelf', ],
}
I have gotten around the problem by adding this snippet to the top of the profile:
package { 'NXLog-CE':
ensure => '2.10.2150',
source => 'https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi'
}
I can still use the mod to manage the config file. Thank you.
Sorry I missed your first reply! I’ll see if I can get this fixed as your fix indicates it wasn’t getting installed via Chocolatey like it should. I’m wondering if something has changed with either the upstream Chocolatey module or the package that it pulls down.
Hi,
I am getting this error with the default suggested config (please see full error below).
puppet server version: 6.15 Puppet agent: 7 (I also tried to run with lower versions with the same result).
Any ideas?
puppet : [1;31mError: Could not set 'file' on ensure: No such file or directory - A directory component in C:/Program Files (x86)/nxlog/conf/nxlog.conf20210508-4684-bdgpzl.lock does not exist or is a dangling symbolic link[0m At line:1 char:7
[1;31mError: Could not set 'file' on ensure: No such file or directory - A directory component in C:/Program Files (x86)/nxlog/conf/nxlog.conf20210508-4684-bdgpzl.lock does not exist or is a dangling symbolic link Wrapped exception: No such file or directory - A directory component in C:/Program Files (x86)/nxlog/conf/nxlog.conf20210508-4684-bdgpzl.lock does not exist or is a dangling symbolic link[0m [1;31mError: /Stage[main]/Nxlog::Config/Concat[C:/Program Files (x86)/nxlog/conf/nxlog.conf]/File[C:/Program Files (x86)/nxlog/conf/nxlog.conf]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in C:/Program Files (x86)/nxlog/conf/nxlog.conf20210508-4684-bdgpzl.lock does not exist or is a dangling symbolic link (corrective)[0m [mNotice: /Stage[main]/Nxlog::Service/Service[nxlog]: Dependency File[C:/Program Files (x86)/nxlog/conf/nxlog.conf ] has failures: true[0m [1;33mWarning: /Stage[main]/Nxlog::Service/Service[nxlog]: Skipping because of failed dependencies[0m [1;33mWarning: /Stage[main]/Nxlog/Anchor[nxlog::end]: Skipping because of failed dependencies[0m