Linux下的Cacti網絡管理系統--安裝常見問題(一)


一.數據庫相關的常見問題

   1.在安裝php時或者Cactid/Spine/Cacti時出現

  checking for mysql_init in -lmysqlclient_r... no

  configure: error: MySQL libraries not found

   解決辦法:由於在編譯php時沒有加上--with-mysql=/usr/local/mysql 導致無法管理php開發api

  

    2.在做php 連接數據庫時出現 not defined mysql_connect()

   解決辦法:php沒有關聯php api, 檢查php編譯時是否加上了--with-mysql=/usr/local/mysql

 

    3.在安裝時,加入了--with-mysql=/usr/local/mysql

   出現:whith "configure: error: MySQL libraries not found"

   解決辦法: 確定mysql可以正常運行的情況下,不要使用二進制的安裝方式,自己手工編譯,問題解決,

  網上所謂的獎--with-mysql 改為--with-mysql-dir這種是錯誤,它編譯通過的原因是由於,這種配置是錯誤的,./configure將其忽略了。

 

二.其他錯誤

 

錯誤一:

 

11/15/2010 07:34:42 PM - SPINE: Poller[0] FATAL: Unable to read configuration file! (Spine init)

 

11/15/2010 07:44:43 PM - SPINE: Poller[0] FATAL: MySQL Error:'1146', Message:'Table 'cacti.settings' doesn't exist' (Spine init)

 

解決:

 

檢查你的spine 配置文件,或重新安裝spine

 

錯誤二:編輯spine 時錯誤

 

checking if UCD-SNMP needs crypto support... no

 

checking if Net-SNMP needs crypto support... yes

 

checking for snmp_timeout in -lnetsnmp... no

 

Cannot find NET-SNMP libraries(snmp)... checking UCD-SNMP

 

checking for snmp_timeout in -lsnmp... no

 

configure: error: Cannot find UCD-SNMP libraries(snmp)

 

解決:

 

configure  加上--with-snmp=/usr/local/net-snmp/ 你的net-snmp路徑

 

或不加或加上這個參數--with-static=/usr/local/lib

 

./configure --with-static=/usr/local/lib

 

錯誤三:

 

 /usr/local/spine/spine

 

SPINE: Version 0.8.7b starting

 

11/15/2010 05:19:46 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)

 

 

 

11/15/2010 05:00:01 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent) 

 

spine net-snmp的版本有問題

 

解決

 

先卸載以前安裝的net-snmtp spine

 

 先安裝net-snmp 然后再編譯安裝spine 此時你可以指定你的net-snmp 也可以不指定,都可以的。

 

錯誤四

 

11/15/2010 05:00:01 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 300 seconds have passed since the last poll! 

 

11/15/2010 04:56:00 PM - SYSTEM STATS: Time:59.2263 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:21 RRDsProcessed:0 

 

11/15/2010 04:56:00 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting. 

 

解決:

 

因為cron的時間與poller.php的時間差別有關

 

一般poller.php的跟新時間為60s,所以cron里邊也要設置成每分鍾跟新一次

 

如:

 

*/1 * * * * /usr/bin/php /var/www/html/cacti/poller.php  > /dev/null 2>&1

 

錯誤五

 

##########

 

11/16/2010 01:10:03 PM - SYSTEM STATS: Time:1.1319 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:8 RRDsProcessed:7

 

11/16/2010 01:10:02 PM - SPINE: Poller[0] Host[4] ERROR: Empty result [127.0.0.1]: '/usr/bin/php -q /var/www/html/cacti/plugins/syslog/syslog_counter.php'

 

11/16/2010 01:09:11 PM - SYSTEM STATS: Time:1.1314 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:8 RRDsProcessed:7

 

11/16/2010 01:09:10 PM - SPINE: Poller[0] Host[4] ERROR: Empty result [127.0.0.1]: '/usr/bin/php -q /var/www/html/cacti/plugins/syslog/syslog_counter.php'

 

解決:

 

暫時的

 

delete from settings where name = 'syslog_last_incoming' ;

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM