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

[Bug] Munin-node fails to start when 'host *' is set in munin-node.conf #1641

Open
leemgs opened this issue Dec 31, 2024 · 1 comment
Open

Comments

@leemgs
Copy link

leemgs commented Dec 31, 2024

Describe the bug
The host * in /etc/munin/munin-node.conf can cause errors in munin-node.

I downloaded munin/munin-node from ubuntu 24.04 as shown below and installed it after compiling.
Unfortunately, the “host *” statement in the munin-node.conf file is causing munin-node to fail to run properly.

https://github.com/munin-monitoring/munin/blob/master/etc/munin-node.conf.PL#L81

Munin-node uses a Perl module called Net::Server internally to handle network connections. In the Net::Server module, the host setting must explicitly specify a specific IP address or hostname. When Net::Server actually interprets the * wildcard, it repeatedly attempts to bind all available network interfaces on the system. This process can result in crashes or errors.

To Reproduce
Steps to reproduce the behavior:

  1. sudo apt install munin-node
  2. sudo vi /etc/default/munin-node
    DAEMON_ARGS="--config /etc/munin/munin-node.conf"
  3. vi /etc/munin/munin-node.conf
    host *
  4. sudo systemctl start munin-node
  5. sudo systemctl status munin-node
  6. See below errors

root@u2404:/etc/munin# sudo systemctl start  munin-node
Job for munin-node.service failed because the control process exited with error code.
See "systemctl status munin-node.service" and "journalctl -xeu munin-node.service" for details.
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo systemctl status munin-node
× munin-node.service - Munin Node
     Loaded: loaded (/usr/lib/systemd/system/munin-node.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-12-31 18:22:04 KST; 1s ago
   Duration: 4min 50.784s
       Docs: man:munin-node(1)
             http://guide.munin-monitoring.org/en/stable-2.0/reference/munin-node.html
    Process: 280164 ExecStartPre=/usr/bin/install -o munin -g munin -d /run/munin (code=exited, status=0/SUCCESS)
    Process: 280166 ExecStart=/usr/sbin/munin-node --foreground $DAEMON_ARGS (code=exited, status=1/FAILURE)
   Main PID: 280166 (code=exited, status=1/FAILURE)
        CPU: 140ms

12월 31 18:22:04 u2404 systemd[1]: munin-node.service: Scheduled restart job, restart counter is at 5.
12월 31 18:22:04 u2404 systemd[1]: munin-node.service: Start request repeated too quickly.
12월 31 18:22:04 u2404 systemd[1]: munin-node.service: Failed with result 'exit-code'.
12월 31 18:22:04 u2404 systemd[1]: Failed to start munin-node.service - Munin Node.
root@u2404:/etc/munin#


Expected behavior
When running the sudo systemctl status munin-node command, it should be listed as “Active”.

root@u2404:/etc/munin# sudo systemctl status munin-node
● munin-node.service - Munin Node
     Loaded: loaded (/usr/lib/systemd/system/munin-node.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-12-31 18:17:09 KST; 4min 45s ago
       Docs: man:munin-node(1)
             http://guide.munin-monitoring.org/en/stable-2.0/reference/munin-node.html
    Process: 275353 ExecStartPre=/usr/bin/install -o munin -g munin -d /run/munin (code=exited, status=0/SUCCESS)
   Main PID: 275361 (munin-node)
      Tasks: 1 (limit: 38284)
     Memory: 8.6M (peak: 11.1M)
        CPU: 143ms
     CGroup: /system.slice/munin-node.service
             └─275361 /usr/bin/perl -wT /usr/sbin/munin-node --foreground --config /etc/munin/munin-node.conf

Screenshots & Logs

cat /etc/munin/munin-node.conf  | grep "host "
host *

root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo systemctl start  munin-node
Job for munin-node.service failed because the control process exited with error code.
See "systemctl status munin-node.service" and "journalctl -xeu munin-node.service" for details.
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo systemctl start  munin-node
Job for munin-node.service failed because the control process exited with error code.
See "systemctl status munin-node.service" and "journalctl -xeu munin-node.service" for details.
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo netstat -natp | grep 4949
root@u2404:/etc/munin#

Desktop (please complete the following information):
The following is system environment information to ensure that you can always reproduce it.
For example: Ubuntu version, munin package version, Linux kernel version, Net::Server module version


root@u2404:/etc/munin# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# munin-node --version
Version:
    This is munin-node v2.0.75

Copyright:
    Copyright (C) 2002-2006 Audun Ytterdal, Jimmy Olsen, and Tore Anderson /
    Linpro AS.

    This is free software; see the source for copying conditions. There is
    NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.

    This program is released under the GNU General Public License

root@u2404:/etc/munin# dpkg -l | grep munin
ii  munin                                          2.0.75-1ubuntu1                               all          network-wide graphing framework (grapher/gatherer)
ii  munin-common                                   2.0.75-1ubuntu1                               all          network-wide graphing framework (common)
ii  munin-doc                                      2.0.75-1ubuntu1                               all          network-wide graphing framework (documentation)
ii  munin-node                                     2.0.75-1ubuntu1                               all          network-wide graphing framework (node)
ii  munin-plugins-core                             2.0.75-1ubuntu1                               all          network-wide graphing framework (plugins for node)
ii  munin-plugins-extra                            2.0.75-1ubuntu1                               all          network-wide graphing framework (user contributed plugins for node)
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# uname -a
Linux u2404 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# perl -MNet::Server -e 'print "$Net::Server::VERSION\n"'
2.014
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# cpan -D Net::Server
Reading '/root/.cpan/Metadata'
  Database was generated on Tue, 31 Dec 2024 05:41:02 GMT
Net::Server
-------------------------------------------------------------------------
        (no description)
        R/RH/RHANDOM/Net-Server-2.014.tar.gz
        /usr/share/perl5/Net/Server.pm
        Installed: 2.014
        CPAN:      2.014  up to date
        Paul Seamons (RHANDOM)
        [email protected]

root@u2404:/etc/munin#
root@u2404:/etc/munin#

Additional context
Welcome to any hints and comments. :)

@leemgs
Copy link
Author

leemgs commented Dec 31, 2024

Debug messages

root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo systemctl start  munin-node
Job for munin-node.service failed because the control process exited with error code.
See "systemctl status munin-node.service" and "journalctl -xeu munin-node.service" for details.
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# sudo systemctl status  munin-node
* munin-node.service - Munin Node
     Loaded: loaded (/usr/lib/systemd/system/munin-node.service; enabled; preset: enabled)
     Active: activating (start) since Tue 2024-12-31 18:31:18 KST; 475ms ago
       Docs: man:munin-node(1)
             http://guide.munin-monitoring.org/en/stable-2.0/reference/munin-node.html
    Process: 288905 ExecStartPre=/usr/bin/install -o munin -g munin -d /run/munin (code=exited, status=0/SUCCESS)
   Main PID: 288907 (munin-node)
      Tasks: 1 (limit: 38284)
     Memory: 6.7M (peak: 6.7M)
        CPU: 115ms
     CGroup: /system.slice/munin-node.service
             `-288907 /usr/bin/perl -wT /usr/sbin/munin-node --foreground --config /etc/munin/munin-node.conf

Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Scheduled restart job, restart counter is at 4.
Dec 31 18:31:18 u2404 systemd[1]: Starting munin-node.service - Munin Node...
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin# journalctl -xeu munin-node.service
--
-- A start job for unit munin-node.service has finished with a failure.
--
-- The job identifier is 33596 and the job result is failed.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Scheduled restart job, restart counter is at 4.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit munin-node.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Dec 31 18:31:18 u2404 systemd[1]: Starting munin-node.service - Munin Node...
-- Subject: A start job for unit munin-node.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit munin-node.service has begun execution.
--
-- The job identifier is 33765.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit munin-node.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit munin-node.service has entered the 'failed' state with result 'exit-code'.
Dec 31 18:31:18 u2404 systemd[1]: Failed to start munin-node.service - Munin Node.
-- Subject: A start job for unit munin-node.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit munin-node.service has finished with a failure.
--
-- The job identifier is 33765 and the job result is failed.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit munin-node.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Start request repeated too quickly.
Dec 31 18:31:18 u2404 systemd[1]: munin-node.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit munin-node.service has entered the 'failed' state with result 'exit-code'.
Dec 31 18:31:18 u2404 systemd[1]: Failed to start munin-node.service - Munin Node.
-- Subject: A start job for unit munin-node.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit munin-node.service has finished with a failure.
--
-- The job identifier is 33934 and the job result is failed.
root@u2404:/etc/munin#
root@u2404:/etc/munin#
root@u2404:/etc/munin#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant