Solved Compilation Failed when installing Munin-Node

Hi Guys,
I'm trying to install and configure Munin for FreeBSD on 10.1-RELEASE-p24.
I have tried following several user guides which are all slightly different according to their age, which makes things even more puzzling! Yesterday I actually seemed to have munin-node working but today it's not playing ball. So far I've tried these guides -

http://www.freebsdmadeeasy.com/tutorials/web-server/monitoring-with-munin.php
http://www.cyberciti.biz/faq/freebsd-install-munin-network-system-monitoring-application/
http://www.aisecure.net/2011/02/16/monitor-systems-using-munin/

The current issue seems to be a compilation error on a perl dependency.

This is what I get when I try to start the munin-node service -
Code:
root@bkupbox:/usr/local/etc/rc.d # service munin-node start
Starting munin_node.
Base class package "Net::Server::Fork" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available in Inc (Inc contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach). at /usr/local/lib/perl5/site_perl/Munin/Node/Server.pm line 5.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Munin/Node/Server.pm line 5.
Compilation failed in require at /usr/local/sbin/munin-node line 36.
BEGIN failed--compilation aborted at /usr/local/sbin/munin-node line 36.
/usr/local/etc/rc.d/munin-node: WARNING: failed to start munin_node

I have tried uninstalling and reinstalling munin-node without success.

Any help would be gratefully received.
 
Great! Thanks very much for your help. I reinstalled p5-Net-Server using pkg install and it's now up and running.
I have now been following this guide describing the configuration of apache24 and munin -

https://artinground.wordpress.com/2013/06/26/munin-on-freebsd/

So I have done this -

Code:
Now, we have to configure our webserver. In this case I assume that apache is being used and Munin has been installed in /usr/local/www/munin, so I will create a munin.conf in my /usr/local/etc/apache22/Includes directory

Alias /munin “/usr/local/www/munin/”
<Directory /usr/local/www/munin>

Options none
AllowOverride All
Order Deny,Allow
Deny from all
Allow from all

</Directory>

I have also made this change -

Code:
# chown -R munin:munin /usr/local/www/munin/

Unfortunately I now have an http error 500 -

Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at sysadmin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log

Presumably I need to make some other changes? Can you help?
 
Have a look in the Apache error log: /var/log/apache_error.log. It's usually a missing PHP module or a configuration error.
 
Thank you so much for helping a newbie. Yes, you're quite right, I should have checked the logs - and I thought of this a second after posting! Anyway I commented out a couple of things in the munin conf that Apache was complaining about and restarted Apache and munin-node successfully. However, I was puzzled by the apparent lack of output from munin. I had dropped a test index.html file into /usr/local/www/munin and Apache picked this up no problem, so I was pretty sure Apache was working ok. A quick check of top revealed that Perl, httpd and cron were running, but still no output html files from munin?? Ok, so I knew that there should be a cron job running every 5 minutes (according to the documentation and user guides I had read) so I ran this -

Code:
root@bkupbox:/var/cron/tabs # cat munin
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Wed Dec 16 21:26:43 2015)
# (Cron version -- $FreeBSD: releng/10.1/usr.sbin/cron/crontab/crontab.c 239991 2012-09-01 14:45:15Z ed $)
#BEGIN_MUNIN_MAIN
MAILTO=root

*/5 * * * *  /usr/local/bin/munin-cron
#END_MUNIN_MAIN

then I tried this -

Code:
root@bkupbox:/var/cron/tabs # sh /usr/local/bin/munin-cron
Can't locate Socket6.pm in @INC (you may need to install the Socket6 module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach .) at /usr/local/lib/perl5/site_perl/IO/Socket/INET6.pm line 38.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/IO/Socket/INET6.pm line 40.
Compilation failed in require at /usr/local/lib/perl5/site_perl/Munin/Master/Node.pm line 18.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Munin/Master/Node.pm line 18.
Compilation failed in require at /usr/local/lib/perl5/site_perl/Munin/Master/UpdateWorker.pm line 17.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Munin/Master/UpdateWorker.pm line 17.
Compilation failed in require at /usr/local/lib/perl5/site_perl/Munin/Master/Update.pm line 17.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Munin/Master/Update.pm line 17.
Compilation failed in require at /usr/local/share/munin/munin-update line 14.
BEGIN failed--compilation aborted at /usr/local/share/munin/munin-update line 14.

So I checked freshports here -

https://www.freshports.org/net/p5-Socket6/

and did this -

Code:
cd /usr/ports/net/p5-Socket6/ && make install clean

This failed with an error message about an older version already installed. It suggested that I use this -

Code:
make reinstall clean

So I uninstalled p5-Socket6 and reran make install clean which completed successfully.

I then ran the munin cron job here as root and got this message -

Code:
root@bkupbox:/usr/ports/net/p5-Socket6 # sh /usr/local/bin/munin-cron
This program will easily break if you run it as root as you are
trying now.  Please run it as user 'munin'.  The correct 'su' command
on many systems is 'su - munin --shell=/bin/bash'
Aborting.

So I reran the job as munin -

Code:
root@bkupbox:/usr/ports/net/p5-Socket6 # su -m munin -c '/usr/local/bin/munin-cron'

SUCCESS!!!!

I checked the munin www directory and was delighted to see this -

Code:
root@bkupbox:/usr/local/www/munin # ls
.htaccess     munin-month.html   sendmail-year.html
.htaccess.sample   munin-week.html     static
101i386-default-job-24   munin-year.html     system-day.html
disk-day.html     network-day.html   system-month.html
disk-month.html     network-month.html   system-week.html
disk-week.html     network-week.html   system-year.html
disk-year.html     network-year.html   time-day.html
index.html     problems.html     time-month.html
munin-cgi-graph     sendmail-day.html   time-week.html
munin-cgi-html     sendmail-month.html   time-year.html
munin-day.html     sendmail-week.html

Opening a web browser with http://bkupbox/munin/ gave me the expected logon dialogue box and after successful login gave me the munin graphs. Hoorah!

The last thing that I should say was that for something that claimed to run out of the box it sure took a lot of work.
The actual installation took hours with shed loads of Perl and Java dependencies being downloaded and installed. This literally took a whole morning! Then all the configuration and tweaking, searching for user guides (that were up to date) and this and that took what felt like a lifetime to a newbie like me.

Please mark this as {SOLVED}

Thanks again for all your help.
 
Back
Top