From: SourceForge.net <no...@so...> - 2010-09-10 18:31:36
|
Bugs item #3063684, was opened at 2010-09-10 16:30 Message generated for change (Settings changed) made by tanders You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3063684&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: agent Group: None >Status: Closed >Resolution: Invalid Priority: 2 Private: No Submitted By: claus klein (klc1sha) Assigned to: Nobody/Anonymous (nobody) Summary: net-snmp-5.6.rc2 lose the persistent data after restart Initial Comment: under cygwin the persitent data are all lost afte stop and start snmpd! $ snmpwalk localhost version UCD-SNMP-MIB::versionIndex.0 = INTEGER: 1 UCD-SNMP-MIB::versionTag.0 = STRING: 5.6.rc2 UCD-SNMP-MIB::versionDate.0 = STRING: $Date: 2010-01-24 03:41:03 -0800 (Sun, 24 Jan 2010) $ UCD-SNMP-MIB::versionCDate.0 = STRING: Fri Sep 10 16:06:02 2010 UCD-SNMP-MIB::versionIdent.0 = STRING: $Id: versioninfo.c 18044 2010-01-24 11:41:03Z bvassche $ UCD-SNMP-MIB::versionConfigureOptions.0 = STRING: '--cache-file=config.cache' '--with-mib-modules=snmpv3mibs ucd_snmp notification notification-log-mib target agent_mibs agentx' '--with-out-mib-modules=host host/hr_network host/hr_swrun ucd-snmp/diskio ' '--with-out-mib-modules= disman/event disman/schedule' '--with-defaults' '--without-rpm' '--with-libs=-lws2_32' '--disable-embedded-perl' '--without-perl-modules' '--without-python-modules' '--disable-deprecated' '--enable-ipv6' '--with-transports=TCPIPv6 UDPIPv6' '--enable-developer' '--enable-mini-agen t' UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 0 UCD-SNMP-MIB::versionUpdateConfig.0 = INTEGER: 0 UCD-SNMP-MIB::versionRestartAgent.0 = INTEGER: 0 UCD-SNMP-MIB::versionSavePersistentData.0 = INTEGER: 0 UCD-SNMP-MIB::versionDoDebugging.0 = INTEGER: 1 $ uname -a CYGWIN_NT-5.1 wd002072 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin I start the snmpd with: /usr/local/sbin/snmpd -C -c c:/usr/etc/snmp/snmpd.conf -Le -f -Dread,write my configuration after stop: $ !cat cat /var/net-snmp/snmpd.conf # # 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?) # usmUser 1 3 0x80001f88807a4e362bc61e8a4c "unsec" "unsec" NULL .1.3.6.1.6.3.10.1.1.2 0xcc7762f488eaca5f327433bfbac5bb53 .1.3.6.1.6.3.10.1.2.2 0xcc7762f488eaca5f327433bfbac5bb53 "" usmUser 1 3 0x80001f88807a4e362bc61e8a4c "netadmin" "netadmin" NULL .1.3.6.1.6.3.10.1.1.2 0x6bb5f47b065a70038d8297b5ecfde2b7 .1.3.6.1.6.3.10.1.2.2 0x6bb5f47b065a70038d8297b5ecfde2b7 "" snmpNotifyFilterProfileTable "internal0" "svfua" 3 1 ############################################################## # # snmpNotifyFilterTable persistent data # snmpNotifyFilterTable .5.115.118.102.117.97.1.3.6.1.4.1.59999 2:0x 3:1 4:3 5:1 $ snmpNotifyFilterTable .5.115.118.102.117.97.1.3.6.1.4.1.59999.33.1.3.1.2.1.2.2 2:"fe" 3:2 4:3 5:1 $ ############################################################## engineBoots 1 oldEngineID 0x80001f88807a4e362bc61e8a4c ###################################### and that is the startup log: ###################################### $ egrep -w 'conf|store' startup.log read_config:opt: Reading optional config file: "c:/usr/etc/snmp/snmpd.conf" read_config:file: Reading configuration c:/usr/etc/snmp/snmpd.conf (1) read_config:line: c:/usr/etc/snmp/snmpd.conf:5 examining: agentaddress udp:161 read_config:line: c:/usr/etc/snmp/snmpd.conf:10 examining: master agentx read_config:line: c:/usr/etc/snmp/snmpd.conf:12 examining: agentxsocket tcp:127.0.0.1:705 read_config:line: c:/usr/etc/snmp/snmpd.conf:15 examining: agentxTimeout 5 # agentxTimeout AgentX Timeout (seconds) read_config:line: c:/usr/etc/snmp/snmpd.conf:17 examining: agentxRetries 0 # agentxRetries AgentX Retries read_config:line: c:/usr/etc/snmp/snmpd.conf:23 examining: view iso included .iso read_config:line: c:/usr/etc/snmp/snmpd.conf:28 examining: createUser netadmin MD5 "mypassword" DES "mypassword" read_config:line: c:/usr/etc/snmp/snmpd.conf:29 examining: rwuser netadmin authPriv read_config:line: c:/usr/etc/snmp/snmpd.conf:31 examining: createUser unsec MD5 "--none--" DES "--none--" read_config:line: c:/usr/etc/snmp/snmpd.conf:32 examining: rwuser unsec noAuthNoPriv -V iso "*" read_config:line: c:/usr/etc/snmp/snmpd.conf:42 examining: rocommunity public localhost -V iso "" read_config:line: c:/usr/etc/snmp/snmpd.conf:43 examining: rwcommunity private localhost -V iso "" read_config:line: c:/usr/etc/snmp/snmpd.conf:55 examining: authcommunity read,write line1 default -V iso line1 read_config:line: c:/usr/etc/snmp/snmpd.conf:56 examining: authcommunity read,write line2 default -V iso line2 read_config:line: c:/usr/etc/snmp/snmpd.conf:57 examining: authcommunity read,write line3 default -V iso line3 read_config:line: c:/usr/etc/snmp/snmpd.conf:68 examining: com2sec -Cn snmptrapd local default snmptrapd read_config:line: c:/usr/etc/snmp/snmpd.conf:73 examining: group MyRWGroup v1 local read_config:line: c:/usr/etc/snmp/snmpd.conf:74 examining: group MyRWGroup v2c local read_config:line: c:/usr/etc/snmp/snmpd.conf:79 examining: view all included .1 read_config:line: c:/usr/etc/snmp/snmpd.conf:84 examining: access MyRWGroup snmptrapd any noauth exact all all none read_config:line: c:/usr/etc/snmp/snmpd.conf:91 examining: authtrapenable 1 read_config:line: c:/usr/etc/snmp/snmpd.conf:92 examining: doNotRetainNotificationLogs no read_config:line: c:/usr/etc/snmp/snmpd.conf:98 examining: trapsess -v 2c -c private udp:localhost:162 read_config:opt: Reading optional config file: "c:/usr/etc/snmp/snmpd.conf" read_config:file: Reading configuration c:/usr/etc/snmp/snmpd.conf (0) read_config:line: c:/usr/etc/snmp/snmpd.conf:1 examining: syslocation WeilImDorf (2gs2) 1. Stock read_config:line: c:/usr/etc/snmp/snmpd.conf:2 examining: syscontact kle...@wd... read_config:line: c:/usr/etc/snmp/snmpd.conf:5 examining: agentaddress udp:161 read_config:line: c:/usr/etc/snmp/snmpd.conf:10 examining: master agentx read_config:line: c:/usr/etc/snmp/snmpd.conf:12 examining: agentxsocket tcp:127.0.0.1:705 read_config:line: c:/usr/etc/snmp/snmpd.conf:15 examining: agentxTimeout 5 # agentxTimeout AgentX Timeout (seconds) read_config:line: c:/usr/etc/snmp/snmpd.conf:17 examining: agentxRetries 0 # agentxRetries AgentX Retries read_config:line: c:/usr/etc/snmp/snmpd.conf:23 examining: view iso included .iso read_config:line: c:/usr/etc/snmp/snmpd.conf:28 examining: createUser netadmin MD5 "mypassword" DES "mypassword" read_config:line: c:/usr/etc/snmp/snmpd.conf:29 examining: rwuser netadmin authPriv read_config:line: c:/usr/etc/snmp/snmpd.conf:31 examining: createUser unsec MD5 "--none--" DES "--none--" read_config:line: c:/usr/etc/snmp/snmpd.conf:32 examining: rwuser unsec noAuthNoPriv -V iso "*" read_config:line: c:/usr/etc/snmp/snmpd.conf:42 examining: rocommunity public localhost -V iso "" read_config:line: c:/usr/etc/snmp/snmpd.conf:43 examining: rwcommunity private localhost -V iso "" read_config:line: c:/usr/etc/snmp/snmpd.conf:55 examining: authcommunity read,write line1 default -V iso line1 read_config:line: c:/usr/etc/snmp/snmpd.conf:56 examining: authcommunity read,write line2 default -V iso line2 read_config:line: c:/usr/etc/snmp/snmpd.conf:57 examining: authcommunity read,write line3 default -V iso line3 read_config:line: c:/usr/etc/snmp/snmpd.conf:68 examining: com2sec -Cn snmptrapd local default snmptrapd read_config:line: c:/usr/etc/snmp/snmpd.conf:73 examining: group MyRWGroup v1 local read_config:line: c:/usr/etc/snmp/snmpd.conf:74 examining: group MyRWGroup v2c local read_config:line: c:/usr/etc/snmp/snmpd.conf:79 examining: view all included .1 read_config:line: c:/usr/etc/snmp/snmpd.conf:84 examining: access MyRWGroup snmptrapd any noauth exact all all none read_config:line: c:/usr/etc/snmp/snmpd.conf:91 examining: authtrapenable 1 read_config:line: c:/usr/etc/snmp/snmpd.conf:92 examining: doNotRetainNotificationLogs no read_config:line: c:/usr/etc/snmp/snmpd.conf:98 examining: trapsess -v 2c -c private udp:localhost:162 read_config:store: storing: # # Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf. read_config:store: storing: usmUser 1 3 0x80001f88802c6a4241863e8a4c "unsec" "unsec" NULL .1.3.6.1.6.3.10.1.1.2 0x7c949887f42823b835b1fddc1cdd30e0 .1.3.6.1.6.3.10.1.2.2 0x7c949887f42823b835b1fddc1cdd30e0 "" read_config:store: storing: usmUser 1 3 0x80001f88802c6a4241863e8a4c "netadmin" "netadmin" NULL .1.3.6.1.6.3.10.1.1.2 0x841a07610ab4b3ec79639c26673e2437 .1.3.6.1.6.3.10.1.2.2 0x841a07610ab4b3ec79639c26673e2437 "" read_config:store: storing: ############################################################## read_config:store: storing: # read_config:store: storing: ############################################################## read_config:store: storing: read_config:store: storing: engineBoots 1 read_config:store: storing: oldEngineID 0x80001f88802c6a4241863e8a4c Now the snmpNotifyFilter configuraion is lost! ---------------------------------------------------------------------- >Comment By: Thomas Anders (tanders) Date: 2010-09-10 20:31 Message: As you found out yourself, this is not a bug. If you "trim" the SNMPCONFPATH, you have to make sure you include the persistent config file. Feel free to propose a patch to the documentation to make this more obvious. ---------------------------------------------------------------------- Comment By: claus klein (klc1sha) Date: 2010-09-10 16:51 Message: It seem that I have always to add the persitent config file to as command line argument: $ /usr/local/sbin/snmpd -C -c c:/usr/etc/snmp/snmpd.conf -c /var/net-snmp/snmpd.conf -Le -f -Dread,write 2>&1 | te e startup.log registered debug token read, 1 registered debug token write, 1 read_config: reading premib configuration tokens read_configs_optional: reading optional configuration tokens for snmpd read_config:opt: Reading optional config file: "/var/net-snmp/snmpd.conf" read_config:file: Reading configuration /var/net-snmp/snmpd.conf (1) read_config:line: /var/net-snmp/snmpd.conf:32 examining: usmUser 1 3 0x80001f8880583400001af4854c00000000 "unsec" "unsec" NULL .1.3.6.1.6.3.10.1.1.2 0x5225e345bb555ad8084f2d04182b38df .1.3.6.1.6.3.10.1.2.2 0x5225e345bb555ad8084f2d04182b38df 0x read_config:line: /var/net-snmp/snmpd.conf:33 examining: usmUser 1 3 0x80001f8880583400001af4854c00000000 "netadmin" "netadmin" NULL .1.3.6.1.6.3.10.1.1.2 0xae8e9783aed4a672a35c392bfb748be2 .1.3.6.1.6.3.10.1.2.2 0xae8e9783aed4a672a35c392bfb748be2 0x read_config:line: /var/net-snmp/snmpd.conf:34 examining: snmpNotifyFilterProfileTable "internal0" "svfua" 3 1 read_config:line: /var/net-snmp/snmpd.conf:39 examining: snmpNotifyFilterTable .5.115.118.102.117.97.1.3.6.1.4.1.59999 2:0x 3:1 4:3 5:1 $ read_config:line: /var/net-snmp/snmpd.conf:40 examining: snmpNotifyFilterTable .5.115.118.102.117.97.1.3.6.1.4.1.59999.33.1.3.1.2.1.2.2 2:"fe" 3:2 4:3 5:1 $ read_config:line: /var/net-snmp/snmpd.conf:44 examining: engineBoots 7 read_config:line: /var/net-snmp/snmpd.conf:45 examining: oldEngineID 0x80001f8880583400001af4854c00000000 read_config:parser: Found a parser. Calling it: oldEngineID / 0x80001f8880583400001af4854c00000000 ... But this is not obviously! If the file, which will be written is not emtpy, it should parsed before write IMHO. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3063684&group_id=12694 |