Warning: noaccess control information configured.
It's unlikely this agent can serve any usefulpurpose in this state.
Run "snmpconf -g basic_setup" tohelp you configure the snmpd.conf file for this agent.
这个错误是找不到配置文件,解决办法有两个:
1、 在该放配置文件的目录下没有放配置文件,配置目录在net-snmp-config.h中
#define SNMPLIBPATH "/usr/lib"
#define SNMPSHAREPATH "/usr/share/snmp"
#define SNMPCONFPATH "/usr/etc/snmp"
#define SNMPDLMODPATH "/usr/lib/snmp/dlmod"
查看这几个目录下是否有snmpd.conf文件,如果没有就加上;
2、差不多,就是目录问题,将配置文件的目录改变,然后让其能找到配置文件,也是上述位置的几个宏
比如我改成下面这个样子:
#define SNMPLIBPATH "/lib"
#define SNMPSHAREPATH "/tmp"
#define SNMPCONFPATH "/tmp"
#define SNMPDLMODPATH "/tmp/dlmod"
第二个:
找不到相应模块出现如下错误提示:
Cannot findmodule (IP-MIB): At line 0 in (none)
Cannot findmodule (IF-MIB): At line 0 in (none)
Cannot findmodule (TCP-MIB): At line 0 in (none)
Cannot findmodule (UDP-MIB): At line 0 in (none)
Cannot findmodule (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot findmodule (SNMPv2-MIB): At line 0 in (none)
Cannot findmodule (SNMPv2-SMI): At line 0 in (none)
Cannot findmodule (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot findmodule (UCD-SNMP-MIB): At line 0 in (none)
Cannot findmodule (UCD-DEMO-MIB): At line 0 in (none)
Cannot findmodule (SNMP-TARGET-MIB): At line 0 in (none)
Cannot findmodule (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot findmodule (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot findmodule (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot findmodule (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot findmodule (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot findmodule (UCD-DLMOD-MIB): At line 0 in (none)
Cannot findmodule (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot findmodule (SNMP-MPD-MIB): At line 0 in (none)
Cannot findmodule (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot findmodule (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot findmodule (SNMPv2-TM): At line 0 in (none)
这里也有两种情况:
一个是设置好系统环境变量,这个网上都有;
第二个也是net-snmp-config.h的配置文件中的问题:
#define DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/share/snmp/mibs:/tmp/snmp/mibs"
如果不愿意设置环境变量,那么就修改这里,然后编译,再调用静态库编译新的agent就可以了,当然,如果不是移植,那更简单,只要修改这里就可以了
NOTE:
新编译的agent是否更换了静态库,上述几个修改的地方是与库有关;agent端修改net-snmp-config.h文件无效;
by stephen 2013#07#18