Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-5240

PHP 8.3 fatal error in IP-MIB IPv6z parsing on VMware ESXi 7.0.3 (dechex() receives string)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • Professional Edition
    • Discovery
    • Observium Professional 26.4.14713 (stable)
      SVN Revision: 14942
      Ubuntu Server 24.04.4 LTS
      PHP 8.3.6
      MySQL 8.0.46
      NET-SNMP 5.9.4
      RRDtool 1.7.2

    Description

      Title

      PHP 8.3 fatal error in IP-MIB IPv6z parsing on VMware ESXi 7.0.3 (dechex() receives string)

      Environment

      • Observium Professional 26.4.14713 (stable)
      • SVN Revision: 14942
      • Ubuntu Server 24.04.4 LTS
      • PHP 8.3.6
      • MySQL 8.0.46
      • NET-SNMP 5.9.4
      • RRDtool 1.7.2

      Summary

      After migrating an existing Observium installation from Ubuntu 22.04/PHP 8.1 to Ubuntu 24.04/PHP 8.3, discovery fails only for one VMware ESXi host during the ip-addresses module.

      All database, RRD files and configuration migrated successfully. Most devices discover correctly, including Windows servers and other VMware ESXi hosts.

      The failure occurs only on one ESXi 7.0.3 host.

      Affected device

      • VMware ESXi 7.0.3 build 24411414
      • Hostname: esx-dl360-tape.brunswick.local

      Error

      {{dechex(): Argument #1 ($num) must be of type int, string given

      /opt/observium/includes/discovery/ip-addresses/ip-mib.inc.php:206

      $ip_address_fix = array_map('dechex', $ip_address_fix);}}

      Discovery output

      The device returns the following from IP-MIB:

      {{ipAddressIfIndex.ipv4."10.1.0.86" = 8
      ipAddressIfIndex.ipv4."10.1.0.87" = 9
      ipAddressIfIndex.ipv4."10.1.0.88" = 10
      ipAddressIfIndex.ipv4."10.1.0.89" = 11

      ipAddressIfIndex.ipv6."fd:fd:c4:7c:c2:57:4f:d3:22:67:7c:ff:fe:d4:6b:b8" = 8

      ipAddressIfIndex.ipv6z.".........PV..i.." = 9
      ipAddressIfIndex.ipv6z.".........PV..j."" = 11
      ipAddressIfIndex.ipv6z.".........PV..m.." = 10
      ipAddressIfIndex.ipv6z."........"g|...k." = 8}}

      Observium then reports:

      {{Unknown IP index: .........PV..i..
      Unknown IP index: .........PV..j..
      Unknown IP index: .........PV..m..}}

      and immediately throws the PHP fatal error.

      Additional information

      The ESXi host has the following IPv6 addresses:

      {{vmk0 fe80::2267:7cff:fed4:6bb8
      vmk0 fdfd:c47c:c257:4fd3:2267:7cff:fed4:6bb8
      vmk1 fe80::250:56ff:fe69:bbed
      vmk2 fe80::250:56ff:fe6d:aec2
      vmk3 fe80::250:56ff:fe6a:e322}}

      The issue appears related to parsing ipv6z indexes from IP-MIB.

      Another ESXi 7 host in the same environment that exposes only IPv4 addresses discovers successfully.

      Workaround

      Running discovery without the ip-addresses module completes successfully:

      ./discovery.php -h esx-dl360-tape.brunswick.local -m '!ip-addresses'

      This appears to be an issue in the IPv6z index parser where non-numeric values reach:

      $ip_address_fix = array_map('dechex', $ip_address_fix);

      under PHP 8.3.

      Attachments

        Issue Links

          Activity

            People

              landy Mike Stupalov
              wicknet Sunil Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: