livestatus socket permission

Bug #1623658 reported by Kevin Metz
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Nagios Charm
Fix Released
Undecided
Unassigned
check-mk (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After you set juju set nagios enable_livestatus=true,
/var/lib/nagios3/livestatus is created with drw-rwS--- 2 nagios www-data 2 Sep 14 20:38
and a socket file is created. However, restarting nagios gives:

[1473885439] livestatus: Livestatus 1.2.2p3 by Mathias Kettner. Socket: '/var/lib/nagios3/livestatus/socket'
[1473885439] livestatus: Please visit us at http://mathias-kettner.de/
[1473885439] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1473885439] livestatus: Please visit OMD at http://omdistro.org
[1473885439] livestatus: Unable to bind adress /var/lib/nagios3/livestatus/socket to UNIX socket: Permission denied
[1473885439] Error: Function nebmodule_init() in module '/usr/lib/check_mk/livestatus.o' returned an error. Module will be unloaded.
[1473885439] Event broker module '/usr/lib/check_mk/livestatus.o' deinitialized successfully.
[1473885439] Finished daemonizing... (New PID=27002)

Related branches

Revision history for this message
Xav Paice (xavpaice) wrote :

workaround: chmod 2771 /var/lib/nagios3/livestatus

tags: added: canonical-bootstack
Revision history for this message
Xav Paice (xavpaice) wrote :

This appears to be a packaging issue for mklivestatus, the charm doesn't set permissions at all. While we could update the charm to work around the perms, fixing the package would be a more long term plan.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in check-mk (Ubuntu):
status: New → Confirmed
Xav Paice (xavpaice)
affects: nagios (Juju Charms Collection) → check-mk (Ubuntu)
Changed in check-mk (Ubuntu):
status: New → Confirmed
Revision history for this message
Haw Loeung (hloeung) wrote :

I don't think this is an issue with the check-mk package. I had a look and no where does it specify the socket to use, that's actually user configured when enabling - you need to add 'broker_module' config like the below to /etc/nagios3/nagios.cfg:

| broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/livestatus/socket

Maybe the charm (or whatever configures livestatus) move the socket to /var/run?

Revision history for this message
Xav Paice (xavpaice) wrote :

In https://git.launchpad.net/nagios-charm/tree/hooks/install the Nagios charm creates the mklivestatus directory and sets perms. We will need to change this to add +x.

Revision history for this message
Xav Paice (xavpaice) wrote :
Xav Paice (xavpaice)
Changed in nagios-charm:
status: New → In Progress
Revision history for this message
Xav Paice (xavpaice) wrote :
Xav Paice (xavpaice)
Changed in nagios-charm:
status: In Progress → Fix Committed
Xav Paice (xavpaice)
Changed in nagios-charm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.