Incident Report: Cacti Database Connection Failure Post yum upgrade

Incident Report: Cacti Database Connection Failure Post yum upgrade

After performing a system upgrade using “yum upgrade“, the Cacti monitoring system became inaccessible. The root cause was traced to a symbolic link (config.php) being renamed during the upgrade process, which disrupted the database connection configuration.


  • Start Time:
  • Resolution Time:

  • Application: Cacti (Network Monitoring Tool)
  • Server OS: CentOS/RHEL-based Linux
  • Web Server: Apache (httpd)
  • PHP Module: PHP with MySQL support

Upon accessing the Cacti web interface, the following error message was displayed:


During the yum upgrade, the symbolic link config.php (which originally pointed to /etc/cacti/db.php) was renamed to config.php.dist. This broke the link to the actual database configuration file, causing Cacti to fail when attempting to connect to its database.

The renamed file appeared as:

This indicated that the upgrade process preserved the original link but renamed it, likely due to package management behavior when detecting local modifications.


  1. Verified the Existence of the Original Configuration File:

Confirmed that the file existed and contained valid database credentials.

  1. Navigated to the Cacti Installation Directory:

(Note: The actual path may vary, e.g., /usr/share/cacti/include/ )

  1. Recreated the Symbolic Link:

This restored the expected configuration file reference.

  1. Verified the Link:

Output confirmed the symbolic link was correctly re-established.

  1. Restarted the Web Server: Depending on the web server in use:
  1. Tested the Web Interface: Accessed the Cacti web UI to confirm that the database connection was restored and the application was functioning normally.

  • Configuration Backup: Ensure symbolic links and configuration files are backed up before system upgrades.
  • Monitoring Upgrade Logs: Review yum logs post-upgrade to identify any renamed or replaced configuration files.
  • Automation: Consider using configuration management tools (e.g., Ansible, Puppet) to enforce and restore critical symlinks and settings.

Resolved

Spread the word:

Leave a Reply