Snmpd Not Responding on Boot

I am referring to lan, which is static and you have ip6address 60.

Yes, you are right - sorry! I have two routers, both having this (snmpd startup) issue. One is static, the other DHCP (and I was looking at the DHCP one, of course :laughing:).

So thinking this isn't it?

Thanks!

This one doesn't appear in any of my interfaces, so I am trying to narrow down what could be the issue here. Also try to force_link on lan at least. This usually solves race condition cases.

1 Like

Will give it a try (and will let you know), thanks!

Sorry for the delay - had some issues this week with rolling power outages, finally back online :frowning_face:

Tried this, adding option force_link '1' ... doesn't seem to fix it. Or do I have this wrong?

Thanks!

BTW, a couple thoughts on this ...

  1. Why not just make the "stock" install with this at ~ S90? I don't see snmpd as a huge panic to start up, agreed? Polling it is typically quite slow.
  2. I was thinking about adding a script to check if snmp was responding, but then you need to have snmp tools in the build - not a "normal" install.
  3. I could also have a startup script ... move S50 to S90 (for snmpd), and restart it - but to #1 above, why not just put it at S90 by default?

Thoughts?

Thanks!

OK, found a very easy fix! Just change row 3 (link below), 50 => 90. Then all good.

Submit a PR for this?

Thanks!

you need to hack the init.d file and add verbosity / debug mode to the daemon and find the true root cause... ( assuming there isn't already a uci option for that )

PR-bump-startorder>90 without proper justification if likely to create more issues than it solves... after all... whomever set it at 50 in the first place likely had a perfectly valid reason to do so...

Likely better short term workaround is to bump procd respawn count...

(edit: after looking at that file properly it appears to be running some modern raw trigger/firewall etc. hooks... so i'd be looking there first - as opposed to daemon verbosity)

Yes, as you noted - it's spawning, so respawn won't really help, agreed? The issue is that it's not running "properly" - seems to be a race condition of sorts with network?

Agreed! FYI, I tried S90 here (for testing), and it does fix the issue. I'm trying to figure out who to ask (to your point, the initial author). snmp is not really a time critical (startup) item - at least I don't think so :rofl:. And it shouldn't really hold anything else up (i.e. it doesn't really gate anything else).

Thanks!

did you try adding daemon verbosity?

[root@dca632 /usbstick 48°]# snmpd --help | grep verbose
			  (try ALL for extremely verbose output)
  -V			verbose display

logread

#or export PROCD_DEBUG=1 #in the init.d/snmpd or something similar

otherwise we are just speculating...

2c... imho... services like that are mid-boot 50-79 max but like you say 50 ( on your system... it's not a wide occurrence? ) seems to be jamming likely some sort of firewall/lock problem...

1 Like

Agreed! It does seem to be right on the edge - some routers OK, others not. And even the "failing" ones ... fail sometimes, passes other times (on reboots). So really right on the edge.

FYI, I just moved it to S90 for testing. I can check other values, if preferred. NP at all. And let me try to turn on increased verbosity, check the logs after.

Thanks!

OK, I ran three cases ... with snmpd at S50 (fails), S70 (fails), and S90 (passes!). The logs, below ... BTW, I manually (for testing) changed the snmpd command, from,

/usr/sbin/snmpd -Lf /dev/null -f -r

to,

/usr/sbin/snmpd -Lf /tmp/snmpd.log -f -r -DALL

And, grabbing the log file,

  1. Failing case (S50, S70)
buffer too small to read octet string (11 < 11)
MIB search path: //.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (TUNNEL-MIB): At line 0 in (none)
Cannot find module (IPV6-FLOW-LABEL-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
error finding row index in _ifXTable_container_row_restore
error finding row index in _ifXTable_container_row_restore
error finding row index in _ifXTable_container_row_restore
error finding row index in _ifXTable_container_row_restore
Warning: no access control information configured.
  (Config search path: /etc/snmp:/usr/share/snmp:/usr/lib/snmp://.snmp)
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent.
NET-SNMP version 5.8
  1. Passing case (S90)
buffer too small to read octet string (11 < 11)
MIB search path: //.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (TUNNEL-MIB): At line 0 in (none)
Cannot find module (IPV6-FLOW-LABEL-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Turning on AgentX master support.
/etc/snmp/snmpd.conf: line 21: Error: WARNING: This output format is not valid, and is only retained for backward compatibility - Please consider using the 'extend' directive instead
/etc/snmp/snmpd.conf: line 22: Error: WARNING: This output format is not valid, and is only retained for backward compatibility - Please consider using the 'extend' directive instead
net-snmp: 2 error(s) in config file(s)
NET-SNMP version 5.8

I admit, not quite sure what error finding row index in _ifXTable_container_row_restore indicates :frowning_face:. Thoughts?

Thanks!

1 Like

no extroot right? logs seem to be indicating it cant find the snmpd.conf... ( or malformed )

Correct, no extroot. It's almost like the file system is not fully up (at S50), needs the extra delay?

Thanks!

I edited the title of the post accordingly.

Not necessarily: https://github.com/mhei/openwrt-oldpackages/commit/fa3b8c3b5b952786cda373380d3d412f6e76f063

2 Likes

So they were all just set at 50 as a starting point it seems? So no big heartburn moving it to 90? At least in my mind, snmp is not something that needs to start up real quickly / early :smiley:

Thanks!