habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Cacti Repair Databases after Upgrade

57 sec read

Hi Dude, some time ago I experienced an error with my cacti server. This error occurs after performing a cacti package upgrade. After a bit of research by googling, I was finally concluded that my database feels corrupted. This post i will share experience how to cacti repair databases after upgrade.

First time, our cacti server encountered this error message in cacti logs:

CMDPHP ERROR: A DB Cell Failed!, Error: MySQL server has gone away

With detail like below.

2021-01-27 14:56:01 - CMDPHP SQL Backtrace: (/poller.php[824]:bad_index_check(), /poller.php[832]:db_fetch_cell(), /lib/database.php[386]:db_fetch_cell_prepared(), /lib/database.php[402]:db_execute_prepared()) 
2021-01-27 14:56:01 - CMDPHP ERROR: A DB Cell Failed!, Error: MySQL server has gone away 
2021-01-27 14:56:01 - CMDPHP SQL Backtrace: (/poller.php[823]:api_plugin_hook(), /lib/plugins.php[63]:db_fetch_assoc_prepared(), /lib/database.php[490]:db_execute_prepared()) 
2021-01-27 14:56:01 - CMDPHP ERROR: A DB Row Failed!, Error: MySQL server has gone away 
2021-01-27 14:56:01 - CMDPHP SQL Backtrace: (/poller.php[818]:dsdebug_poller_bottom(), /lib/dsdebug.php[150]:db_fetch_assoc(), /lib/database.php[476]:db_fetch_assoc_prepared(), /lib/database.php[490]:db_execute_prepared()) 

Here is screenshoot in cacti dashboard.

cacti error DB after upgrade
Cacti Error Messade Dashboard

Here are the steps to do:

  1. Enter the cacti installation directory.
cd /usr/share/cacti/cli
  1. Execute database repair with repair_database.php
    In directory /usr/share/cacti/cli run command below.
[root@container cli]# php repair_database.php
Cacti repair database

Yes, finally error has gone. My cacti server running well and.

That is my way to fix and repair cacti databases corrupt after upgrade. Maybe usefull.

See also  Backup Restore Cacti - Migrate Cacti to New Server
habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Easy Create Laravel Project with Composer

Requirement Laravel, a popular PHP framework, is renowned for its elegant syntax and robust features, making it a top choice for web developers. One...
habibzain
1 min read

Virtualbox Change Storage Size

Changing the storage size of a virtual machine in VirtualBox involves a few steps. Here’s a general guide. Backup your Virtual Machine (VM) Before...
habibzain
35 sec read

Easy Setup Logrotate Nginx Ubuntu

Log rotation is an important aspect of managing log files on a Linux system, including those generated by Nginx. Logrotate is a utility that...
habibzain
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox