Nagios Dienst startet nicht

Hallo,
ich habe hier ein frisch installiertes und gepatchtes 4.1-1 errata153 (Vahr)
Bisher ist nur der DHCP Server installiert und Nagios.
Egal was ich bisher versucht habe, der Dienst NAGIOS startet nicht.

[quote]Interner Modul-Fehler: Ein Fehler trat während des Ausführens des Befehls auf.
Fehlernachricht des Servers:
Die folgenden Dienste konnten nicht gestartet werden: nagios3[/quote]

[code]root@master:~# /etc/init.d/nagios3 start
[…] Starting nagios3 monitoring daemon: nagios3
Nagios Core 3.4.1
Copyright © 2009-2011 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL

Website: http://www.nagios.org
Reading configuration data…
Read main config file okay…
Processing object config directory ‘/etc/nagios3/conf.local.d’…
Processing object config directory ‘/etc/nagios3/conf.univention.d’…
Processing object config directory ‘/etc/nagios3/conf.univention.d/hostgrps’…
Error: Could not open config directory member ‘/etc/nagios3/conf.univention.d/hostgrps/computers.cfg’ for reading.
Error processing object config files!

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

[FAIL] errors in config! … failed!
failed!
root@master:~#
[/code]

Der UCS Server hat unter Geräte - Erweiterte Einstellungen zugeordnete Nagios-Dienste.
Er schreibt ja oben beim Dieststart das er die /etc/nagios3/conf.univention.d/hostgrps/computers.cfg nicht lesen kann.
Hier sind die Berechtigungen

drw-r--r-- 2 root nogroup 4,0K Sep 13 2015 . drwxr-xr-x 9 root nogroup 4,0K Apr 2 2015 .. -rw-r--r-- 1 root nogroup 163 Sep 13 2015 computers.cfg -rw-r--r-- 1 root nogroup 143 Sep 12 2015 dc_computers.cfg

Ist das ein Berechtigungsproblem?
Vielen Dank für jede Anregung im Voraus.

Hallo,

die Berechtigungen auf /etc/nagios3/conf.univention.d/hostgrps/computers.cfg sind hier auf 2 Vergleichssystemen ebenfalls “644 root:nogroup”.

Der Inhalt ist eine Nagios-Hostgroup deren Liste aus den Objekten in OU=computers mit aktivem Nagios-Support gebildet wird.
In etwa so:

root@master:/etc/nagios3/conf.univention.d/hostgrps# cat computers.cfg define hostgroup { hostgroup_name computers alias Hostgroup computers members host1.domain.local, host2.domain.local, host3.domain.local }

Diese Konfigurationsdateien werden über einen Listener bei Änderung der Nagios-Definitionen im LDAP geschrieben.

Viele Grüße,
Dirk Ahrnke

Hallo Herr Ahrnke,
die hostgrps sieht bei mir genau so aus wie in Ihnem Beispiel nur eben mit meinen Hostnamen. Die Rechte auf die Dateien sind auch gleich.
Die Namesauflösung per nslookup funktioniert auch prima.

Der Dienst “nagios” will nach wie vor einfach nicht starten.

Ein Aufruf im Browser ipdaresse/nagios fragt nach einem Passwort.
Obwohl die richtigen Credentials eingegeben werden kommt der Promt immer wieder.

es ist wohl doch das hostgrps Verzeichnis selbst. Das müsste 755 sein.

so der Dienst läuft laut der UMC. Die Rechte sehen wie folgt aus:

root@master:/etc/nagios3# ls -lah insgesamt 152K drwxr-xr-x 6 root root 4,0K Apr 18 13:27 . drwxr-xr-x 141 root root 12K Apr 18 13:59 .. -rw-r--r-- 1 root root 1,5K Apr 18 13:27 apache2.conf -rw-r--r-- 1 root root 2,0K Mär 17 2014 apache2.conf.debian -rw-r--r-- 1 root root 10K Apr 18 13:27 cgi.cfg -rw-r--r-- 1 root root 13K Mär 21 2014 cgi.cfg.debian -rw-r--r-- 1 root root 2,4K Mär 17 2014 commands.cfg drwxr-xr-x 2 root root 4,0K Okt 26 23:15 conf.d drwxr-xr-x 2 root root 4,0K Nov 4 00:17 conf.local.d drwxr-xr-x 9 root nogroup 4,0K Apr 2 2015 conf.univention.d -rw-r--r-- 1 root root 31K Apr 18 13:27 nagios.cfg -rw-r--r-- 1 root root 44K Mär 17 2014 nagios.cfg.debian -rw-r----- 1 root nagios 1,3K Mär 17 2014 resource.cfg drwxr-xr-x 2 root root 4,0K Okt 26 23:15 stylesheets

Die Lösung zum starten des Dienstes war die folgende:

root@master:/etc/nagios3/conf.univention.d# chmod 755 -R *

Dabei hätte ich eine Fragen nach Bremen. Warum ist das so?

Nun muss ich mich nur noch anmelden können. In der /var/log/auth.log sehe ich das folgende:

Apr 18 14:31:11 master apache2: pam_unix(nagios:auth): authentication failure; logname= uid=33 euid=33 tty= ruser= rhost=192.168.xxx.xxx user=Administrator Apr 18 14:31:11 master apache2: pam_krb5(nagios:auth): authentication failure; logname=Administrator uid=33 euid=33 tty= ruser= rhost=192.168.xxx.xxx

Ein ähnliches Problem gab es wohl hier: Nagios-Anmeldung nicht möglich
Also habe ich eben versucht das Passwort über die UMC zu ändern. (War eingeloggt als Admin, Einstellungen Passwort ändern)


Apr 18 14:35:37 master python2.7: pam_unix(univention-management-console:chauthtok): user "Administrator" does not exist in /etc/passwd


EDIT ::: EDIT ::: EDIT
Sorry für Pushen vorab. Ich habe nun eine Lösung gefunden. Das gleiche Problem wurde schonmal hier behandelt. Nagios anmeldung schlägt fehl
Aber es scheint mir so als ob da keine richtige Lösung gefunden wurde. bzw. keiner weiss welche Auswirkungen dieser Workaround habe wird. Hier die Ausgabe von:

root@master:~# ucr search samba/interfaces
samba/interfaces/bindonly: yes
 If this variable is set to 'yes', Samba only listens to requests on the network interfaces specified in the variable 'samba/interfaces'. If the variable is unset, Samba listens on all interfaces.

samba/interfaces: eth0
 If the variable 'samba/interfaces/bindonly' is set to 'yes', Samba only binds to the interfaces listed in this variable. Multiple entries need to be separated by blanks.

root@master:~# nc -v -z 127.0.0.1 88 nc: connect to 127.0.0.1 port 88 (tcp) failed: Connection refused

root@master:~# nc -v -z 192.168.xxx.xxx 88
Connection to 192.168.xxx.xxx 88 port [tcp/kerberos] succeeded!

Die Schritte die ich unternommen habe waren die folgenden:

Durch das Löschen dieser Variablen ist die Anmeldung im Nagios möglich:

Aber welche Auswirkungen hat das Löschen der Variablen? Wie gesagt das System ist frisch aufgesetzt.

Soweit ich mich erinnere, tritt der Effekt “kann nicht an Nagios anmelden” auf, wenn Nagios und Samba 4 auf demselben System installiert sind, “samba/interfaces/bindonly” gesetzt und in “samba/interfaces” das Interface “lo” nicht enthalten ist.
Ich kann allerdings nicht nachvollziehen, wann und aus welchem Grund diese Variablen gesetzt werden. Bei einer Testinstallation von S4 waren sie leer, genau wie bei allen anderen Systemen auf denen ich im Moment nachsehen kann,

Mastodon