./snmpd -f -L -c /usr/local/share/snmp/mibs/snmpd.conf & snmpd routine auto termination problem

"Alexander King" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Dave:
 
2010/1/21 Alexander King <[email protected]>:
> sys-man snmp # /usr/local/sbin/snmpd -f -L
> Warning: no access control information configured.
> It's unlikely this agent can serve any useful purpose in this state.
 > Can anybody tell me where maybe I am wrong?
 This error message tells you exactly what is wrong.
There is no access control in the snmpd.conf file
that this agent is using.
  
  
 >>>>my fault,the command donot give the configuration file to the snmpd routine.I am sorry.
  
  
 > sys-man snmp # /usr/local/sbin/snmpd -f -Le -c
>       /usr/local/share/snmp/mibs/snmpd.conf
> Turning on AgentX master support.
 This file does at least contain some form of access control.
Though it's unclear why you are putting the config file into
a MIB directory.   It would more naturally go into
/usr/local/share/snmp
or
/usr/local/etc/snmp
  
  
 >>>>my fault,I had corrected the obscure operation.that I imitate other's from the Internet.
  
  
 > NET-SNMP version 5.4.2.1
> Segmentation fault
 Hmmm....  that shouldn't be happening.
And it's not clear exactly where things are falling over.
Does this happen immediately when you start the agent,
or after a short delay?
  
 >>>>yes,everytime,maybe three or five seconds,or shorter.the generated code files integrated into the master snmpd routine,my code can send trap to the destination server I configured in the snmpd.conf file,received by MG-soft several times.
  
  
 Try starting the agent using
 snmpd -f -Le -c .../snmpd.conf  -Dread_config
 That should at least give some indication of whether
the agent is failing while processing the config file
(and if so, where).
  
 >>>>the output file is sent by attachment.,But I sm now sure the snmd.conf is OK, all the problem was triggered by my private routine(uit subagent)
 >>>>I attached my uit.c file,would you mind take a few minutes to check it for me ?it so tough to me.(memory leak or something?)
  
 Perhaps try with a minimal snmpd.conf file
e.g. containing *just* a "rocommunity public" line (and nothing else).
If that works, then you can build up to the full configuration, and
see exactly what introduces the crash.
 If that minimal config also fails, then the problem lies elsewhere....
  
  
 >>>>yes,unlucky,,,I really think it my subagent code's fault(uit.c,uit.h).
 >>>>in my snmptrapd.conf:
authcommunity execute,log,net  public
traphandle .1.3.6.1.4.1.2021.251.2  page_me down
traphandle .1.3.6.1.4.1.30901.2090.7000   /home/net-snmp/traphandle.pl  
traphandle   default   log_it 
  
 >>>>in my snmpd.conf
 trapsink localhost
trap2sink localhost
informsink loaclhost
 trapsink 172.19.50.12
trap2sink 172.19.50.12
informsink 172.19.50.12
  
 >>>>Above are some entries configuration related trap, I saw 'trap2sink 172.19.50.12:162   public ',I donot know which one is right.
I commented the line 'mibs  +ALL'
  
  
  
  
  
 Dave
 ------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

_______________________________________________
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
uit.rar (application/octet-stream, 4.4 KB) - not displayed
snmpd -f -Le -c ...snmpd.conf -Dread_config.txt (application/octet-stream, 18 KB)
read_config: Found a parser.  Calling it: com2sec / mynetwork 172.19.50.0/24  public
read_config: /usr/local/share/snmp/snmpd.conf:76 examining: com2sec local     192.168.80.0/24 public
read_config: Found a parser.  Calling it: com2sec / local     192.168.80.0/24 public
read_config: /usr/local/share/snmp/snmpd.conf:81 examining: group MyRWGroup     v1         local
read_config: Found a parser.  Calling it: group / MyRWGroup     v1         local
read_config: /usr/local/share/snmp/snmpd.conf:82 examining: group MyRWGroup     v2c        local
read_config: Found a parser.  Calling it: group / MyRWGroup     v2c        local
read_config: /usr/local/share/snmp/snmpd.conf:83 examining: group MyRWGroup     usm        local
read_config: Found a parser.  Calling it: group / MyRWGroup     usm        local
read_config: /usr/local/share/snmp/snmpd.conf:84 examining: group MyROGroup v1         mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup v1         mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:85 examining: group MyROGroup v2c        mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup v2c        mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:86 examining: group MyROGroup usm        mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup usm        mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:92 examining: view all    included  .1                               80
read_config: Found a parser.  Calling it: view / all    included  .1                               80
read_config: /usr/local/share/snmp/snmpd.conf:99 examining: access MyROGroup ""      any       noauth    exact  all    none   none
read_config: Found a parser.  Calling it: access / MyROGroup ""      any       noauth    exact  all    none   none
read_config: /usr/local/share/snmp/snmpd.conf:100 examining: access MyRWGroup ""      any       noauth    exact  all    all    none
read_config: Found a parser.  Calling it: access / MyRWGroup ""      any       noauth    exact  all    all    none
read_config: /usr/local/share/snmp/snmpd.conf:116 examining: syslocation 8=) Shenzhen,P.R.China.
read_config: Found a parser.  Calling it: syslocation / 8=) Shenzhen,P.R.China.
read_config: /usr/local/share/snmp/snmpd.conf:117 examining: syscontact  :=) Alexander Chen <[email protected]>
read_config: Found a parser.  Calling it: syscontact / :=) Alexander Chen <[email protected]>
read_config: /usr/local/share/snmp/snmpd.conf:151 examining: proc mountd
read_config: Found a parser.  Calling it: proc / mountd
read_config: /usr/local/share/snmp/snmpd.conf:154 examining: proc ntalkd 4
read_config: Found a parser.  Calling it: proc / ntalkd 4
read_config: /usr/local/share/snmp/snmpd.conf:157 examining: proc sendmail 10 1
read_config: Found a parser.  Calling it: proc / sendmail 10 1
read_config: /usr/local/share/snmp/snmpd.conf:215 examining: exec echotest /bin/echo hello world
read_config: Found a parser.  Calling it: exec / echotest /bin/echo hello world
read_config: /usr/local/share/snmp/snmpd.conf:266 examining: disk / 10000
read_config: Found a parser.  Calling it: disk / / 10000
read_config: /usr/local/share/snmp/snmpd.conf:295 examining: load 12 14 14
read_config: Found a parser.  Calling it: load / 12 14 14
read_config: /usr/local/share/snmp/snmpd.conf:410 examining:  master  agentx
read_config: Found a parser.  Calling it: master / agentx
Turning on AgentX master support.
read_config: /usr/local/share/snmp/snmpd.conf:423 examining: mibs +ALL
/usr/local/share/snmp/snmpd.conf: line 423: Warning: Unknown token: mibs.
read_config: /usr/local/share/snmp/snmpd.conf:425 examining: dlmod   uit  /usr/local/share/snmp/mibs/
read_config: Found a parser.  Calling it: dlmod / uit  /usr/local/share/snmp/mibs/
dlopen failed: /usr/local/share/snmp/mibs/: cannot read file data: Is a directory
read_config: /usr/local/share/snmp/snmpd.conf:426 examining: mibs         /usr/local/share/snmp/mibs/
/usr/local/share/snmp/snmpd.conf: line 426: Warning: Unknown token: mibs.
read_config: /usr/local/share/snmp/snmpd.conf:429 examining: trapsink localhost
read_config: Found a parser.  Calling it: trapsink / localhost
read_config: /usr/local/share/snmp/snmpd.conf:430 examining: trap2sink localhost
read_config: Found a parser.  Calling it: trap2sink / localhost
read_config: /usr/local/share/snmp/snmpd.conf:431 examining: informsink loaclhost
read_config: Found a parser.  Calling it: informsink / loaclhost
getaddrinfo: loaclhost Name or service not known
snmpd: create_trap_session:
/usr/local/share/snmp/snmpd.conf: line 431: Error: cannot create informsink: loaclhost
read_config: /usr/local/share/snmp/snmpd.conf:433 examining: trapsink 172.19.50.12
read_config: Found a parser.  Calling it: trapsink / 172.19.50.12
read_config: /usr/local/share/snmp/snmpd.conf:434 examining: trap2sink 172.19.50.12
read_config: Found a parser.  Calling it: trap2sink / 172.19.50.12
read_config: /usr/local/share/snmp/snmpd.conf:435 examining: informsink 172.19.50.12
read_config: Found a parser.  Calling it: informsink / 172.19.50.12
read_config: /usr/local/share/snmp/snmpd.local.conf: No such file or directory
read_config:  config dir: /usr/local/lib/snmp
read_config:  Directory not present: /usr/local/lib/snmp
read_config:  config dir: /root/.snmp
read_config:  Directory not present: /root/.snmp
read_config:  config path used for snmpd:/var/net-snmp (persistent path:/var/net-snmp)
read_config:  config dir: /var/net-snmp
read_config: Reading configuration /var/net-snmp/snmpd.conf
read_config: /var/net-snmp/snmpd.conf:32 examining: setserialno 1532578430
read_config: Found a parser.  Calling it: setserialno / 1532578430
read_config: /var/net-snmp/snmpd.conf:44 examining: ifXTable .1 14:0 18:0x $
read_config: Found a parser.  Calling it: ifXTable / .1 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:45 examining: ifXTable .2 14:0 18:0x $
read_config: Found a parser.  Calling it: ifXTable / .2 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:49 examining: engineBoots 7
read_config: Found a parser.  Calling it: engineBoots / 7
read_config: /var/net-snmp/snmpd.conf:50 examining: oldEngineID 0x80001f8880b17376270625584b00000000
read_config: /var/net-snmp/snmpd.local.conf: No such file or directory
read_config:  config path used for agentx:/usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp (persistent path:/var/net-snmp)
read_config:  config dir: /usr/local/etc/snmp
read_config:  Directory not present: /usr/local/etc/snmp
read_config:  config dir: /usr/local/share/snmp
read_config: /usr/local/share/snmp/agentx.conf: No such file or directory
read_config: /usr/local/share/snmp/agentx.local.conf: No such file or directory
read_config:  config dir: /usr/local/lib/snmp
read_config:  Directory not present: /usr/local/lib/snmp
read_config:  config dir: /root/.snmp
read_config:  Directory not present: /root/.snmp
read_config:  config path used for agentx:/var/net-snmp (persistent path:/var/net-snmp)
read_config:  config dir: /var/net-snmp
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config:  config path used for snmp:/usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp (persistent path:/var/net-snmp)
read_config:  config dir: /usr/local/etc/snmp
read_config:  Directory not present: /usr/local/etc/snmp
read_config:  config dir: /usr/local/share/snmp
read_config: Reading configuration /usr/local/share/snmp/snmp.conf
read_config: /usr/local/share/snmp/snmp.conf:29 examining: mibs  +ALL
read_config: /usr/local/share/snmp/snmp.local.conf: No such file or directory
read_config:  config dir: /usr/local/lib/snmp
read_config:  Directory not present: /usr/local/lib/snmp
read_config:  config dir: /root/.snmp
read_config:  Directory not present: /root/.snmp
read_config:  config path used for snmp:/var/net-snmp (persistent path:/var/net-snmp)
read_config:  config dir: /var/net-snmp
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory
net-snmp: 2 error(s) in config file(s)
read_configs_optional: reading optional configuration tokens for snmpd
read_config: Reading optional config file: "/usr/local/share/snmp/snmpd.conf"
read_config: Reading configuration /usr/local/share/snmp/snmpd.conf
read_config: /usr/local/share/snmp/snmpd.conf:61 examining: com2sec local     localhost       public
read_config: Found a parser.  Calling it: com2sec / local     localhost       public
read_config: /usr/local/share/snmp/snmpd.conf:62 examining: com2sec mynetwork NETWORK/24      COMMUNITY
read_config: Found a parser.  Calling it: com2sec / mynetwork NETWORK/24      COMMUNITY
/usr/local/share/snmp/snmpd.conf: line 62: Error: example config NETWORK not properly configured
read_config: /usr/local/share/snmp/snmpd.conf:63 examining: com2sec local     192.168.80.133  public
read_config: Found a parser.  Calling it: com2sec / local     192.168.80.133  public
read_config: /usr/local/share/snmp/snmpd.conf:64 examining: com2sec local     192.168.80.139  public
read_config: Found a parser.  Calling it: com2sec / local     192.168.80.139  public
read_config: /usr/local/share/snmp/snmpd.conf:65 examining: com2sec local     172.19.50.59    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.59    public
read_config: /usr/local/share/snmp/snmpd.conf:66 examining: com2sec local     172.19.60.135   public
read_config: Found a parser.  Calling it: com2sec / local     172.19.60.135   public
read_config: /usr/local/share/snmp/snmpd.conf:67 examining: com2sec local     172.19.50.74    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.74    public
read_config: /usr/local/share/snmp/snmpd.conf:68 examining: com2sec local     172.19.50.73    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.73    public
read_config: /usr/local/share/snmp/snmpd.conf:69 examining: com2sec local     172.19.50.43    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.43    public
read_config: /usr/local/share/snmp/snmpd.conf:70 examining: com2sec local     172.19.50.12    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.12    public
read_config: /usr/local/share/snmp/snmpd.conf:71 examining: com2sec local     172.19.50.11    public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.11    public
read_config: /usr/local/share/snmp/snmpd.conf:72 examining: com2sec local     172.19.0.0/16   public
read_config: Found a parser.  Calling it: com2sec / local     172.19.0.0/16   public
read_config: /usr/local/share/snmp/snmpd.conf:73 examining: com2sec local     172.19.30.0/24  public
read_config: Found a parser.  Calling it: com2sec / local     172.19.30.0/24  public
read_config: /usr/local/share/snmp/snmpd.conf:74 examining: com2sec local     172.19.50.0/24  public
read_config: Found a parser.  Calling it: com2sec / local     172.19.50.0/24  public
read_config: /usr/local/share/snmp/snmpd.conf:75 examining: com2sec mynetwork 172.19.50.0/24  public
read_config: Found a parser.  Calling it: com2sec / mynetwork 172.19.50.0/24  public
read_config: /usr/local/share/snmp/snmpd.conf:76 examining: com2sec local     192.168.80.0/24 public
read_config: Found a parser.  Calling it: com2sec / local     192.168.80.0/24 public
read_config: /usr/local/share/snmp/snmpd.conf:81 examining: group MyRWGroup     v1         local
read_config: Found a parser.  Calling it: group / MyRWGroup     v1         local
read_config: /usr/local/share/snmp/snmpd.conf:82 examining: group MyRWGroup     v2c        local
read_config: Found a parser.  Calling it: group / MyRWGroup     v2c        local
read_config: /usr/local/share/snmp/snmpd.conf:83 examining: group MyRWGroup     usm        local
read_config: Found a parser.  Calling it: group / MyRWGroup     usm        local
read_config: /usr/local/share/snmp/snmpd.conf:84 examining: group MyROGroup v1         mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup v1         mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:85 examining: group MyROGroup v2c        mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup v2c        mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:86 examining: group MyROGroup usm        mynetwork
read_config: Found a parser.  Calling it: group / MyROGroup usm        mynetwork
read_config: /usr/local/share/snmp/snmpd.conf:92 examining: view all    included  .1                               80
read_config: Found a parser.  Calling it: view / all    included  .1                               80
read_config: /usr/local/share/snmp/snmpd.conf:99 examining: access MyROGroup ""      any       noauth    exact  all    none   none
read_config: Found a parser.  Calling it: access / MyROGroup ""      any       noauth    exact  all    none   none
read_config: /usr/local/share/snmp/snmpd.conf:100 examining: access MyRWGroup ""      any       noauth    exact  all    all    none
read_config: Found a parser.  Calling it: access / MyRWGroup ""      any       noauth    exact  all    all    none
read_config: /usr/local/share/snmp/snmpd.conf:116 examining: syslocation 8=) Shenzhen,P.R.China.
read_config: Found a parser.  Calling it: syslocation / 8=) Shenzhen,P.R.China.
read_config: /usr/local/share/snmp/snmpd.conf:117 examining: syscontact  :=) Alexander Chen <[email protected]>
read_config: Found a parser.  Calling it: syscontact / :=) Alexander Chen <[email protected]>
read_config: /usr/local/share/snmp/snmpd.conf:151 examining: proc mountd
read_config: Found a parser.  Calling it: proc / mountd
/usr/local/share/snmp/snmpd.conf: line 151: Error: Already have an entry for this process.
read_config: /usr/local/share/snmp/snmpd.conf:154 examining: proc ntalkd 4
read_config: Found a parser.  Calling it: proc / ntalkd 4
/usr/local/share/snmp/snmpd.conf: line 154: Error: Already have an entry for this process.
read_config: /usr/local/share/snmp/snmpd.conf:157 examining: proc sendmail 10 1
read_config: Found a parser.  Calling it: proc / sendmail 10 1
/usr/local/share/snmp/snmpd.conf: line 157: Error: Already have an entry for this process.
read_config: /usr/local/share/snmp/snmpd.conf:215 examining: exec echotest /bin/echo hello world
read_config: Found a parser.  Calling it: exec / echotest /bin/echo hello world
duplicate table data attempted to be entered. row exists
Failed to register extend entry 'echotest' - possibly duplicate name.
read_config: /usr/local/share/snmp/snmpd.conf:266 examining: disk / 10000
read_config: Found a parser.  Calling it: disk / / 10000
read_config: /usr/local/share/snmp/snmpd.conf:295 examining: load 12 14 14
read_config: Found a parser.  Calling it: load / 12 14 14
read_config: /usr/local/share/snmp/snmpd.conf:410 examining:  master  agentx
read_config: Found a parser.  Calling it: master / agentx
Turning on AgentX master support.
read_config: /usr/local/share/snmp/snmpd.conf:423 examining: mibs +ALL
/usr/local/share/snmp/snmpd.conf: line 423: Warning: Unknown token: mibs.
read_config: /usr/local/share/snmp/snmpd.conf:425 examining: dlmod   uit  /usr/local/share/snmp/mibs/
read_config: Found a parser.  Calling it: dlmod / uit  /usr/local/share/snmp/mibs/
dlopen failed: /usr/local/share/snmp/mibs/: cannot read file data: Is a directory
read_config: /usr/local/share/snmp/snmpd.conf:426 examining: mibs         /usr/local/share/snmp/mibs/
/usr/local/share/snmp/snmpd.conf: line 426: Warning: Unknown token: mibs.
read_config: /usr/local/share/snmp/snmpd.conf:429 examining: trapsink localhost
read_config: Found a parser.  Calling it: trapsink / localhost
read_config: /usr/local/share/snmp/snmpd.conf:430 examining: trap2sink localhost
read_config: Found a parser.  Calling it: trap2sink / localhost
read_config: /usr/local/share/snmp/snmpd.conf:431 examining: informsink loaclhost
read_config: Found a parser.  Calling it: informsink / loaclhost
getaddrinfo: loaclhost Name or service not known
snmpd: create_trap_session:
/usr/local/share/snmp/snmpd.conf: line 431: Error: cannot create informsink: loaclhost
read_config: /usr/local/share/snmp/snmpd.conf:433 examining: trapsink 172.19.50.12
read_config: Found a parser.  Calling it: trapsink / 172.19.50.12
read_config: /usr/local/share/snmp/snmpd.conf:434 examining: trap2sink 172.19.50.12
read_config: Found a parser.  Calling it: trap2sink / 172.19.50.12
read_config: /usr/local/share/snmp/snmpd.conf:435 examining: informsink 172.19.50.12
read_config: Found a parser.  Calling it: informsink / 172.19.50.12
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 1532578431
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 18:0x $
read_config: storing: ifXTable .2 14:0 18:0x $
read_config: storing: ##############################################################
read_config: storing:

read_config: storing: engineBoots 8
read_config: storing: oldEngineID 0x80001f8880b17376270625584b00000000
NET-SNMP version 5.4.2.1
Segmentation fault
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.