19.07: net-snmp: snmpd not listening after reboot
@stintel is already working on this.
Since Mar 17, 2021.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @stintel
Environment: ath79, openwrt-19.07 branch (works fine in master!)
Description: snmpd responds perfectly well on first boot, but after reboot, it is non-responsive until it is restarted. snmp requests time out, no logging. Process is running, conf file is generated in /var/run/snmpd.conf as normal
Only hint is that the agentXSocket file is NOT created! (This is how I first came to this, my subagent wasn't working)
root@OpenWrt:/# pgrep -lfa snmpd
1248 /usr/sbin/snmpd -Lf /dev/null -f
root@OpenWrt:/# cat /var/run/snmpd.conf
agentaddress UDP:161,UDP6:161
master agentx
agentXSocket /var/run/agentx.sock
sysLocation office
sysContact bofh@example.com
sysName HeartOfGold
com2sec ro default public
com2sec rw localhost private
com2sec6 ro default public
com2sec6 rw localhost private
group public v1 ro
group public v2c ro
group public usm ro
group private v1 rw
group private v2c rw
group private usm rw
view all included .1
access public "" any noauth exact all none none
access private "" any noauth exact all all all
exec filedescriptors /bin/cat /proc/sys/fs/file-nr
engineIDType 3
engineIDNic eth0
root@OpenWrt:/# ls -l /var/run/ag*
ls: /var/run/agent*: No such file or directory
After restart, works just fine, and agentx file is created and snmp requests are answered
root@OpenWrt:/# /etc/init.d/snmpd restart
root@OpenWrt:/# ls -l /var/run/ag*
srwxr-xr-x 1 root root 0 Oct 20 10:27 /var/run/agentx.sock
root@OpenWrt:/#
Openwrt build info. (Tried various points to very early on 19.07 branch, but that was still with my own extra apps, this is a perfectly clean one)
root@OpenWrt:/# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07-SNAPSHOT'
DISTRIB_REVISION='r11221-7dd822983b'
DISTRIB_TARGET='ath79/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07-SNAPSHOT r11221-7dd822983b'
DISTRIB_TAINTS='no-all'
root@OpenWrt:/#
Diffconfig on clean 19.07 branch
$ ./scripts/diffconfig.sh
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_etactica_eg200=y
CONFIG_DEVEL=y
CONFIG_DOWNLOAD_FOLDER="/home/karlp/src/dl"
CONFIG_PACKAGE_libnetsnmp=y
CONFIG_PACKAGE_libpci=y
CONFIG_PACKAGE_snmpd=y
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.