TCP trapsink snmpd.conf causes error
"Atkins, Brian via Net-snmp-users" <[email protected]> Tue, 12 Mar 2024 18:44:59 +0000
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <DM8PR06MB771709F39B8696CC3E880E39F92B2@DM8PR06MB7717.namprd06.prod.outlook.com> |
--===============8807822506151587557==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_DM8PR06MB771709F39B8696CC3E880E39F92B2DM8PR06MB7717namp_"
--_000_DM8PR06MB771709F39B8696CC3E880E39F92B2DM8PR06MB7717namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I reported this back in 2020, but I think there was confusion caused by my =
response. Snmpd definitely throws an error if a trapsink contains a TCP tr=
ansport specifier:
# cat /etc/snmp/snmpd.conf
rocommunity public
trapsink tcp:10.224.4.161 public
# snmpd -f -Le
snmpd: netsnmp_create_notification_session:
/etc/snmp/snmpd.conf: line 3: Error: cannot create sink: tcp:10.224.4.161
net-snmp: 1 error(s) in config file(s)
NET-SNMP version 5.9
Here is some additional debugging, in case it helps:
# snmpd -f -Le -Dtdomain,snmp_sess
registered debug token tdomain, 1
registered debug token snmp_sess, 1
tdomain: netsnmp_tdomain_init() called
tdomain: domain_list -> { iso.3.6.1.6.1.9, "dtlsudp/dtls/dtlsudp6/dtls6" } =
-> { iso.3.6.1.6.1.8, "tlstcp/tls" } -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6=
/udpv6/udpipv6" } -> { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> { i=
so.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]
snmp_sess: opening transport: 0
snmp_sess: done opening transport: 20
snmp_sess_add: fd 3
tdomain: tdomain_transport_spec("snmptrap", "tcp:10.224.4.161", 0, "[NIL]",=
"[NIL]", "[NIL]")
tdomain: Found domain "tcp" from specifier "tcp"
tdomain: trying domain "tcp" address "10.224.4.161" default address ":162"
snmpd: netsnmp_create_notification_session:
/etc/snmp/snmpd.conf: line 3: Error: cannot create sink: tcp:10.224.4.161
net-snmp: 1 error(s) in config file(s)
tdomain: tdomain_transport_spec("snmp", "", 1, "[NIL]", "[NIL]", "[NIL]")
tdomain: checking for host specific config hosts/
tdomain: Use application default domains "udp" "udp6"
tdomain: Found domain "udp" from specifier "udp"
tdomain: trying domain "udp" address "" default address ":161"
snmp_sess: opening transport: 20
snmp_sess_add: fd 6
snmp_sess_add: limiting session rcv size (2147483647) to transport max (655=
07)
snmp_sess_add: limiting session snd size (2147483647) to transport max (655=
07)
NET-SNMP version 5.9
I'm using the generic Debian 11 snmpd distribution
# dpkg -l snmpd
Desired=3DUnknown/Install/Remove/Purge/Hold
| Status=3DNot/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig=
-pend
|/ Err?=3D(none)/Reinst-required (Status,Err: uppercase=3Dbad)
||/ Name Version Architecture Description
+++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
ii snmpd 5.9+dfsg-4+deb11u1 amd64 SNMP (Simple Network Man=
agement Protocol) agents
--_000_DM8PR06MB771709F39B8696CC3E880E39F92B2DM8PR06MB7717namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#467886" vlink=3D"#96607D" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">I reported this back in 2020, but I think there was =
confusion caused by my response. Snmpd definitely throws an error if =
a trapsink contains a TCP transport specifier:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"># cat /etc/snmp/snmpd.conf<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">rocommunity public<o:p></o:p></p>
<p class=3D"MsoNormal">trapsink tcp:10.224.4.161 public<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"># snmpd -f -Le<o:p></o:p></p>
<p class=3D"MsoNormal">snmpd: netsnmp_create_notification_session:<o:p></o:=
p></p>
<p class=3D"MsoNormal">/etc/snmp/snmpd.conf: line 3: Error: cannot create s=
ink: tcp:10.224.4.161<o:p></o:p></p>
<p class=3D"MsoNormal">net-snmp: 1 error(s) in config file(s)<o:p></o:p></p=
>
<p class=3D"MsoNormal">NET-SNMP version 5.9<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Here is some additional debugging, in case it helps:=
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"># snmpd -f -Le -Dtdomain,snmp_sess<o:p></o:p></p>
<p class=3D"MsoNormal">registered debug token tdomain, 1<o:p></o:p></p>
<p class=3D"MsoNormal">registered debug token snmp_sess, 1<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: netsnmp_tdomain_init() called<o:p></o:p></p=
>
<p class=3D"MsoNormal">tdomain: domain_list -> { iso.3.6.1.6.1.9, "=
dtlsudp/dtls/dtlsudp6/dtls6" } -> { iso.3.6.1.6.1.8, "tlstcp/t=
ls" } -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6/udpv6/udpipv6&quo=
t; } -> { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> =
{ 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]<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess: opening transport: 0<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess: done opening transport: 20<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess_add: fd 3<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: tdomain_transport_spec("snmptrap"=
, "tcp:10.224.4.161", 0, "[NIL]", "[NIL]", &q=
uot;[NIL]")<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: Found domain "tcp" from specifier=
"tcp"<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: trying domain "tcp" address "=
;10.224.4.161" default address ":162"<o:p></o:p></p>
<p class=3D"MsoNormal">snmpd: netsnmp_create_notification_session:<o:p></o:=
p></p>
<p class=3D"MsoNormal">/etc/snmp/snmpd.conf: line 3: Error: cannot create s=
ink: tcp:10.224.4.161<o:p></o:p></p>
<p class=3D"MsoNormal">net-snmp: 1 error(s) in config file(s)<o:p></o:p></p=
>
<p class=3D"MsoNormal">tdomain: tdomain_transport_spec("snmp", &q=
uot;", 1, "[NIL]", "[NIL]", "[NIL]")<o:p=
></o:p></p>
<p class=3D"MsoNormal">tdomain: checking for host specific config hosts/<o:=
p></o:p></p>
<p class=3D"MsoNormal">tdomain: Use application default domains "udp&q=
uot; "udp6"<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: Found domain "udp" from specifier=
"udp"<o:p></o:p></p>
<p class=3D"MsoNormal">tdomain: trying domain "udp" address "=
;" default address ":161"<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess: opening transport: 20<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess_add: fd 6<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess_add: limiting session rcv size (2147483647=
) to transport max (65507)<o:p></o:p></p>
<p class=3D"MsoNormal">snmp_sess_add: limiting session snd size (2147483647=
) to transport max (65507)<o:p></o:p></p>
<p class=3D"MsoNormal">NET-SNMP version 5.9<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">I’m using the generic Debian 11 snmpd distribu=
tion<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"># dpkg -l snmpd<o:p></o:p></p>
<p class=3D"MsoNormal">Desired=3DUnknown/Install/Remove/Purge/Hold<o:p></o:=
p></p>
<p class=3D"MsoNormal">| Status=3DNot/Inst/Conf-files/Unpacked/halF-conf/Ha=
lf-inst/trig-aWait/Trig-pend<o:p></o:p></p>
<p class=3D"MsoNormal">|/ Err?=3D(none)/Reinst-required (Status,Err: upperc=
ase=3Dbad)<o:p></o:p></p>
<p class=3D"MsoNormal">||/ Name &n=
bsp; Version &nb=
sp; Architecture Description<o:p></o:p></p>
<p class=3D"MsoNormal">+++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D<o:p></o:p></p>
<p class=3D"MsoNormal">ii snmpd &n=
bsp; 5.9+dfsg-4+deb11u1 amd64 &nbs=
p; SNMP (Simple Network Management Protocol) agents<o:p></o:p></p>
</div>
</body>
</html>
--_000_DM8PR06MB771709F39B8696CC3E880E39F92B2DM8PR06MB7717namp_--
--===============8807822506151587557==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8807822506151587557==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
--===============8807822506151587557==--