Regards to my last post about duplicates and the previous one two days ago, I
would like to add the following information.
I migrated from 5.7.3 to 5.8.dev the problem now is that every notification
sent to each trap2sink directives
sent from my Ubuntu 41.04 VM result in 64 duplicated notifications on
management station (Windows 7) no matter where
the notifications is send inside my agentx subagent.
This problem occurs also if I send a notification from snmptrap.
The traps logged below refers to the trap that the agent send when start and
shutdown (automatically) and
do not regards to my subagent code.
I explicitly disable udp6 and tcp6 (IPv6) in compilation of the 5.8.dev and
used in the snmpd.conf:
agentaddress udp:192.168.0.221:161
================================================================================
:~# /mnt/hgfs/Projects/net-snmp-5.8.dev/code/agent/snmpd -f -L -d -c
/etc/snmp/snmpd.conf
-Dmib_init,tdomain,stat,sess_process_packet,transport:send,netsnmp_udpbase,agentx,subagent
registered debug token mib_init, 1
registered debug token tdomain, 1
registered debug token stat, 1
registered debug token sess_process_packet, 1
registered debug token transport:send, 1
registered debug token netsnmp_udpbase, 1
registered debug token agentx, 1
registered debug token subagent, 1
tdomain: netsnmp_tdomain_init() called
tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } -> { iso.3.6.1.2.1.100.1.5,
"tcp" } -> { iso.3.6.1.4.1.8072.3.3.7, "alias" } -> { iso.3.6.1.2.1.100.1.13,
"unix" } -> [NIL]
agentx_register_app_config_handler: registering .conf token for "agentxsocket"
agentx_register_app_config_handler: registering .conf token for "agentxperms"
agentx_register_app_config_handler: registering .conf token for "agentxRetries"
agentx_register_app_config_handler: registering .conf token for "agentxTimeout"
mib_init: initializing: vacm_conf
mib_init: initializing: usmConf
mib_init: initializing: nsTransactionTable
mib_init: initializing: nsModuleTable
mib_init: initializing: nsDebug
mib_init: initializing: nsCache
mib_init: initializing: nsLogging
mib_init: initializing: nsVacmAccessTable
mib_init: initializing: snmp_mib
mib_init: initializing: system_mib
mib_init: initializing: sysORTable
mib_init: initializing: vacm_vars
mib_init: initializing: snmpNotifyTable
mib_init: initializing: snmpNotifyFilterProfileTable
mib_init: initializing: snmpEngine
mib_init: initializing: snmpMPDStats
mib_init: initializing: usmStats
mib_init: initializing: usmUser
mib_init: initializing: vacm_context
mib_init: initializing: snmpNotifyTable_data
mib_init: initializing: snmpNotifyFilterTable_data_storage
mib_init: initializing: snmpNotifyFilterTable
mib_init: initializing: snmpNotifyFilterTable
mib_init: initializing: snmpNotifyFilterProfileTable_data
mib_init: initializing: snmpTargetAddrEntry
mib_init: initializing: snmpTargetParamsEntry
mib_init: initializing: target_counters
mib_init: initializing: snmpTargetAddrEntry_data
mib_init: initializing: snmpTargetParamsEntry_data
tdomain: tdomain_transport_spec("snmptrap", "192.168.0.100", 0, "[NIL]",
"[NIL]", "[NIL]")
tdomain: checking for host specific config hosts/192.168.0.100
tdomain: Use application default domains "udp" "udp6"
tdomain: Found domain "udp" from specifier "udp"
tdomain: trying domain "udp" address "192.168.0.100" default address ":162"
netsnmp_udpbase: open remote UDP: [192.168.0.100]:162->[0.0.0.0]:0
tdomain: tdomain_transport_spec("snmptrap", "192.168.0.205", 0, "[NIL]",
"[NIL]", "[NIL]")
tdomain: checking for host specific config hosts/192.168.0.205
tdomain: Use application default domains "udp" "udp6"
tdomain: Found domain "udp" from specifier "udp"
tdomain: trying domain "udp" address "192.168.0.205" default address ":162"
netsnmp_udpbase: open remote UDP: [192.168.0.205]:162->[0.0.0.0]:0
Turning on AgentX master support.
agentx/config: port spec: /var/agentx/master
agentx/config: port permissions: 0660 0550 root root
agentx/config: socket permissions: 660 (432)
agentx/config: directory permissions: 550 (360)
Can't identify user (root).
agentx/config: socket owner: root (0)
Can't identify group (root).
agentx/config: socket group: root (0)
agentx/config/retries: 0
agentx/config/timeout: 3
tdomain: tdomain_transport_spec("snmp", "udp:192.168.0.221:161", 1, "[NIL]",
"[NIL]", "[NIL]")
tdomain: Found domain "udp" from specifier "udp"
tdomain: trying domain "udp" address "192.168.0.221:161" default address ":161"
netsnmp_udpbase: open local UDP: [192.168.0.221]:161->[0.0.0.0]:0
netsnmp_udpbase: set IP_PKTINFO
netsnmp_udpbase: binding socket: 5 to UDP: [0.0.0.0]:0->[192.168.0.221]:161
agentx/master: initializing...
tdomain: tdomain_transport_spec("agentx", "/var/agentx/master", 1, "[NIL]",
"[NIL]", "[NIL]")
tdomain: Address starts with '/', so assume "unix" domain
tdomain: Found domain "unix" from specifier "unix"
tdomain: trying domain "unix" address "/var/agentx/master" default address
"/var/agentx/master"
agentx/master: initializing... DONE
stats:pdu: max: 0, threshold 100 ms
sess_process_packet: sending message id#2024882094 reqid#1115195597 len 95
transport:send: 95 bytes to UDP: [192.168.0.100]:162->[0.0.0.0]:0
Sending 95 bytes to UDP: [192.168.0.100]:162->[0.0.0.0]:0
0000: 30 5D 02 01 01 04 06 73 65 63 72 65 74 A7 50 02 0].....secret.P.
0016: 04 42 78 88 CD 02 01 00 02 01 00 30 42 30 0D 06 .Bx........0B0..
0032: 08 2B 06 01 02 01 01 03 00 43 01 03 30 17 06 0A .+.......C..0...
0048: 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01 06 +...........+...
0064: 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01 01 .....0...+......
0080: 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 0A .....+.........
stats:notif: internal0 inform stats
stats:notif: 1 sends, last @ 3
stats:notif: 0 acks, last @ 0
stats:notif: 0 failed sends, last @ 0
stats:notif: 0 timeouts, last @ 0
stats:notif: 0 v3 errs, last @ 0
sess_process_packet: sending message id#2024882095 reqid#1115195598 len 95
transport:send: 95 bytes to UDP: [192.168.0.205]:162->[0.0.0.0]:0
Sending 95 bytes to UDP: [192.168.0.205]:162->[0.0.0.0]:0
0000: 30 5D 02 01 01 04 06 73 65 63 72 65 74 A7 50 02 0].....secret.P.
0016: 04 42 78 88 CE 02 01 00 02 01 00 30 42 30 0D 06 .Bx........0B0..
0032: 08 2B 06 01 02 01 01 03 00 43 01 03 30 17 06 0A .+.......C..0...
0048: 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01 06 +...........+...
0064: 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01 01 .....0...+......
0080: 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 0A .....+.........
stats:notif: internal1 inform stats
stats:notif: 1 sends, last @ 3
stats:notif: 0 acks, last @ 0
stats:notif: 0 failed sends, last @ 0
stats:notif: 0 timeouts, last @ 0
stats:notif: 0 v3 errs, last @ 0
NET-SNMP version 5.8.dev
================================================================================
In the management station that is the host 205 in the dump above, I received 64
identical packets like that
below:
Packet from: 192.168.0.221:55167 RequestID: 1718300424
Received Time: Thu Dec 28 02:29:43:984 BRST 2017
Length of SNMP DATA: 95
DATA:
30 5d 02 01 01 04 06 73 65 63 72 65 74 a7 50 02 04 66 6b 2f
08 02 01 00 02 01 00 30 42 30 0d 06 08 2b 06 01 02 01 01 03
00 43 01 03 30 17 06 0a 2b 06 01 06 03 01 01 04 01 00 06 09
2b 06 01 06 03 01 01 05 01 30 18 06 0a 2b 06 01 06 03 01 01
04 03 00 06 0a 2b 06 01 04 01 bf 08 03 02 0a
================================================================================
Ubuntu box where I’m running snmpd (master agentx) network configuration:
# ifconfig -a
ens33 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.0.221 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::aacc:72f3:56a9:853c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:751365 errors:6 dropped:6 overruns:0 frame:0
TX packets:101433 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:318182126 (318.1 MB) TX bytes:9807488 (9.8 MB)
Interrupt:19 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:300 errors:0 dropped:0 overruns:0 frame:0
TX packets:300 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27387 (27.3 KB) TX bytes:27387 (27.3 KB)
================================================================================
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-XX
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::80bf:4570:4309:e13f%10(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.205(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, December 26, 2017 4:47:15 AM
Lease Expires . . . . . . . . . . : Friday, December 29, 2017 3:15:37 AM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DHCPv6 IAID . . . . . . . . . . . : 9999999999
DHCPv6 Client DUID. . . . . . . . : 00-00-00-00-00-00-00-00-00-00-00-00-00-00
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Begin forwarded message:
From: Jose Roberto Fernandez Anahia <jrfn...@gmail.com>
Subject: Starting snmpd deliver 128 duplicate notifications to each trap2sink
destinations
Date: December 26, 2017 at 21:13:29 GMT-2
To: net-snmp-users@lists.sourceforge.net
Hello Fellows
Any help will be very appreciated, since I’m in a serious trouble with
duplicate notifications.
Having configured in the snmpd.conf two trap2sink directives …
Why when I start snmpd it sends 128 duplicated notifications to each trap2sink
configured destinations?
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.0: TimeTicks: 0 hours, 0
minutes, 0 seconds.:
.iso.org.dod.internet.snmpV2.snmpModules.1.1.4.1.0: Object ID:
.1.3.6.1.6.3.1.1.5.1:
.iso.org.dod.internet.snmpV2.snmpModules.1.1.4.3.0: Object ID:
.1.3.6.1.4.1.8072.3.2.10:
Also, when I stop the process another 128 notifications are sent.
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.0: TimeTicks: 1 hours, 24
minutes, 48 seconds.:
.iso.org.dod.internet.snmpV2.snmpModules.1.1.4.1.0: Object ID:
.1.3.6.1.4.1.8072.4.0.2:
.iso.org.dod.internet.snmpV2.snmpModules.1.1.4.3.0: Object ID:
.1.3.6.1.4.1.8072.4:
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users