Re: snmpd failed to start when agentx is enabled
Pushpa Thimmaiah <[email protected]> Thu, 3 Oct 2024 17:09:23 +0530
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAASqVJXvonpKUpVZf1Q84nXRazPrT36YPY7HnSUZMFF6tF9q-w@mail.gmail.com> |
--===============4785316807254527314==
Content-Type: multipart/alternative; boundary="0000000000001bec12062390e14c"
--0000000000001bec12062390e14c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi Bill Fenner,
Thank you. I enabled Unix transport and added 'agentXSocket
/var/agentx/master' in /etc/snmp/snmpd.conf, and I was able to execute
snmpd. There was no /var/agentx/master created after starting snmpd, and
AgentX was unable to connect to snmpd.
I am following the AgentX tutorial at
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/. Kindly guide.
*example_daemon log*
tdomain: Found domain "unix" from specifier "unix"
trace: netsnmp_lookup_default_target(): snmp_service.c, 413:
defaults: netsnmp_lookup_default_target("agentx", "unix") ->
"/var/agentx/master"
trace: netsnmp_tdomain_transport_tspec(): snmp_transport.c, 794:
tdomain: trying domain "unix" address "[NIL]" default address
"/var/agentx/master"
trace: netsnmp_unix_transport(): transports/snmpUnixDomain.c, 322:
netsnmp_unix: open remote Local IPC: /var/agentx/master
trace: netsnmp_unix_transport(): transports/snmpUnixDomain.c, 432:
netsnmp_unix_transport: *couldn't connect to "/var/agentx/master"*, errno 2
(No such file or directory)
*Snmpd.log*
trace: read_config(): read_config.c, 843:
9:read_config:line: /etc/snmp/snmpd.conf:214 examining: agentXSocket
/var/agentx/master
trace: read_config(): read_config.c, 971:
read_config:line: /etc/snmp/snmpd.conf:214 examining: agentXSocket
/var/agentx/master
trace: run_config_handler(): read_config.c, 536:
read_config:parser: Found a parser. Calling it: agentXSocket /
/var/agentx/master
trace: agentx_parse_agentx_socket(): mibgroup/agentx/agentx_config.c, 34:
agentx/config: port spec: /var/agentx/master
trace: netsnmp_ds_set_string(): default_store.c, 285:
*netsnmp_ds_set_string: Setting APP:1 =3D "/var/agentx/master"*
trace: read_config(): read_config.c, 843:
*Details:-*
Both snmpd , agentx example 'example-daemon' and folder /var/agentx has
same permission
root@SyncServer:/var/log# ls -la /var/agentx
total 8
drwxr-xr-x 2 root root 4096 Oct 2 11:46 .
drwxr-xr-x 13 root root 4096 Oct 2 11:46 ..
root@SyncServer:/var/log# ls -la /usr/sbin/snmpd
-rwxr-xr-x 1 root root 64488 Oct 2 09:59 /usr/sbin/snmpd
root@SyncServer:/var/log# ls -la /tmp/example-demon
-rwxr-xr-x 1 root root 37664 Oct 2 09:52 /tmp/example-demon
*net-snmp-5.9 config summary*
SNMP Versions Supported: 1 2c 3
Building for: linux
Net-SNMP Version: 5.9
Network transport support: Unix Alias UDP UDPIPv6 Callback UDPIPv4Base
UDPBase IPv4Base IPBase SocketBase IPv6Base
SNMPv3 Security Modules: usm
Agent MIB code: clock default_modules gnss host mibII
notification ntpSystem snmpv3mibs system target utilities =3D> snmpv3mibs
mibII notification notification-log-mib target* agentx* disman/event
disman/schedule utilities host host/hrh_storage host/hrh_filesys
host/hrSWInstalledTable host/hrSWRunTable host/hr_system host/hr_device
host/hr_other host/hr_proc host/hr_network host/hr_print host/hr_disk
host/hr_partition mibII/system_mib mibII/sysORTable mibII/snmp_mib
mibII/vacm_vars mibII/setSerialNo mibII/at mibII/ifTable mibII/ip mibII/tcp
mibII/udp mibII/ipv6 mibII/icmp if-mib ip-mib ip-forward-mib tcp-mib
udp-mib notification/snmpNotifyTable
snmp-notification-mib/snmpNotifyFilterTable
notification/snmpNotifyFilterProfileTable ntpSystem/ntpSystem
snmpv3/snmpEngine snmpv3/snmpMPDStats snmpv3/usmStats snmpv3/usmConf
snmpv3/usmUser system/system target/snmpTargetAddrEntry
target/snmpTargetParamsEntry target/target target/target_counters
utilities/override utilities/execute utilities/iquery
MYSQL Trap Logging: unavailable
Embedded Perl support: disabled
SNMP Perl modules: disabled
SNMP Python modules: disabled
Crypto support from: crypto
Authentication support: MD5 SHA1 SHA224 SHA256 SHA384 SHA512
Encryption support: DES AES AES128 AES192 AES192C AES256 AES256C
Local DNSSEC validation: disabled
Thanks,
Pushpa.T
On Fri, Sep 27, 2024 at 12:14=E2=80=AFAM Bill Fenner <[email protected]> wro=
te:
> Hi Pushpa,
>
> You are not enabling UNIX domain support, so net-snmp can't open the UNIX
> domain socket for agentx. You can either use the TCP socket by configurin=
g
> with something like
>
> agentXSocket tcp:127.0.0.1:705
>
> and then configuring clients similarly, e.g., "snmptrap -X tcp:705"
>
> Or adding the UNIX domain transport, e.g., add "Unix" to your
> "--with-transports" configure argument.
>
> Bill
>
>
> On Thu, Sep 26, 2024 at 9:20=E2=80=AFAM Pushpa Thimmaiah <
> [email protected]> wrote:
>
>> Hi All,
>>
>> I am getting following error while starting snmpd in net-snmp-5.9. I hav=
e
>> enabled agentx and compiled the source. Kindly guide me to resolve the
>> same.
>> I have created directory /var/agentx
>> ---------------
>>
>> agentx/master: initializing...
>> trace: netsnmp_tdomain_transport_tspec(): snmp_transport.c, 655:
>> tdomain: tdomain_transport_spec("agentx", "/var/agentx/master", 1,
>> "[NIL]", "[NIL]", "[NIL]")
>> trace: netsnmp_tdomain_transport_tspec(): snmp_transport.c, 736:
>> tdomain: Address starts with '/', so assume "unix" domain
>> trace: find_tdomain(): snmp_transport.c, 610:
>> tdomain: Found no domain from specifier "unix"
>> No support for any checked transport domain
>> Error: Couldn't open a master agentx socket to listen on
>> (/var/agentx/master):
>> ---------------------------------------------------
>>
>>
>> Thanks,
>> Pushpa.T
>> _______________________________________________
>> Net-snmp-coders mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>>
>
--0000000000001bec12062390e14c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi Bill Fenner,</div><div><br></div><div>Thank you. I=
enabled Unix transport and added 'agentXSocket=20
/var/agentx/master' in /etc/snmp/snmpd.conf, and I was able to execute=
=20
snmpd. There was no
/var/agentx/master created after starting snmpd, and AgentX was unable=20
to connect to snmpd.</div><div> I am following the AgentX tutorial at=20
<a href=3D"http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/">http=
://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/</a>. Kindly guide.<b=
r></div><div><br></div><div><b>example_daemon log</b></div><div><b><br></b>=
</div><div>tdomain: Found domain "unix" from specifier "unix=
"<br>trace: netsnmp_lookup_default_target(): snmp_service.c, 413:<br>d=
efaults: netsnmp_lookup_default_target("agentx", "unix"=
) -> "/var/agentx/master"<br>trace: netsnmp_tdomain_transport_=
tspec(): snmp_transport.c, 794:<br>tdomain: trying domain "unix" =
address "[NIL]" default address "/var/agentx/master"<br=
>trace: netsnmp_unix_transport(): transports/snmpUnixDomain.c, 322:<br>nets=
nmp_unix: open remote Local IPC: /var/agentx/master<br>trace: netsnmp_unix_=
transport(): transports/snmpUnixDomain.c, 432:<br>netsnmp_unix_transport: <=
i>couldn't connect to "/var/agentx/master"</i>, errno 2 (No s=
uch file or directory)<br></div><div><b><br></b></div><div><b>Snmpd.log</b>=
<br>trace: read_config(): read_config.c, 843:<br>9:read_config:line: /etc/s=
nmp/snmpd.conf:214 examining: agentXSocket /var/agentx/master<br>trace: rea=
d_config(): read_config.c, 971:<br>read_config:line: /etc/snmp/snmpd.conf:2=
14 examining: agentXSocket /var/agentx/master<br>trace: run_config_handler(=
): read_config.c, 536:<br>read_config:parser: Found a parser.=C2=A0 Calling=
it: agentXSocket / /var/agentx/master<br>trace: agentx_parse_agentx_socket=
(): mibgroup/agentx/agentx_config.c, 34:<br>agentx/config: port spec: /var/=
agentx/master<br>trace: netsnmp_ds_set_string(): default_store.c, 285:<br><=
b>netsnmp_ds_set_string: Setting APP:1 =3D "/var/agentx/master"</=
b><br>trace: read_config(): read_config.c, 843:</div><div><br></div><div><b=
r></div><div><b>Details:-</b><br></div><div><br></div><div>Both snmpd , age=
ntx example 'example-daemon'=C2=A0 and folder /var/agentx=C2=A0 has=
same permission <br></div><div>root@SyncServer:/var/log# ls -la /var/agent=
x<br>total 8<br>drwxr-xr-x =C2=A02 root root 4096 Oct =C2=A02 11:46 .<br>dr=
wxr-xr-x 13 root root 4096 Oct =C2=A02 11:46 ..<br>root@SyncServer:/var/log=
# ls -la /usr/sbin/snmpd<br>-rwxr-xr-x 1 root root 64488 Oct =C2=A02 09:59 =
/usr/sbin/snmpd<br>root@SyncServer:/var/log# ls -la /tmp/example-demon <br>=
-rwxr-xr-x 1 root root 37664 Oct =C2=A02 09:52 /tmp/example-demon</div><div=
><br></div><div><br></div><div><b>net-snmp-5.9 config summary</b></div><div=
><b><br></b></div><div>=C2=A0SNMP Versions Supported: =C2=A0 =C2=A01 2c 3<b=
r>=C2=A0 Building for: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lin=
ux<br>=C2=A0 Net-SNMP Version: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.9<br>=
=C2=A0 Network transport support: =C2=A0Unix Alias UDP UDPIPv6 Callback UDP=
IPv4Base UDPBase IPv4Base IPBase SocketBase IPv6Base<br>=C2=A0 SNMPv3 Secur=
ity Modules: =C2=A0 =C2=A0 usm<br>=C2=A0 Agent MIB code: =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0clock default_modules gnss host mibII notification =
ntpSystem snmpv3mibs system target utilities =3D> =C2=A0snmpv3mibs mibII=
notification notification-log-mib target<b> agentx</b> disman/event disman=
/schedule utilities host host/hrh_storage host/hrh_filesys host/hrSWInstall=
edTable host/hrSWRunTable host/hr_system host/hr_device host/hr_other host/=
hr_proc host/hr_network host/hr_print host/hr_disk host/hr_partition mibII/=
system_mib mibII/sysORTable mibII/snmp_mib mibII/vacm_vars mibII/setSerialN=
o mibII/at mibII/ifTable mibII/ip mibII/tcp mibII/udp mibII/ipv6 mibII/icmp=
if-mib ip-mib ip-forward-mib tcp-mib udp-mib notification/snmpNotifyTable =
snmp-notification-mib/snmpNotifyFilterTable notification/snmpNotifyFilterPr=
ofileTable ntpSystem/ntpSystem snmpv3/snmpEngine snmpv3/snmpMPDStats snmpv3=
/usmStats snmpv3/usmConf snmpv3/usmUser system/system target/snmpTargetAddr=
Entry target/snmpTargetParamsEntry target/target target/target_counters uti=
lities/override utilities/execute utilities/iquery<br>=C2=A0 MYSQL Trap Log=
ging: =C2=A0 =C2=A0 =C2=A0 =C2=A0 unavailable<br>=C2=A0 Embedded Perl suppo=
rt: =C2=A0 =C2=A0 =C2=A0disabled<br>=C2=A0 SNMP Perl modules: =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0disabled<br>=C2=A0 SNMP Python modules: =C2=A0 =C2=A0 =
=C2=A0 =C2=A0disabled<br>=C2=A0 Crypto support from: =C2=A0 =C2=A0 =C2=A0 =
=C2=A0crypto<br>=C2=A0 Authentication support: =C2=A0 =C2=A0 MD5 SHA1 SHA22=
4 SHA256 SHA384 SHA512<br>=C2=A0 Encryption support: =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 DES AES AES128 AES192 AES192C AES256 AES256C<br>=C2=A0 Local DNSSEC =
validation: =C2=A0 =C2=A0disabled</div><div><br></div><div>Thanks,</div><di=
v>Pushpa.T<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Fri, Sep 27, 2024 at 12:14=E2=80=AFAM Bill Fenner &l=
t;<a href=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor=
der-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi P=
ushpa,<div><br></div><div>You are not enabling UNIX domain support, so net-=
snmp can't open the UNIX domain socket for agentx. You can either use t=
he TCP socket by configuring with something like</div><div><br></div><div>a=
gentXSocket tcp:<a href=3D"http://127.0.0.1:705" target=3D"_blank">127.0.0.=
1:705</a></div><div><br></div><div>and then configuring clients similarly, =
e.g., "snmptrap -X tcp:705"</div><div><br></div><div>Or adding th=
e UNIX domain transport, e.g., add "Unix" to your "--with-tr=
ansports" configure argument.</div><div><br></div><div>=C2=A0 Bill</di=
v><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
s=3D"gmail_attr">On Thu, Sep 26, 2024 at 9:20=E2=80=AFAM Pushpa Thimmaiah &=
lt;<a href=3D"mailto:[email protected]" target=3D"_blank">pushpa.t=
[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex"><div dir=3D"ltr"><div>Hi All,</div><div><br></div><div>I =
am getting following error while starting snmpd in net-snmp-5.9. I have ena=
bled=C2=A0 agentx and compiled the source. Kindly guide me to resolve the s=
ame.</div><div>I have created directory /var/agentx <br></div><div>--------=
-------</div><div><br>agentx/master: initializing...<br>trace: netsnmp_tdom=
ain_transport_tspec(): snmp_transport.c, 655:<br>tdomain: tdomain_transport=
_spec("agentx", "/var/agentx/master", 1, "[NIL]&qu=
ot;, "[NIL]", "[NIL]")<br>trace: netsnmp_tdomain_transp=
ort_tspec(): snmp_transport.c, 736:<br>tdomain: Address starts with '/&=
#39;, so assume "unix" domain<br>trace: find_tdomain(): snmp_tran=
sport.c, 610:<br>tdomain: Found no domain from specifier "unix"<b=
r>No support for any checked transport domain<br>Error: Couldn't open a=
master agentx socket to listen on (/var/agentx/master): <br></div><div>---=
------------------------------------------------</div><div><br></div><div><=
br></div><div>Thanks,</div><div>Pushpa.T<br></div></div>
_______________________________________________<br>
Net-snmp-coders mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/net-snmp-coders" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/list=
info/net-snmp-coders</a><br>
</blockquote></div>
</blockquote></div>
--0000000000001bec12062390e14c--
--===============4785316807254527314==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4785316807254527314==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--===============4785316807254527314==--