Skip to content

Unnecessary warnings appear when host name is not resolved #4267

@xmacan

Description

@xmacan

In console -> devices -> device -> I got warning (in section SNMP Information):
Warning: SNMP::__construct(): php_network_getaddresses: getaddrinfo failed: Name does not resolve in /usr/local/share/cacti/lib/snmp.php on line 75
System SNMP error - SNMP::get(): Could not open snmp connection: Unknown host (mail.wrong-name.xz) (Invalid argument)

It is happen in the case:

  1. wrong hostname
  2. PHP SNMP enabled

Without PHP SNMP, I got correctly- Host SNMP error

I guess that the error message should be the same.

Cacti 1.2.17, FreeBSD 12.1, PHP 7.4.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions