Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-40403

Getting "systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224" when starting snmpd service

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.4.z
    • rhel-9.4
    • net-snmp
    • None
    • net-snmp-5.9.1-13.el9_4.1
    • None
    • Low
    • sst_cs_system_management
    • ssg_core_services
    • 2
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None

      What were you trying to do that didn't work?

      When starting snmpd.service unit, I can see the following errors in the service status:

      Jun 07 15:53:30 vm-snmp9 systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
      Jun 07 15:53:30 vm-snmp9 snmpd[3840]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224
      Jun 07 15:53:30 vm-snmp9 snmpd[3840]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224
      Jun 07 15:53:30 vm-snmp9 snmpd[3840]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224
      Jun 07 15:53:30 vm-snmp9 snmpd[3840]: NET-SNMP version 5.9.1
      Jun 07 15:53:30 vm-snmp9 systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..
      

      Apparently the code finds the header of the file too long, so probably doesn't parse it properly:

      # head -1 /proc/net/snmp
      Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates OutTransmits
      
      # head -1 /proc/net/snmp | wc -c
      237
      

      Please provide the package NVR for which bug is seen:

      net-snmp-5.9.1-13.el9.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Start the service

            jridky Josef Řídký
            rhn-support-rmetrich Renaud Métrich
            Josef Řídký Josef Řídký
            Evgeny Fedin Evgeny Fedin
            Votes:
            15 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated: