Monday, March 14, 2022

[SOLVED] apt installation of Cacti database failing on Ubuntu 10.04

Issue

I have managed to install Cacti on two debian servers without too many problems. That's how apt is supposed to work right?

The time has come to install it on our production server, but it is not working at all for me. It seems to get stuck around the point of creating the cacti database, reporting errors with users and a 'Chown invalid user root:staff' message. I'd rather not compile manually as I can't risk any downtime.

Here is most of the output from /var/log/apt/term.log:

Selecting previously deselected package cacti.
(Reading database ... 152051 files and directories currently installed.)
Unpacking cacti (from .../cacti_0.8.7e-2ubuntu0.2_all.deb) ...
Setting up cacti (0.8.7e-2ubuntu0.2) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
Creating config file /etc/dbconfig-common/cacti.conf with new version
Creating config file /etc/cacti/debian.php with new version
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1.
unable to connect to mysql server.
error encountered creating user:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1
dbconfig-common: cacti configure: trying again.
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
Replacing config file /etc/cacti/debian.php with new version
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1.
unable to connect to mysql server.
error encountered creating user:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1
dbconfig-common: cacti configure: trying again.
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
Replacing config file /etc/cacti/debian.php with new version
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1.
dbconfig-common: cacti configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing cacti (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cacti
Log ended: 2012-04-30  19:25:04

Log started: 2012-04-30  19:26:57
Setting up cacti (0.8.7e-2ubuntu0.2) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
Replacing config file /etc/cacti/debian.php with new version
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1.
unable to connect to mysql server.
error encountered creating user:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/usr/bin/mysql' at line 1
dbconfig-common: cacti configure: ignoring errors from here forwards
populating database via sql...  done.
dbconfig-common: flushing administrative password

Creating config file /etc/cacti/apache.conf with new version
chown: invalid group: `root:staff'

Log ended: 2012-04-30  19:27:14

I'm not sure why it is attempting to use the root:staff group as it doesn't even exist. Any ideas? Cheers ns

Just found this which sounds similar: Trying these solutions... http://ubuntuforums.org/showthread.php?p=11871002


Solution

I believe this was due to a corrupt /etc/groups file.

I eventually ended up installing a new OS which resolved the problem.



Answered By - nonshatter
Answer Checked By - Cary Denson (WPSolving Admin)