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

'No such file or directory' error #24

Open
AnonSS opened this issue May 8, 2021 · 6 comments
Open

'No such file or directory' error #24

AnonSS opened this issue May 8, 2021 · 6 comments

Comments

@AnonSS
Copy link

AnonSS commented May 8, 2021

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

  • puppet agent -t
  •   ~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (�[1;31mError: C...mbolic link�[0m:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

�[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

@genebean
Copy link
Owner

genebean commented May 8, 2021

@AnonSS Does C:/Program Files (x86)/nxlog/conf/ exist currently on the system throwing the error?

@AnonSS
Copy link
Author

AnonSS commented May 10, 2021

@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.

@genebean
Copy link
Owner

Do you mind sharing exactly how you are calling the module so I can try and reproduce the problem?

@AnonSS
Copy link
Author

AnonSS commented May 10, 2021

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', ],
}

@AnonSS
Copy link
Author

AnonSS commented May 12, 2021

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.

@genebean
Copy link
Owner

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.

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

2 participants