Troubleshooting
Problem
RTM main poller fails to run due to MySQL socket file location changed, result in no graph update.
Symptom
RTM graphs are all blank. There is no "SYSTEM STATS" logged in
cacti.log. The cron log shows poller.php run every 5 mins.Manually run poller.php
# php poller.php -d 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.
But MySQL database is running fine.
Cause
MySQL socket file location is not default, while php MySQL module still uses default socket location to connect to database.
By default, MySQL socket location
/var/run/mysql/mysql.sock
Check MySQL socket file location, run the following MySQL query:
mysql> show variables like 'socket'; +-----------------------------------------+-------------------------------+ | Variable_name | Value | +-----------------------------------------+-------------------------------+ | socket | /yourpath/mysql.sock | +-----------------------------------------+-------------------------------+ 1 rows in set (0.00 sec)
Diagnosing The Problem
Check your PHP settings for socket file location, make sure it is consistent with MySQL socket location.
# php -i | grep default_socket mysqli.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock default_socket_timeout => 60 => 60
Resolving The Problem
If undefined or not same as MySQL setting, you can update them in php.ini.
mysqli.default_socket pdo_mysql.default_socket
Restart
apache service afterward.Find the
php.ini location:
# php -i | grep "php.ini"
If spine is enabled, also update the spine.conf
DB_HOST /yourpath/mysql.sock
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
09 February 2022
UID
ibm16554938