Hello, all.

I've developed a couple of SNMP subagents over the last few months using 
net-snmp with good results.  I've bumped into an issue involving rwcommunity 
that I don't quite understand and am hoping that somebody can give me an "AHA!" 
insight.

I'm using version 5.3.1 and only supporting V1 and V2c.  I have two copies of 
snmpd running on a single system, each listening on different interfaces.  One 
of these is the "master" and has its snmpd.conf file in a non-standard 
directory (I've defined the location using SNMPCONFPATH).

The issue here is that this snmpd master process appears to be ignoring the 
rwcommunity definition in its snmpd.conf file.  I can specify any community on 
an snmpwalk and have it "succeed" when accessing this system.

The only hint I have as to what might be going on is something I noticed when 
turning on full debugging using -DALL.  
The rwcommunity token is accessed twice by the snmpd master process; it 
recognizes it the first time, but not the second time ("unknown token").  This 
is true whether or not I prefix rwcommunity with [snmpd].  Also, I tried 
specifying the community via --rwcommunity="prince" and had the same results.

Here are some snippets from the debug log file:



read_config:  config path used for
snmpd:/etc/snmp/master:/usr/share/snmp:/usr/lib/snmp:/root/.snmp (persistent
path:/var/net-snmp)

 

 

read_config:
Reading configuration /etc/snmp/master/snmpd.conf

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:70 examining: master  agentx

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:75 examining: agentuser  root

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:86 examining: agentxsocket  localhost:722

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:87 examining: smuxsocket 1.0.0.0

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:126 examining: rwcommunity prince

.

.

.

trace:
netsnmp_ds_set_string(): default_store.c, 283:

netsnmp_ds_set_string:
Setting APP:5 = "1.0.0.0"

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:126 examining: rwcommunity prince

/etc/snmp/master/snmpd.conf:
line 126: Warning: Unknown token: rwcommunity.

 

Here are similar snippets using [snmpd] and using --rwcommunity:




 

 

trace:
read_config(): read_config.c, 756:

read_config:
Switching to new context: (this line only) snmpd

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:126 examining: [snmpd]  rwcommunity prince

.

.

trace:
read_config(): read_config.c, 779:

read_config:
/etc/snmp/master/snmpd.conf:126 examining: [snmpd]  rwcommunity prince

/etc/snmp/master/snmpd.conf:
line 126: Warning: Unknown token: rwcommunity.

 

**

 

 

trace:
netsnmp_config_process_memory_list(): read_config.c, 631:

read_config:
processing memory: rwcommunity prince

.

.

.

 

trace:
netsnmp_config_process_memory_list(): read_config.c, 631:

read_config:
processing memory: rwcommunity prince

: line 0:
Warning: Unknown token: rwcommunity.

 

 

 Is there anything obvious here that I'm missing?

    Thanks,
      Paul



_________________________________________________________________
More immediate than e-mail? Get instant access with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_instantaccess_042008
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to