Upgrade Etch 0.8.6i-3.5 to Lenny 0.8.7b-2.1: Devices down

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
m0lod04
Posts: 2
Joined: Mon Mar 02, 2009 1:11 pm

Upgrade Etch 0.8.6i-3.5 to Lenny 0.8.7b-2.1: Devices down

Post by m0lod04 »

I had Debian Etch server with running cacti Version: 0.8.6i-3.5. Аfter upgrading to Debian Lenny with cacti Version: 0.8.7b-2.1, I get that all of my routers in Device list have status Down, but all Dslams are UP.

The method for Downed Device Detection is SNMP

In previous version of cacti averything were good. All devices are pinged from command line. When I go to Console -> Devices -> (Edit) my buggy router, I see that snmp is available (there is information about router in left upper corner and Verbose Query is giving me information about my interfaces).

I turn on Debug mode for logging. In cacti log:

Code: Select all

03/02/2009 01:05:34 PM - CMDPHP: Poller[0] Host[10] SNMP: Host did not respond to SNMP
But WHY????? There is snmp information about router in Verbose Query.

I guessed that for this message is responsible:

Code: Select all

/usr/share/cacti/site/lib/ping.php
I've compared this file with previous version. There were changes in method:

Code: Select all

function ping_snmp()
On my server the function phpversion() returnes the value:

5.2.6-1+lenny2

this is a BUG in condition:

Code: Select all

if (version_compare("5", phpversion(), "<")) {
   $oid = ".1";
}else{
   $oid = ".1.3.6.1.2.1.1.3.0";
}
I am not a PHP programmer but I think that must be like this

Code: Select all

if (version_compare("5", "floatval(phpversion())", "<")) {
   $oid = ".1";
}else{
   $oid = ".1.3.6.1.2.1.1.3.0";
}
In other words we must replace "phpversion()" to "floatval(phpversion()" in all code of cacti

Finally I have questions:
1. Why some of my devices worked perfectly and why some of them were buggy before changing the function (I think there may be a bug somewhere also)
2. Why 3 of my routers will have problems with SNMP (SNMP error in left right corner and with Verbose Query)

Thanks for help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please open an bug report concerning phpversion as given by http://www.cacti.net/bugs.php
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests