1、CactiEz 重启后,访问面页显示空白页面

解决办法:service httpd restart  apache重启后,并加入到开机启动中。chkconfig httpd on 或者 vim /etc/rc.local 加入 /etc/init.d/httpd start | restart 


2、检查mysql状态,正常状态

CactiEz 无法登陆 、重启不画图处理_第1张图片

3、后来重新刷新,无法进入界面。网上查找说是日志文件把空间占满。(当空间占满,服务运行没有空间支撑)当时df -h  磁盘已被打满,查看到cacti.log单文件14G,另外./var/log/mysqld.log 单个文件为3G

[root@cactiez /]# cd /var/www/html/log

[root@cactiez log]# ls

cacti.log           

cacti.log-20170511  cacti.log-20170513  cacti.log-20170515  cacti.log.bak-20170516

cacti.log-20170510  cacti.log-20170512  cacti.log-20170514  cacti.log-20170516


#日志用于排错,所以要备份部分日志文件。

tail -n 1000 cacti.log > cacti.log.bak-20170516 

cat /dev/null > mysqld.log 

cat /dev/null > cacti.log

完事后查看空间,可以重新进入cacti可以


4、可以正常登陆访问后,但是cacti不画图,无流量。经查cacti.log的日志,是mysqlcacti表存在问题,按下方式进入 mysql进行修复,然后等待一分钟时间,cacti画图恢复。

[root@cactiez log]# tail /var/www/html/log/cacti.log.bak-20170516

05/16/2017 04:46:48 PM - SYSTEM STATS: Time:46.2120 Method:spine Processes:1 Threads:1 Hosts:50 HostsPerProcess:50 DataSources:7294 RRDsProcessed:3702

05/16/2017 04:46:48 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"SELECT data_id, rra_id, lastread, cdef FROM thold_data WHERE thold_enabled='on' AND tcheck=1"


mysql> use "cacti" 

Database changed

mysql> select count(*) from poller_output; 
ERROR 145 (HY000): Table './cacti/poller_output' is marked as crashed and should be repaired
mysql> truncate table poller_output;
Query OK, 0 rows affected (0.02 sec)

mysql> select count(*) from poller_output; 
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

借鉴cacti排错的文章:

http://blog.csdn.net/wangxiaofei2006/article/details/17755121

http://blog.csdn.net/wangxiaofei2006/article/details/17755121