[MacPorts] #42474: munin: all plugins fail with "can't drop privileges: setrgid() not implemented at /opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261"
MacPorts
noreply at macports.org
Wed Feb 12 08:44:47 PST 2014
#42474: munin: all plugins fail with "can't drop privileges: setrgid() not
implemented at /opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line
261"
------------------------------+--------------------------------
Reporter: pierre.bauduin@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Keywords: | Port:
------------------------------+--------------------------------
On a brand new iMac running MacOSX 10.9 "Mavericks", I clean installed the
'''munin''' port.
This port is the equivalent of the munin-node package on Debian. Basically
it listens on port 4949 from the munin server. Commands from the munin
server can be "list" to list all available plugins or "fetch <plugin>" to
fetch a particular plugin. One can easily test the plugins by doing telnet
127.0.0.1 4949 then fetch <plugin>
== Problem ==
All munin plugins fail with "#Bad exit":
{{{
telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is
# munin node at albert
list
df df_inode http_loadtime if_en0 if_err_en0 load lpstat netstat ntp_offset
processes users
fetch load
# Bad exit
.
fetch users
# Bad exit
.
}}}
Let's look what is going in the log file'''/opt/local/var/log/munin/munin-
node.log''':
{{{
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27061] Plugin 'users'
Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 19.\n. Bailing out.
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27063] Plugin
'if_err_en0' Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 21.\n. Bailing out.
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27065] Plugin 'df'
Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 23.\n. Bailing out.
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27067] Plugin
'netstat' Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 25.\n. Bailing out.
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27069] Plugin
'lpstat' Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 27.\n. Bailing out.
2014/02/12-17:30:06 [27043] 2014/02/12-17:30:06 [27071] Plugin 'load'
Can't drop privileges: setruid() not implemented at
/opt/local/lib/perl5/site_perl/5.12.4/Munin/Node/OS.pm line 261, <STDIN>
line 29.\n. Bailing out.
}}}
== Solution ==
The problem is actually in file '''/opt/local/etc/munin/munin-
node.conf'''.
Just change the user and group to:
{{{
user munin
group munin
}}}
Load and unload the munin-node plist:
{{{
sudo launchctl unload /Library/LaunchDaemons/org.macports.munin-node.plist
sudo launchctl load /Library/LaunchDaemons/org.macports.munin-node.plist
}}}
... and the munin plugins now run perfectly.
{{{
telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is
# munin node at albert
fetch cpu
system.value 0
user.value 1
idle.value 99
.
fetch users
tty.value 7
pty.value 0
pts.value 0
X.value 0
other.value 1
.
}}}
--
Ticket URL: <https://trac.macports.org/ticket/42474>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list