Host SNMP error
Moderators: Developers, Moderators
Host SNMP error
i was having this strange behavior in my cacti setup every host i looked at suddenly gives me this error:
Host SNMP error
now, i can make graphs and it DOES pull data.. but i get that error.. and because i get that error, new devices cant show me thier NICs so i can setup graphs.
i made backups of my CACTI directory and my MYSQL databases in case i had to go back and upgraded to Version 1.2.13.
still seeing this problem.. removed any AV from the computer, set the firewall to disable, etc etc..
anyone else see this??? or is it just me that is reporting such behavior?
Host SNMP error
now, i can make graphs and it DOES pull data.. but i get that error.. and because i get that error, new devices cant show me thier NICs so i can setup graphs.
i made backups of my CACTI directory and my MYSQL databases in case i had to go back and upgraded to Version 1.2.13.
still seeing this problem.. removed any AV from the computer, set the firewall to disable, etc etc..
anyone else see this??? or is it just me that is reporting such behavior?
Re: Host SNMP error
and now it seems that after the upgrade, no graphs are updating
Re: Host SNMP error
fixed the graphing issue.. but when looking at hosts, still get the Host SNMP Error.. its so weird, never got that before as long as i allowed SNMP to that device and used the same strings.. i mean that's logical.
i pull data, but each host now tells me this error.
i pull data, but each host now tells me this error.
Re: Host SNMP error
also to note, in this new version, i am seeing this in my error logs.
ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (The specified module could not be found.))
i dont know what part of cacti is doing a look for php_php_snmp.dll.dll but that's not a valid filename for sure.
ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (The specified module could not be found.))
i dont know what part of cacti is doing a look for php_php_snmp.dll.dll but that's not a valid filename for sure.
Re: Host SNMP error
additional info.
if i use the cmd poller, all my devices that attempt to use SNMP show down.
if i change it to spine, they all show up.
the intropage tells me im using the wrong version of spine
i am using 1.2.12 version of spine.
my cacti is 1.2.13.
in addition to every host showing me the Host SNMP error, i see this in my logs constantly.
07/29/2020 06:28:34 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
07/29/2020 06:28:34 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
anyone have a clue on any of the issues I am putting in my thread here?
if i use the cmd poller, all my devices that attempt to use SNMP show down.
if i change it to spine, they all show up.
the intropage tells me im using the wrong version of spine
i am using 1.2.12 version of spine.
my cacti is 1.2.13.
in addition to every host showing me the Host SNMP error, i see this in my logs constantly.
07/29/2020 06:28:34 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
07/29/2020 06:28:34 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
anyone have a clue on any of the issues I am putting in my thread here?
Re: Host SNMP error
Check you php.ini to see if it's being specified incorrectly.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Host SNMP error
i did check the php.ini file, and it appears to all be correct. in regards to the Host SNMP error, i hadnt changed anything since I built this new machine in April 2020 and at that time I didnt get this error. I had not updated anything until i got that error and at that time I only updated Cacti to the latest version.
I am seeing this constantly in the PHP error log file
[29-Jul-2020 11:37:18 America/Chicago] PHP Warning: A non-numeric value encountered in C:\inetpub\wwwroot\cacti\lib\rrd.php on line 937
[29-Jul-2020 16:40:02 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (%1 is not a valid Win32 application.)) in Unknown on line 0
my php.ini file is attached (running PHP Version 7.2.28)
I am seeing this constantly in the PHP error log file
[29-Jul-2020 11:37:18 America/Chicago] PHP Warning: A non-numeric value encountered in C:\inetpub\wwwroot\cacti\lib\rrd.php on line 937
[29-Jul-2020 16:40:02 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_snmp.dll' (tried: C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.), C:\php\ext\php_php_snmp.dll.dll (%1 is not a valid Win32 application.)) in Unknown on line 0
my php.ini file is attached (running PHP Version 7.2.28)
- Attachments
-
- phpini.txt
- (72.38 KiB) Downloaded 120 times
Re: Host SNMP error
i still havent figure out why im getting the host snmp error on every device.
i wonder if i need to possibly upgrade my NET-SNMP ???? running the version that gets installed with the CACTI windows installer, which is 5.5.0. i dont see a 64 bit installer on thier sourceforge page for anything higher than this version.
this all worked when i first built this PC back in march .. and other than the windows 10 2004 update, havent really changed much on this PC.. can ANYONE help me here?
i wonder if i need to possibly upgrade my NET-SNMP ???? running the version that gets installed with the CACTI windows installer, which is 5.5.0. i dont see a 64 bit installer on thier sourceforge page for anything higher than this version.
this all worked when i first built this PC back in march .. and other than the windows 10 2004 update, havent really changed much on this PC.. can ANYONE help me here?
Re: Host SNMP error
for giggles, to troubleshoot if it was my windows pc not allowing SNMP to other devices, i downloaded this
https://community.sysaid.com/Sysforums/ ... /2287.page
and ran an SNMPGET against an IP and used OID 1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.15.1.3.1 (It's a dell switch and that OID is the temp OID)
Running SNMPGET....
SNMPv2-SMI::enterprises.674.10895.5000.2.6132.1.1.43.1.15.1.3.1 = Integer: 36
Done.
BOOM.. so i know the host can send SNMP and get SNMP back using at least this.. so why is CACTI giving me an SNMP Host error? remember, i uploaded my php.ini for ya'll to check out. i need some help here .
https://community.sysaid.com/Sysforums/ ... /2287.page
and ran an SNMPGET against an IP and used OID 1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.15.1.3.1 (It's a dell switch and that OID is the temp OID)
Running SNMPGET....
SNMPv2-SMI::enterprises.674.10895.5000.2.6132.1.1.43.1.15.1.3.1 = Integer: 36
Done.
BOOM.. so i know the host can send SNMP and get SNMP back using at least this.. so why is CACTI giving me an SNMP Host error? remember, i uploaded my php.ini for ya'll to check out. i need some help here .
Re: Host SNMP error
Because PHP can't find it's own snmp library extension. You need to fix that for Cacti to be able to do it as it uses PHP
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Host SNMP error
ok i spent some time going over the documentation for PHP and CACTI and reading up on it's configuration.
Mind you, i used the cacti windows "all in one" installer when i set the system up.
in reading the manual installation instructions, it says to edit the PHP.ini file and, in part, set these lines accordingly
;
; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
;extension=bz2
extension=php_com_dotnet.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
zend_extension=php_opcache.dll
when you do that, it tries to add .dll to the ends of the files and it wont find them, so, trying to find php_gd2.dll, it looks for php_gd2.dll.dll . you remove the .dll from the ini file, and it finds the proper dll files.
HOWEVER, for some reason, mine still is not finding the snmp.dll. its in the c:\php\ext folder, just like the rest of the dll's listed above.
The cacti log shows me
08/07/2020 06:22:22 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
08/07/2020 06:22:22 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 06:22:22 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
I run php -m at a command line, i see
U:\>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
filter
gd
gettext
gmp
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
readline
Reflection
session
SimpleXML
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Mind you, i used the cacti windows "all in one" installer when i set the system up.
in reading the manual installation instructions, it says to edit the PHP.ini file and, in part, set these lines accordingly
;
; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
;extension=bz2
extension=php_com_dotnet.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
zend_extension=php_opcache.dll
when you do that, it tries to add .dll to the ends of the files and it wont find them, so, trying to find php_gd2.dll, it looks for php_gd2.dll.dll . you remove the .dll from the ini file, and it finds the proper dll files.
HOWEVER, for some reason, mine still is not finding the snmp.dll. its in the c:\php\ext folder, just like the rest of the dll's listed above.
The cacti log shows me
08/07/2020 06:22:22 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
08/07/2020 06:22:22 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 06:22:22 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (%1 is not a valid Win32 application.)) in file: Unknown on line: 0
I run php -m at a command line, i see
U:\>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
filter
gd
gettext
gmp
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
readline
Reflection
session
SimpleXML
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Re: Host SNMP error
It suggests that your DLL is bad. I would run a PHP installer to that location and allow it to re-extract the DLL's. Is there a possibility that any AV or Disk Space issues occurred at the time?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Host SNMP error
none that i can tell to be honest. i cant find php 5.5x from thier site, does cacti support php 7.x?
Re: Host SNMP error
ok now i have it down to
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
the file is there. still get host snmp error on devices when editing them.
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
08/07/2020 09:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
08/07/2020 09:30:01 - ERROR PHP CORE_WARNING: PHP Startup: Unable to load dynamic library 'snmp' (tried: C:\php\ext\snmp (The specified module could not be found.), C:\php\ext\php_snmp.dll (The specified module could not be found.)) in file: Unknown on line: 0
the file is there. still get host snmp error on devices when editing them.
Re: Host SNMP error
fixed my issue.. here's what i did
1) installed the newest windows installer on a new server, here i was able to note the location of the TMP dir and confirm SNMP via PHP was installed.
2) copied the RRDTool, SPINE, PHP, and NET-SNMP dirs from new server to production server.
3) downloaded and re ran the install\upgrade to the lastest rev
my host SNMP error is gone
1) installed the newest windows installer on a new server, here i was able to note the location of the TMP dir and confirm SNMP via PHP was installed.
2) copied the RRDTool, SPINE, PHP, and NET-SNMP dirs from new server to production server.
3) downloaded and re ran the install\upgrade to the lastest rev
my host SNMP error is gone
Who is online
Users browsing this forum: No registered users and 1 guest