Install Cacti under Ubuntu 16.04 [frustrated]

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

Moderators: Developers, Moderators

Post Reply
whsparrow
Posts: 10
Joined: Wed May 04, 2016 6:36 am

Install Cacti under Ubuntu 16.04 [frustrated]

Post by whsparrow »

Hello,

im trying to install cacti under Ubuntu 16.04.

Tried
apt-get install cacti
and I get.
mysql said: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions ERROR 1067 (42000) at line 1847: Invalid default value for 'status_fail_date'
-> ignore

I add the port 3306 in /etc/cacti/debian.php and /etc/dbconfig-common/cacti.conf and updated the values for the current date:

Code: Select all

sudo sed -i 's/0000-00-00/2016-05-01/g' /usr/share/cacti/conf_templates/cacti.sql 
Then I ran
sudo dpkg-reconfigure cacti
again.
A new version (/tmp/dbconfig-package-config.jYuKLn) of configuration file /etc/dbconfig-common/cacti.conf is available, but the version installed currently has been locally modified.
-> keep the local version currently installed
Running cli/upgrade_database.php as part of package update...
Segmentation fault
apache2_invoke cacti: already enabled.

I tried a lot already. Has anyone an idea, how to get it running?
llima3000
Posts: 1
Joined: Fri May 27, 2016 12:07 pm

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by llima3000 »

Hi,

I got stuck by 2 days with it, but resolved with these steps:

1 - Installed LAMP first;

2 - Did apt-get install cacti cactispine, on questions about MySQL inform the TCP as protocol and port 3306 to connect MySQL database;

3 - after instalation I ran, as root, the following comand on MySQL database:

SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

This MySQL disable those parameters: ONLY_FULL_GROUP_BY, NO_ZERO_IN_DATE and NO_ZERO_DATE

CACTI uses queries that violate these constraints, then after disabling these constraints everything worked fine.

Regards,
VinxItak
Posts: 8
Joined: Wed May 29, 2013 7:09 am

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by VinxItak »

quick reply to thank you llima3000 for "SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';" command :)
bmedyanik
Posts: 1
Joined: Wed Jun 01, 2016 5:37 am

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by bmedyanik »

after upgrading Ubuntu 15.10 to Ubuntu 16.04
MySQL: 5.7.12-0ubuntu1 - (Ubuntu)
Apache/2.4.18 (Ubuntu)
PHP7.0 v 7.0.4-7ubuntu2.1
I see in the log error

Code: Select all

06/01/2016 01:26:45 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1055', SQL:"select rra.id, rra.steps, rra.rows, rra.name, rra.timespan, data_template_data.rrd_step from graph_templates_item LEFT JOIN data_template_rrd ON (graph_templates_item.task_item_id=data_template_rrd.id) LEFT JOIN data_template_data ON (data_template_rrd.local_data_id=data_template_data.local_data_id) LEFT JOIN data_template_data_rra ON (data_template_data.id=data_template_data_rra.data_template_data_id) LEFT JOIN rra ON (data_template_data_rra.rra_id=rra.id) where graph_templates_item.local_graph_id=6 AND data_template_rrd.local_data_id != 0 group by rra.id order by rra.timespan"
but the graphics and displays the relevant only in TreeView (not displays in ListView, PreviewList)
:(
whsparrow
Posts: 10
Joined: Wed May 04, 2016 6:36 am

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by whsparrow »

Cacti is running now.

But the behaviour is strange. For example there no user in the User Management. Even after I added users it still says no user. Anyways looking into the database shows me the users are existing and I can use them.
Furthermore I have rrdtool 1.5 installed but I can only choose 1.4x in the config.
labtec6
Posts: 7
Joined: Fri May 13, 2016 3:33 pm

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by labtec6 »

whsparrow wrote:Cacti is running now.

But the behaviour is strange. For example there no user in the User Management. Even after I added users it still says no user. Anyways looking into the database shows me the users are existing and I can use them.
Furthermore I have rrdtool 1.5 installed but I can only choose 1.4x in the config.
I've had the same issue as you did. 8.8f doesn't support RRDtool 1.5.x. 8.8h does though. Here is what I did to get everything working under ubuntu 16.04:

1)Install PHP 5.6
http://askubuntu.com/questions/756181/i ... nial-16-04

2) Enable php 5.6 command line:
cd /etc/alternatives
sudo rm php
sudo ln -s /usr/bin/php5.6 php

3) Install latest cacti from source (8.8h at least).

If you need Spine, it doesn't seem to want to compile under 16.04 from source, and if you need it, you need to install Cacti and Cacti-Spine using Apt-get first and then install the source right on top of it. Probably a better way to do this, but that's what I did. Problem is, if you do an upgrade command, it will write 8.8f on top of 8.8h and just mess things up. I always make a copy first (sudo cp -R /usr/share/cacti /tmp) then copy it back afterwards. It's a pain but it works.

There are other issues with mysql as well. For example:

CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"

I had to edit:

/etc/mysql/mysql.conf.d/mysql.cnf

And add the line at the bottom:

sql-mode="ALLOW_INVALID_DATES"

Then run:

sudo service mysql restart

Cacti's packages under 16.04 are pretty broken in my opinion. From source, it works great as long as you do step 2) after everything upgrade of the php packages.
whsparrow
Posts: 10
Joined: Wed May 04, 2016 6:36 am

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by whsparrow »

My cacti isn't running properly yet. I tried the upper steps but unfortunately it isnt working well. Then I tried to install it on another Ubuntu 16.04 Server and it has still the same problem - it shows "no users", even in the database there are users.

As i urgently need the cacti server i tried to manuelly get it running with xampp. There is another problem - It doesnt show the graphs. ( http://forums.cacti.net/viewtopic.php?f=21&t=56049)

I'm quite frustrated now. Does anyone has another idea?

Thanks in advance :)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by phalek »

Use Centos 6 ... ;-)
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install Cacti under Ubuntu 16.04 [frustrated]

Post by paulgevers »

Why did nobody filed bugs in the Ubuntu bug tracker? We could have helped there (and maybe fix stuff for others)...

Cacti in Ubuntu 16.04 was pretty broken because both PHP and MySQL were updated just before the release and I couldn't get stuff fixed in time. So some fixes came later.

If anybody experiences issues right now when installing cacti in Ubuntu 16.04, please report to the bug tracker of Ubuntu.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest