Question on How to Install Cacti 1.2 beta
Moderators: Developers, Moderators
Question on How to Install Cacti 1.2 beta
Hi,
I've been having issues installing 1.1.38 on Ubuntu 18.04 but understand there may be some incompatibilities so thought I'd try 1.2
I've extracted the tar file but am unsure of what to do next, do I need to overwrite the 1.1.38 install ?
If someone could give me a quick rundown on how install 1.2 from the tar.gz that would be much appreciated.
I've been having issues installing 1.1.38 on Ubuntu 18.04 but understand there may be some incompatibilities so thought I'd try 1.2
I've extracted the tar file but am unsure of what to do next, do I need to overwrite the 1.1.38 install ?
If someone could give me a quick rundown on how install 1.2 from the tar.gz that would be much appreciated.
Re: Question on How to Install Cacti 1.2 beta
I would extract that tar into the same directory as your 1.1.38 installation. Depending on what you have done with 1.1.38, you have two choices:
Start afresh (my preferred route if non-production)
If you have not really used the 1.1.38 installation, I would
If you really used and don't want to drop the 1.1.38 installation, you would follow the above steps skipping the database stuff. You won't get an option to automatically enable the automation stuff or import templates, but you can do that manually after the fact once the upgrade is complete.
Start afresh (my preferred route if non-production)
If you have not really used the 1.1.38 installation, I would
- Using MySQL or phpMyAdmin, prime the database as an empty 1.2 DB by:
- Removing all tables in the database that it points to.
- Running: source <cacti>/cacti.sql
- Navigate to http://<cacti>/install/
- Login and authenticate
- Step through the installation wizard
- For automation
- Set the automation network range
- Enable scanning by default
- Set any custom SNMP details required
- For templates, select all
- For automation
- Launch cacti once installed
If you really used and don't want to drop the 1.1.38 installation, you would follow the above steps skipping the database stuff. You won't get an option to automatically enable the automation stuff or import templates, but you can do that manually after the fact once the upgrade is complete.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Question on How to Install Cacti 1.2 beta
Thanks for your answer! I was able to get 1.2 installed (i think!) but am receiving the same error as i was using in 1.1.38
"FATAL: Connection to Cacti database failed. Please ensure:
the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid."
I can access the db I created using the cli and can see all the tables using mariadb but cacti won't connect to it. I have also granted permissions to the cacti_user I created. I have verified credentials in include/config.php.
Any suggestions? I do notice the cacti.log is 0 bytes and is not growing, I noticed in the installation steps it says to grant cactiuser permissions to /log but does this just mean any user ? I have created a db cacti_user, do I need to create a specific cacti Ubuntu user account as well? Apologies if these questions sound a bit silly.
Thanks.
"FATAL: Connection to Cacti database failed. Please ensure:
the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid."
I can access the db I created using the cli and can see all the tables using mariadb but cacti won't connect to it. I have also granted permissions to the cacti_user I created. I have verified credentials in include/config.php.
Any suggestions? I do notice the cacti.log is 0 bytes and is not growing, I noticed in the installation steps it says to grant cactiuser permissions to /log but does this just mean any user ? I have created a db cacti_user, do I need to create a specific cacti Ubuntu user account as well? Apologies if these questions sound a bit silly.
Thanks.
Re: Question on How to Install Cacti 1.2 beta
Check that you have configured the settings properly in the include/config.php file (not the config.php.dist file).
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Question on How to Install Cacti 1.2 beta
I have double checked the settings and everything looks ok, I can access the DB using the MariaDB CLI using the same credentials. I am not seeing any failed logins in syslog and am seeing nothing in cacti.log, it is still only showing zero bytes... and other suggestions of what I can check?netniV wrote:Check that you have configured the settings properly in the include/config.php file (not the config.php.dist file).
/*
* Make sure these values reflect your actual database/host/user/password
*/
$database_type = 'mysqli';
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cacti_user';
$database_password = '**hidden**';
$database_port = '3306';
$database_ssl = false;
$database_ssl_key = '';
Re: Question on How to Install Cacti 1.2 beta
Hmm, check what ports the SQL server is listening on. It may not be listening on localhost or via a socket.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Question on How to Install Cacti 1.2 beta
A couple of notes, it appears to be listening on 3306 however the hostname in mariadb is not showing as localhost, it shows as lynx-panther, the computers name. I'm not sure how to change that, i ensured the /etc/hosts file was showing 127.0.0.1 as localhost.netniV wrote:Hmm, check what ports the SQL server is listening on. It may not be listening on localhost or via a socket.
I'm starting to suspect the problem goes deeper and I may have a FUBAR mysql install as if I try to reinstall mysql i get lots of errors (on my phone at the moment so I don't have the specific errors,) but if I reinstall mariadb-server (which is installing mysql dependencies presumably?) the install appears fine but I get the aforementioned behavior... I will try this weekend on a virtual machine from scratch and see how I go.
Thanks for your help.
Re: Question on How to Install Cacti 1.2 beta
I managed to sort out the issue, I started monitoring the apache2 error.log and was seeing PHP fatal errors, 'undefined class constant'. After a bit of research, it looked like pdo_mysql was the culprit. I ran sudo phpenmod pdo_mysql but was receiving an error that it was not in the 7.2 mods folder. I decided to completely remove php-common and other dependencies and reinstall php7.0 from scratch, after that and reinstalling cacti, i enabled the pdo mod and was off the races. A few permission issues I had to sort out and enabling other php plugins but now I think I'm finally there and am graphing my Mikrotik Interfaces
Thanks for your help netniV and if anyone else is getting the cacti cannot connect to database error in apache when everything else seems set up correctly, double check that pdo_mysql is installed and running!
Thanks for your help netniV and if anyone else is getting the cacti cannot connect to database error in apache when everything else seems set up correctly, double check that pdo_mysql is installed and running!
Re: Question on How to Install Cacti 1.2 beta
I upgraded from 1.1.18 to 1.20 today and recieved this error during installation.
Curious. I have this configured in spine.conf:
... and spine continues to function:
The socket file exists, otherwise spine wouldn't work but here it is anyways:
Any ideas why I need to change the hostname in config.php?
Thanks
I fixed the issue by commenting out the line pointing to mysqld.sock and uncommenting the line pointing to localhost (in config.php):lynx649 wrote:"FATAL: Connection to Cacti database failed. Please ensure:
the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid."
Code: Select all
//$database_hostname = "/run/mysqld/mysqld.sock";
$database_hostname = "127.0.0.1";
Code: Select all
DB_Host /run/mysqld/mysqld.sock
Code: Select all
# spine -C ./spine.conf --snmponly
SPINE: Using spine config file [./spine.conf]
SPINE: Version 1.2.0 starting
SPINE: Time: 1.0402 s, Threads: 15, Devices: 3
Code: Select all
# ls -l /run/mysqld/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Jan 2 22:20 /run/mysqld/mysqld.sock
Thanks
The answer to life, the universe and everything is int main() { return 42; }
Re: Question on How to Install Cacti 1.2 beta
There was a fix for something to do with using a socket (https://github.com/Cacti/cacti/issues/622) which was then updated in PR #1587 (https://github.com/Cacti/cacti/issues/1587) before being finally tweaked.
Code: Select all
if (is_file($device) && filetype($device) == 'socket') {
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Question on How to Install Cacti 1.2 beta
new variable works (obv). makes sense that a new variable was added for using sockets.
thank you.
thank you.
The answer to life, the universe and everything is int main() { return 42; }
Who is online
Users browsing this forum: No registered users and 0 guests