Description of problem: snmptrapd doesn't seem to read snmpd.conf configuration file Version-Release number of selected component (if applicable): net-snmp-5.1.2-11 How reproducible: Every time Steps to Reproduce: 1. Add those lines to /etc/snmp/snmpd.conf (change the location of the script at will): master agentx agentxsocket localhost:705 trap2sink localhost 2. restart both snmpd and snmptrapd 3. start stracing snmptrapd: $ sudo strace -p `pidof snmptrapd` Process 24579 attached - interrupt to quit select(9, [3 5 8], NULL, NULL, {4, 615000}) = 0 (Timeout) gettimeofday({1123163216, 854889}, NULL) = 0 gettimeofday({1123163216, 855004}, NULL) = 0 gettimeofday({1123163216, 855114}, NULL) = 0 gettimeofday({1123163216, 855222}, NULL) = 0 gettimeofday({1123163216, 855331}, NULL) = 0 gettimeofday({1123163216, 855443}, NULL) = 0 gettimeofday({1123163216, 855551}, NULL) = 0 select(9, [3 5 8], NULL, NULL, {4, 965438}) = 0 (Timeout) gettimeofday({1123163221, 821069}, NULL) = 0 gettimeofday({1123163221, 821185}, NULL) = 0 gettimeofday({1123163221, 821294}, NULL) = 0 gettimeofday({1123163221, 821402}, NULL) = 0 gettimeofday({1123163221, 821510}, NULL) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 9 connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused) close(9) = 0 unlink("") = -1 ENOENT (No such file or directory) gettimeofday({1123163221, 869770}, NULL) = 0 gettimeofday({1123163221, 869904}, NULL) = 0 gettimeofday({1123163221, 870012}, NULL) = 0 select(9, [3 5 8], NULL, NULL, {5, 0} <unfinished ...> Actual results: Notice that it tries to connect to /var/agentx/master Expected results: Connect to localhost:705 Additional info: Works on the current RHEL3 net-snmp package
Ignore the mention of the script in step 1. above.
snmptrapd has never read the configuration from snmp.conf, it has different syntax. This file should be placed in /etc/snmp/snmptrapd.conf, see appropriate man page.
Why does it work properly on a stock RHEL3 install then? There's no snmptrapd.conf in a stock RHEL3: $ rpm -ql net-snmp | grep etc /etc/logrotate.d/snmpd /etc/rc.d/init.d/snmpd /etc/rc.d/init.d/snmptrapd /etc/snmp /etc/snmp/snmpd.conf
REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.
You are right, we do not supply any default snmptrapd.conf file in your packages. Upstream Net-SNMP does neither. There is man page, which should help you write your own /etc/snmp/snmptrapd.conf. I have checked RHEL3 and snmptrapd does NOT read snmpd.conf. The situation is the same like in RHEL4 - no default snmptrapd.conf is provided, you must write one by yourself.