我更新了 /etc/snmp/snmpd.conf 下的 snmpd.conf 文件。snmpd.conf 文件包含以下信息,
- sysLocation 坐落在海湾码头
- sys联系我[电子邮件保护]
- 系统服务 72
- 主代理x
- 代理地址 udp:161,udp6:[::1]:161
- 查看所有包含 .1.3.6.1.2.1.1
- 查看所有包含的 .1.3.6.1.2.1.25.1
- rocommunity public default -V all
- rocommunity6 公共默认-V全部
- rouser authPrivUser authpriv -V systemonly
然后我重新启动了 snmpd 服务(sudo 服务 snmpd 重新启动)当我检查服务状态时(sudo 服务 snmpd 状态),我收到以下错误,
请帮助我解决这个错误...
错误:
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset:>
Active: failed (Result: exit-code) since Tue 2021-04-27 17:08:36 IST; 8s a>
Process: 11112 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, sta>
Process: 11113 ExecStart=/usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp>
Main PID: 11113 (code=exited, status=1/FAILURE)
Apr 27 17:08:36 prabs-linux systemd[1]: Starting Simple Network Management Prot>
Apr 27 17:08:36 prabs-linux systemd[1]: Started Simple Network Management Proto>
Apr 27 17:08:36 prabs-linux snmpd[11113]: Error opening specified endpoint "udp>
Apr 27 17:08:36 prabs-linux snmpd[11113]: Server Exiting with code 1
Apr 27 17:08:36 prabs-linux systemd[1]: snmpd.service: Main process exited, cod>
Apr 27 17:08:36 prabs-linux systemd[1]: snmpd.service: Failed with result 'exit>
lines 1-13/13 (END)
答案1
我遇到过类似的问题,现在我发现问题出在 udp6:[::1]:161(我假设是 ipv6 地址)。删除它,然后重新启动服务 snmpd,错误应该会消失,并且您会获得活动状态。J