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

Issue for "nagios.configtest error" on nagios versions >=4.3.3 #567

Closed
mbartholomewsm opened this issue Apr 5, 2018 · 2 comments
Closed
Labels
Stale This is marked as stale and will be closed shortly

Comments

@mbartholomewsm
Copy link

Cookbook version

7.2.6

Chef-client version

12.18.31

Platform Details

Ubuntu Trusty 14.04.5

Scenario:

Use the nagios service (v4.3.4) on my Ubuntu host with community chef cookbook for nagios (7.2.6).

The nagios service won't start without an update to the /etc/passwd file for nagios user.
Most likely due to this change in Nagios Core:
NagiosEnterprises/nagioscore#416

Related documentation here:
https://support.nagios.com/kb/article/nagios-core-error-could-not-create-or-update-nagios-configtest-760.html

Steps to Reproduce:

  • Bootstap an instance running Ubuntu 14.04.05 (Trusty).
    Chef wrapper cookbook that references upstream nagios community cookbook (v 7.2.6)

  • Include chef attributes which will download, compile, and install nagios 4.3.4 core via tarball.

  • sudo chef-client Upstart to start the nagios service.

Expected Result:

I expect a sudo chef-client run on the instance to start/restart nagios service without errors.

Actual Result:

Running configuration check...
ERROR: Could not create or update '/var/lib/nagios3/nagios.configtest'

I also have the following entry in the /etc/passwd:

nagios:x:...:...::/var/lib/nagios:/bin/false

Possible solution

As per the nagios core doc, assumably Ubuntu requires the bash shell defined parameters: bin/bash.

nagios:x:...:...::/var/lib/nagios:/bin/bash

It appears that there are two paths to resolution depending on the OS in use.

  • no shell
  • bash shell

user node['nagios']['user'] do

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
@ramereth ramereth added the Stale This is marked as stale and will be closed shortly label Oct 4, 2020
@github-actions
Copy link

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This is marked as stale and will be closed shortly
Projects
None yet
Development

No branches or pull requests

3 participants