Thomas Anders wrote:

John Hardin wrote:

I have a fully functional agent that appears to forget about all
objects whenever it gets a SIGHUP.  I have been using SIGHUP
to cause the agent to re-read snmpd.conf after a config change.
This has been working since UCD-SNMP 4.2 up through Net-SNMP
5.2.1.  I recently upgraded to 5.3.0.1 and now after the agent receives
a SIGHUP it responds to all GETs with No Such Object and to all
walks with End of MIB View.  It's as if it forgot about all registered
MIB handlers.  This is true of all MIBs, including MIB-2.

I am using Net-SNMP 5.3.0.1 on Linux with a 64-bit compile, but
the problem also happens on a 32-bit compile.


Weird. Can you please tell us:
- the output of "net-snmp-config --configure-options"
- the exact command-line (and related environment variables) of your snmpd invocation - the content of your snmpd.conf file(s) (initially and just before the SIGHUP) - the output of "snmpd -f -Le -Dread_config ..." from startup until some seconds after the SIGHUP - a minimal test case to reproduce the problem (does it also happen with just "rocommunity something" in your snmpd.conf?)


+Thomas


Here's an example of the problem:

$ /usr/sbin/snmpd  -c /etc/snmp/snmpd.conf -C 127.0.0.1:161 10.1.0.36:161
$ snmpget -c public localhost system.sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux jh_venturi 2.4.26 #5 SMP Tue Sep 7 14:30:45 PDT 2004 i686
$ ps axwww |grep snmpd
8595 ? S 0:00 /usr/sbin/snmpd -c /etc/snmp/snmpd.conf -C 127.0.0.1:161 10.1.0.36:161
9092 pts/0    S      0:00 grep snmpd
$ kill -HUP 8595
$ snmpget -c public localhost system.sysDescr.0
SNMPv2-MIB::sysDescr.0 = No Such Object available on this agent at this OID


I've simplified things down to the point where I'm taking mostly defaults, so here's
the output of net-snmp-config:

$ ./net-snmp-config --configure-options
'--prefix=/usr'

You can see the exact command line I'm using in the example above.

The contents of my snmpd.conf file is this:

rocommunity public

There were no changes to the snmpd.conf file before or after the SIGHUP.

When I retried running with your debug parameters thusly:

$ /usr/sbin/snmpd -f -Le -Dread_config -c /etc/snmp/snmpd.conf -C 127.0.0.1:161 10.1.0.36:161 >snmpd.out 2>snmpd.err

The snmpd.out was empty and here's what was output to stderr, from the point of
startup, through the SIGHUP and then the SIGTERM:

registered debug token read_config, 1
read_config: reading premib configuration tokens
read_configs_optional: reading optional configuration tokens for snmpd
read_config: Reading optional config file: "/etc/snmp/snmpd.conf"
read_config: Reading configuration /etc/snmp/snmpd.conf
read_config: /etc/snmp/snmpd.conf:1 examining: rocommunity public
read_config: reading normal configuration tokens
read_configs_optional: reading optional configuration tokens for snmpd
read_config: Reading optional config file: "/etc/snmp/snmpd.conf"
read_config: Reading configuration /etc/snmp/snmpd.conf
read_config: /etc/snmp/snmpd.conf:1 examining: rocommunity public
read_config: Found a parser.  Calling it: rocommunity / public
read_config: storing: #
# net-snmp (or ucd-snmp) persistent data file.
#
############################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
#          **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
############################################################################
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#















read_config: storing: setserialno 552009661
read_config: storing: ##############################################################
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing: ##############################################################
read_config: storing:

read_config: storing: ##############################################################
read_config: storing: #
# ifXTable persistent data
#
read_config: storing: ifXTable .1 14:0 16:0 18:0x $
read_config: storing: ifXTable .2 14:0 16:0 18:0x $
read_config: storing: ifXTable .3 14:0 16:0 18:0x $
read_config: storing: ifXTable .4 14:0 16:0 18:0x $
read_config: storing: ifXTable .5 14:0 16:0 18:0x $
read_config: storing: ##############################################################
read_config: storing:

read_config: storing: engineBoots 1
read_config: storing: oldEngineID 0x80001f88807258653372584644
NET-SNMP version 5.3.0.1
Reconfiguring daemon
NET-SNMP version 5.3.0.1 restarted
read_config: reading normal configuration tokens
read_configs_optional: reading optional configuration tokens for snmpd
read_config: Reading optional config file: "/etc/snmp/snmpd.conf"
read_config: Reading configuration /etc/snmp/snmpd.conf
read_config: /etc/snmp/snmpd.conf:1 examining: rocommunity public
read_config: Found a parser.  Calling it: rocommunity / public
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
Received TERM or STOP signal...  shutting down...
read_config: storing: #
# net-snmp (or ucd-snmp) persistent data file.
#
############################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
#          **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
############################################################################
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#















read_config: storing: setserialno 552009661
read_config: storing: ##############################################################
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing: ##############################################################
read_config: storing:

read_config: storing: ##############################################################
read_config: storing: #
# ifXTable persistent data
#
read_config: storing: ifXTable .1 14:0 16:0 18:0x $
read_config: storing: ifXTable .2 14:0 16:0 18:0x $
read_config: storing: ifXTable .3 14:0 16:0 18:0x $
read_config: storing: ifXTable .4 14:0 16:0 18:0x $
read_config: storing: ifXTable .5 14:0 16:0 18:0x $
read_config: storing: ##############################################################
read_config: storing:

read_config: storing: engineBoots 1
read_config: storing: oldEngineID 0x80001f88807258653372584644






-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to