SNMPD starts without errors but is not listening on any port?

6,948

Check out the man page for snmpd.conf -

  agentaddress [<transport-specifier>:]<transport-address>[,...]
          defines  a  list  of listening addresses, on which to receive incoming 
          SNMP requests.  See the section LISTENING ADDRESSES in the
          snmpd(8) manual page for more information about the format of listening address

So try adding something like this to the top of snmpd.conf:

Listen for connections on all interfaces (both IPv4 and IPv6)

agentAddress udp:161,udp6:[::1]:161

Share:
6,948

Related videos on Youtube

Lukasz
Author by

Lukasz

Updated on September 18, 2022

Comments

  • Lukasz
    Lukasz over 1 year

    HP ProLiant DL360 G7 running CentOS6 5.7 with Net-SNMP 5.3.2.2-14.

    I have 7 of these servers in a remote site all running mixture of CentOS 5.7 and RHEL 5.7 with same Net-SNMP installed from RPM. On one server my NMS continuously reports that it has failed to connect to the SNMP service. I ignored it because it usually clears up within ~15 minutes but today it has been happening 2-3 times per hour since the morning.

    I have modified the snmpd startup script to log to file (default is to /dev/null). There are no errors in the log file upon startup:

    could not open /proc/net/if_inet6
    cannot open /proc/net/snmp6 ...
    cmaX: listening for subagents on port 25375
    cmaX: sent ColdStarts on ports 25376 to 25393
    cmaX: subMIB 1 handler has disconnected
    NET-SNMP version 5.3.2.2
    cmaX: subMIB 2 handler has disconnected
    Connection from UDP: [127.0.0.1]:50654
    cmaX: subMIB 3 handler has disconnected
    Received SNMP packet(s) from UDP: [127.0.0.1]:50654
    cmaX: subMIB 5 handler has disconnected
    

    I presume if_inet6 is for IPv6 which we do not use. snmpd.conf is below:

    # Following entries were added by HP Insight Management Agents at
    #      Tue May 15 10:58:17 CLT 2012
    dlmod cmaX /usr/lib64/libcmaX64.so
    rwcommunity public 127.0.0.1
    rocommunity public 127.0.0.1
    rwcommunity 3adRabRu 172.16.37.37
    rocommunity 3adRabRu 172.16.37.37
    trapcommunity traps
    trapsink 172.16.37.37 traps
    syscontact Lukasz
    syslocation Santiago, Chile
    # ---------------------- END --------------------
    com2sec rwlocal default public
    com2sec rolocal default public
    com2sec subnet  default 3adRabRu
    group   rwv2c   v2c             rwlocal
    group   rov2c   v2c             rolocal
    group   rov2c   v2c             subnet
    view    all     included        .1
    access  rwv2c   ""      any             noauth          exact   all     all     none
    access  rov2c   ""      any             noauth          exact   all     none    none
    

    Any suggestions? IP Tables is shutoff.

  • rnxrx
    rnxrx almost 12 years
    Anything possibly different around SELinux setup, the way you installed snmpd or a possible sub-version? It wouldn't surprise me if they had changed the default behavior of the config file. The configuration file calls out the default as being listen on all ports but perhaps they decided that was potentially dangerous.