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 = "/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 => 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 AM Bill Fenner <fen...@gmail.com> wrote: > 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 configuring > 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 AM Pushpa Thimmaiah < > pushpa.thimma...@gmail.com> wrote: > >> Hi All, >> >> I am getting following error while starting snmpd in net-snmp-5.9. I have >> 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 >> Net-snmp-coders@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders >> >
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders