-
Notifications
You must be signed in to change notification settings - Fork 289
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
Could not execute posix command: No such file or directory - #1304
Comments
I installed |
Based on that stack trace you have |
I believe, that since I have: |
If I don't use Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Subscription[lg]/Sensu_agent_entity_config[sensu::agent::subscription lg]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Subscription[devops_linux]/Sensu_agent_entity_config[sensu::agent::subscription devops_linux]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Subscription[linux_metrics]/Sensu_agent_entity_config[sensu::agent::subscription linux_metrics]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Subscription[vmware]/Sensu_agent_entity_config[sensu::agent::subscription vmware]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[host_name]/Sensu_agent_entity_config[sensu::agent::label host_name]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[fqdn]/Sensu_agent_entity_config[sensu::agent::label fqdn]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[ip_address]/Sensu_agent_entity_config[sensu::agent::label ip_address]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[ip6_address]/Sensu_agent_entity_config[sensu::agent::label ip6_address]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[domain_password]/Sensu_agent_entity_config[sensu::agent::label domain_password]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[nagios_check_path]/Sensu_agent_entity_config[sensu::agent::label nagios_check_path]: Sensu namespace 'default' must be defined or exist
Error: /Stage[main]/Sensu::Agent/Sensu::Agent::Label[metrics_label]/Sensu_agent_entity_config[sensu::agent::label metrics_label]: Sensu namespace 'default' must be defined or exist
Error: Failed to apply catalog: Some pre-run checks failed |
to be clear: |
That error you get because of validate_namespace being false is actually because the agent API is unable to verify the namespace you specified exists. If you run puppet locally on one of those hosts and pass the There could be many reasons for that, the most common is you don't have If both of those are set for both agents and backends, then the next issue could be the agent simply can not communicate with the backend API. You can test that by on the agent doing something like this:
Adjust as needed for your backend environment. |
Also you should not have |
Sensu API is reachable everywhere (it's a virtualhost, on haproxy, with Keepalived: it's always up) # curl https://sensuapi.XXXX.org:443/version
{"etcd":{"etcdserver":"3.3.22","etcdcluster":"3.3.0"},"sensu_backend":"6.2.3"} What I didn't like, to be honest, is that Sensu became a single point of failure for puppet: if the agent is not being able to contact the API host, puppet hangs, and fails. I have a cluster with 3 nodes, but I could not set the API to use the 3 nodes, and I didn't want to have the agents, failing for this reason. |
it seems to be working if I use |
We have it on our roadmap to support an array for What parameter cannot be used? Please clarify. |
The parameter that I'm not able to use it |
The Puppet code by default will check to see if a resource's defined namespace exists on the backend. So if you define a The purpose of |
but, in that case (I use your words, the case where someone defines thousands of resource that all end up validating their namespace) it won't work, if sensuctl is not available. |
Those thousands of resources would all be defined on the backend, and the way this module works is the backend hosts always have sensuctl. The slow down with namespace validation is when a single catalog contains thousands of resources, not when thousand of agents each validate a namespace for a resource. The way this module is designed is most sites should be defining all resources on the backend host, and agents only define sensu_agent_entity_config resources. |
Understood. Thanks. |
Description of problem
This is the error that I have observed the logs:
The error appears on a number of machines (not all) and I'm not able to state the difference between these VMs.
I am not using
agent_entity_config_provider
, in any case (this is important, see below) hence, it should default to API.I enabled
trace
anddebug
to and I found out that the problem was caused by a provider in the Sensu module, attempting to runsensuctl
.The sensu provider is this one:
# ll /opt/puppetlabs/puppet/cache/lib/puppet/provider/sensuctl.rb -rw-r--r-- 1 root root 6204 Jan 28 00:02 /opt/puppetlabs/puppet/cache/lib/puppet/provider/sensuctl.rb
The text was updated successfully, but these errors were encountered: