Apache2 errors out on cacti.conf probably after updates

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Greetings -
I'm terribly new to Unix, Ubuntu, and Cacti in general. I previously got Ubuntu installed and up (12.04.3 LTS Server 64bit), and Cacti installed and configured (8.8b), and it was monitoring a few switches.

After not having to look at the box/Cacti for a while, I noted it had stopped serving up Cacti. I rebooted it and let it run various updates (likely a mistake). I ran into some issues with my /boot partition being out of space, but I got old kernel images cleaned up, so I appear to have recovered from that.

Still wouldn't come up, and it turns out Apache2 (2.2 is what I have) isn't running. If I try and start that service, it errors out on the cacti.conf, in a way that looks very similar to this other issue posted: http://forums.cacti.net/viewtopic.php?f=2&t=50949

Syntax error on line 6 of /ect/apache2/conf.d/cacti.conf:
Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed.

The current apache2 error.log is empty. My cacti.conf looks exactly like this one:
http://anonscm.debian.org/gitweb/?p=pkg ... b7;hb=HEAD

Any suggestions on what direction to troubleshoot next?
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Well, I did do some further work.
Looks like the versions module wasn't loading for Apache. I reinstalled apache, but that didn't quite fix things (was then tossing a different error).

I reinstalled cacti, and did an upgrade install - that did the trick. Still has my graphs, but Apache will start now.

Wish I had a better understanding of what happened and what fixed it, but did learn various things, so it's not all bad…
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Chanfan wrote:Looks like the versions module wasn't loading for Apache.
Ouch, I was told that that the version module was build in for some time. Apparently not in Ubuntu 12.04. So indeed, either activate the versions module or make the cacti.conf like the previous version.
Chanfan wrote:I reinstalled apache, but that didn't quite fix things (was then tossing a different error).
Please, what is the error message?
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Well, as I said, newby, so take any statements I make with a grain of salt. :D

That said, here's the apache2 error log:

[Tue Oct 08 14:40:21 2013] [notice] ModSecurity for Apache/2.6.3 (http://www.modsecurity.org/) configured.
[Tue Oct 08 14:40:21 2013] [notice] ModSecurity: APR compiled version="1.4.6"; loaded version="1.4.6"
[Tue Oct 08 14:40:21 2013] [notice] ModSecurity: PCRE compiled version="8.12"; loaded version="8.12 2011-01-15"
[Tue Oct 08 14:40:21 2013] [notice] ModSecurity: LUA compiled version="Lua 5.1"
[Tue Oct 08 14:40:21 2013] [notice] ModSecurity: LIBXML compiled version="2.7.8"
[Tue Oct 08 14:40:22 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 08 14:40:38 2013] [error] [client 10.94.209.227] File does not exist: /var/www/cacti
[Tue Oct 08 14:40:38 2013] [error] [client 10.94.209.227] File does not exist: /var/www/favicon.ico
[Tue Oct 08 14:40:38 2013] [error] [client 10.94.209.227] File does not exist: /var/www/favicon.ico
[Tue Oct 08 14:43:22 2013] [notice] caught SIGTERM, shutting down
[Tue Oct 08 15:31:59 2013] [notice] ModSecurity for Apache/2.6.3 (http://www.modsecurity.org/) configured.
[Tue Oct 08 15:31:59 2013] [notice] ModSecurity: APR compiled version="1.4.6"; loaded version="1.4.6"
[Tue Oct 08 15:31:59 2013] [notice] ModSecurity: PCRE compiled version="8.12"; loaded version="8.12 2011-01-15"
[Tue Oct 08 15:31:59 2013] [notice] ModSecurity: LUA compiled version="Lua 5.1"
[Tue Oct 08 15:31:59 2013] [notice] ModSecurity: LIBXML compiled version="2.7.8"
[Tue Oct 08 15:32:00 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch configured -- resuming normal operations
ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
[Tue Oct 08 16:10:22 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
[Tue Oct 08 16:15:23 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
[Tue Oct 08 16:15:23 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
[Tue Oct 08 17:00:28 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
[Tue Oct 08 17:15:30 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
[Wed Oct 09 07:55:49 2013] [notice] Graceful restart requested, doing restart
[Wed Oct 09 07:55:50 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 13 07:56:14 2013] [notice] Graceful restart requested, doing restart
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Chanfan wrote:ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/var/lib/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
What are the file permissions on /var/lib/cacti/rra?
Chanfan wrote:[Tue Oct 08 16:10:22 2013] [error] [client 10.94.209.227] client denied by server configuration: /usr/share/cacti/site/graph_image.php, referer: http://10.94.209.239/cacti/graph_view.p ... on=preview
Do you have any other Apache configuration which might limit access?
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Permissions on var/lib/cacti/rra are:
drwxrwx--- 2 root www-data 16384 May 1 13:30 rra

As for other Apache config, not that I am aware of - the box was set up specifically to run Cacti, and I haven configured anything else.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Which version of the Debian packaging are you running, and where did you get it?

Tip: the answer might be in either /etc/apt/sources.list or in /etc/apt/sources.list.d/
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Oh hey. I´m not sure I completely understand the question, but -

When I peer into /etc/apt/sources.list.d, I am reminded that I have in there:
paul-climbing-cacti-precise.list
which contains
deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main

Which I seem to recall I installed that source as it had an updated version of something I wanted. Is that what is throwing the standard thing off?
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Chanfan wrote:Oh hey. I´m not sure I completely understand the question, but -

When I peer into /etc/apt/sources.list.d, I am reminded that I have in there:
paul-climbing-cacti-precise.list
which contains
deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main

Which I seem to recall I installed that source as it had an updated version of something I wanted. Is that what is throwing the standard thing off?
Well, that answers my question 100%. And your system is now up-to-date I assume. Well, than at least I know what you have from cacti perspective. Could you post some (not too much) of the end of /var/log/cacti/cacti.log /var/log/cacti/poller-error.log and /var/log/cacti/rrd.log? Let's see if there is anything interesting there.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

paulgevers wrote: Well, that answers my question 100%. And your system is now up-to-date I assume.
Does seem to be!
/var/log/cacti/cacti.log
pretty much just this over and over:
4/2013 12:45:02 PM - SYSTEM STATS: Time:1.0573 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198
10/14/2013 12:50:02 PM - SYSTEM STATS: Time:1.0300 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198
10/14/2013 12:55:02 PM - SYSTEM STATS: Time:1.0559 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198
10/14/2013 01:00:03 PM - SYSTEM STATS: Time:1.0316 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198
10/14/2013 01:05:02 PM - SYSTEM STATS: Time:1.0297 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198

that looks pretty unchanged over the past few logs (apart from noting admin logins)
/var/log/cacti/poller-error.log
empty, although the previous gzipped up one has
PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 383
over and over
and /var/log/cacti/rrd.log?
empty.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Chanfan wrote:10/14/2013 01:05:02 PM - SYSTEM STATS: Time:1.0297 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:396 RRDsProcessed:198
So this looks very much ok. You do have data.
Chanfan wrote:PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 383
Probably during your down time. You might want to update your cron runner to log the time, such as here

Anyways. Can you try to (again) describe exactly the problem you are facing? I have the feeling that we are looking completely in the wrong direction.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Chanfan
Posts: 7
Joined: Mon Oct 07, 2013 6:58 pm

Re: Apache2 errors out on cacti.conf probably after updates

Post by Chanfan »

Well, currently, I´m not facing any problem. As I mentioned in my follow up post, re-installing Apache and cacti seems to have gotten things running again.

Sorry if I was being dense, I was assuming you were looking for some particular follow up info helpful to you development!

The issue I ran into was the box had stopped running cacti. One of the first things I did was let it run a batch of updates, so I´m not certain if the updates clobbered things, or if it was something else prior.
n2011all
Posts: 3
Joined: Wed Oct 23, 2013 8:38 am

Re: Apache2 errors out on cacti.conf probably after updates

Post by n2011all »

Updated to Ubuntu 13.10 cacti notl work (Apache Error 500)
Completely reinstalled it from Synaptic (repo sacy)
During the installation, there were no problems (all ok - php Mysql db etc)
I go to the apache server and the same error 500
All configs in new directories correctly in Apache 2.6.4
But the cacti is not working.

While all removed :(

There about??.

Until all updated in normal since Ubuntu 10.04 and no problem.
.??? new directive apache 2.6.4 in apache2.conf ???
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Apache2 errors out on cacti.conf probably after updates

Post by paulgevers »

Hi n2011all

Please, next time don't highjack a thread.
1) you should have reported your bug to Ubuntu, as this is clearly a Ubuntu issue and not something related to cacti itself.
2) did you also upgrade your /etc/apache2/conf.d/cacti.conf file (please copy paste it) (it should have been moved to /etc/apache2/conf-available/)
3) Please post the full error (instead of only the number). What is in the error log of apache?
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
n2011all
Posts: 3
Joined: Wed Oct 23, 2013 8:38 am

Re: Apache2 errors out on cacti.conf probably after updates

Post by n2011all »

Installed cacti
Errors in the journal /var/log/apache2/error.log
---------------------------------------------------------------------------------------------------------------------------------------------------
[Sun Oct 27 14:29:53.997614 2013] [:error] [pid 19276] [client 192.168.1.15:58466] PHP Warning: include_once(/usr/share/php/adodb/adodb.inc.php): failed to open stream: No such file or directory in /usr/share/cacti/site/include/global.php on line 205
[Sun Oct 27 14:29:53.997690 2013] [:error] [pid 19276] [client 192.168.1.15:58466] PHP Warning: include_once(): Failed opening '/usr/share/php/adodb/adodb.inc.php' for inclusion (include_path='.') in /usr/share/cacti/site/include/global.php on line 205
[Sun Oct 27 14:29:53.999913 2013] [:error] [pid 19276] [client 192.168.1.15:58466] PHP Fatal error: Call to undefined function ADONewConnection() in /usr/share/cacti/site/lib/database.php on line 51
---------------------------------------------------------------------------------------------------------------------------------------------------
File adodb.inc.php indeed missing in /usr/share/php/adodb/adodb.inc.php
furthermore it do not exist in /usr/
What do we do ???
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests