Further issues upgrading to Lenny

From Wiki

Jump to: navigation, search

Contents

Issues and Problems encountered when dist-upgrading Etch to Debian Lenny

As the list on the homepage of this wiki was getting large, I had to put this sub page.

munin with cgi

So basically after I dist-upgraded to Lenny, munin graphs would not generate via the cgi script in /usr/lib/cgi-bin/munin-cgi-graph

The graphs would not render. The html page would come up correctly, and the cgi script start. Top on the server showed a lot of processing of the graphs, and this timed-out after a while. After going back over my munin notes on Munin_Statistics I tailed /var/log/apache2/error.log. This is what I got:

Timeout waiting for output from CGI script /usr/lib/cgi-bin/munin-cgi-graph
Premature end of script headers: munin-cgi-graph

Unfortunately I did not get any other errors. I looked at /usr/lib/cgi-bin/munin-cgi-graph, and found that it was referencing munin-graph. I wanted to check that it still worked, so from my notes above I ran:

/usr/share/munin/munin-graph --force-root
#it worked with no problems. It outputted the correct png's in the correct location.
#something was wrong with the actual cgi file (or apache's cgi handling)

I said I'd try and get fast-cgi to process the graphs. I followed Debians link to: http://munin.projects.linpro.no/wiki/CgiHowto and http://munin.projects.linpro.no/ticket/3 Using http://blog.loftninjas.org/2008/09/16/munin-cgi-graph-with-fastcgi-on-debian-etch/ I apt-get installed fast-cgi from non-free. I added in the handler, and got fast-cgi to process the graphs. Still no joy. Here are the logs in /var/log/apache2/error.log from fast-cgi:

[Sat Apr 25 14:27:55 2009] [error] [client 89.204.231.3] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/munin-cgi-graph"
[Sat Apr 25 14:27:55 2009] [warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/munin-cgi-graph" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

Still no further information. I tried applying the diff from the previous two links, however there were issues applying the diff, and the resultant munin-cgi-graph still did not work.

After having spent a while at this, I had another server running munin via cgi (not fast-cgi) albeit it running Ubuntu. I said I'd try its munin-cgi-graph, and volia.

So. Debian Lenny's /usr/lib/cgi-bin/munin-cgi-graph is broken. I did not have a chance to diff the Debian and Ubuntu files. You can get the Ubuntu one (which worked OK for me using cgi) here http://wiki.kartbuilding.net/munin-cgi-graph


apache2

Starting web server: apache2[Sat Apr 25 12:33:41 2009] [warn] The Alias directive in /etc/apache2/apache2.conf at line 240 will probably never match because it overlaps an earlier Alias.

This is simple enough to fix. The reason this error appears is that a new Alias module was added. This added to the fact that I kept my original apache2.conf when dist-upgrading. In the original apache2.conf there was an Alias line present, and now with the new module the two overlapped. To solve this:

vi /etc/apache2/apache2.conf
#search for Alias. More than likely the following line will have to be commented out:
#Alias /icons/ "/usr/share/apache2/icons/"
/etc/init.d/apache2 reload   #to check.

nagios nagios2 nagios3

I was very disappointed with how the dist-upgrade from etch to lenny handled nagios. V.E.R.Y.

When doing the apt-get dist-upgrade, I did see that it was going to remove nagios-text which was nagios version 2. I had assumed however that it would remove and replace it with its equivalent. There was also no mention of nagios in the emails to root from apt-listchanges.

So when I went to look at nagios after the dist-upgrade, I had a lot of work ahead of me :-/

nagios was removed. It was not replaced. I had to do various and many things to get it all back working. Below is a list of things I had to do.

1. apt-get install nagios3  (choose to config manually, and unselect all apache auto configs.) 
2. A whole bunch of errors appeared!!
   *** WARNING: ucf was run from a maintainer script that uses debconf etc. etc. etc. etc.
3. I continued on.
4. /etc/init.d/nagios3 start
5. check if the new nagios3 starts. Of course its now using a empty and default setup from /etc/nagios3
6. rm /etc/init.d/nagios (if exists)
7. sysv-rc-conf  (enable nagios3, if it is not already)
8. cp /etc/nagios/* /etc/nagios3/conf.d/
9. cd /etc/nagios3/conf.d/
10. rm all nagios.cfg and templates and other non contacts,services,hosts and configs
11. vi /usr/share/doc/nagios3/README.Debian
12. Change host-notify-by-email and notify-by-email to: notify-host-by-email and notify-service-by-email
13. I had to remove/uncomment "contact_groups" from hostgroups.cfg
14. I kept restarting nagios3 via /etc/init.d/nagios3 until there were no init errors.
15. Over to apache's sites-enabled. Edit the vhost and change necessary cgis to /usr/lib/cgi-bin/nagios3/*
16. Check /etc/nagios3/apache.conf for more information.

Test and test. I didn't expect to have had to do all this.


duplicity

I use duplicity for encrypted backup. After dist-upgrading to Lenny, it did'nt work. Duplicity on Lenny requires ncftp. Not a big problem.

apt-get install ncftp
#not sure why there was not a dependency there and for ncftp to automatically be installed. (maybe because it can also be used over scp).

Personal tools