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  How to Install Node Exporter on Ubuntu 18.04
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.

Centos Failed Update Kernel

Today I did a kernel update on my server with Centos 7 OS. At the end of the update process, I found a kernel...
habibzain
1 min read

Easy Fix Missing mirrorlist http://mirrorlist.centos.org on CentOS 7

When running yum update or command that utilize the yum system, errors similar to the following are produced: If you’re encountering issues with the...
habibzain
1 min read

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

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