Ok, I cleaned stuff up a bit and reconfigured everything from scratch. I am
now able to get the snmpd master agent and subagent running on our hardware
box. Does the following "netstat" output seem reasonable?
Here is "netstat -an" output after starting the master agent on port 705 only:
# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 138 10.0.0.2:23 10.0.0.3:3210 ESTABLISHED
udp 0 0 0.0.0.0:1024 0.0.0.0:*
udp 0 0 0.0.0.0:800 0.0.0.0:*
udp 0 0 0.0.0.0:161 0.0.0.0:*
udp 0 0 167.81.249.56:5555 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 5 [ ] DGRAM 39 /var/dev/log
unix 2 [ ACC ] STREAM LISTENING 111
/tmp/xfs_fragtask_mnt_gpfs_ew_media_content_recorded
unix 2 [ ] DGRAM 126
/tmp/inm_unix_sock_worker
unix 2 [ ] DGRAM 128 /tmp/inm_unix_sock_main
unix 2 [ ACC ] STREAM LISTENING 6490 localhost:705
unix 3 [ ] STREAM CONNECTED 113
/tmp/xfs_fragtask_mnt_gpfs_ew_media_content_recorded
unix 3 [ ] STREAM CONNECTED 117
unix 2 [ ] DGRAM 115
unix 2 [ ] DGRAM 109
unix 2 [ ] DGRAM 43
Here is "netstat -an" output after starting the master and subagent on port 705:
# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 138 10.0.0.2:23 10.0.0.3:3210 ESTABLISHED
udp 0 0 0.0.0.0:1024 0.0.0.0:*
udp 0 0 0.0.0.0:800 0.0.0.0:*
udp 0 0 0.0.0.0:161 0.0.0.0:*
udp 0 0 167.81.249.56:5555 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 5 [ ] DGRAM 39 /var/dev/log
unix 2 [ ACC ] STREAM LISTENING 111
/tmp/xfs_fragtask_mnt_gpfs_ew_media_content_recorded
unix 2 [ ] DGRAM 126
/tmp/inm_unix_sock_worker
unix 2 [ ] DGRAM 128 /tmp/inm_unix_sock_main
unix 2 [ ACC ] STREAM LISTENING 6490 localhost:705
unix 3 [ ] STREAM CONNECTED 11289 localhost:705
unix 3 [ ] STREAM CONNECTED 11288
unix 3 [ ] STREAM CONNECTED 113
/tmp/xfs_fragtask_mnt_gpfs_ew_media_content_recorded
unix 3 [ ] STREAM CONNECTED 117
unix 2 [ ] DGRAM 115
unix 2 [ ] DGRAM 109
unix 2 [ ] DGRAM 43
Now I decided to Telnet into our hardware box to perform some SNMP queries.
I executed the following master agent SNMP commands successfully:
/usr/local/bin/snmptranslate .1.3.6.1.2.1.1.3.0
/usr/local/bin/snmptranslate .1.3.6.1.2.1.1.3
/usr/local/bin/snmptranslate -On SNMPv2-MIB::sysUpTime.0
When I tried to issue some subagent-specific SNMP requests I got errors:
1) /usr/local/bin/snmpwalk -v1 -c mycommunity_ro ocStbHostAVInterfaceTable
getaddrinfo: ocStbHostAVInterfaceTable Name or service not known
snmpwalk: Unknown host (ocStbHostAVInterfaceTable) (No such file or
directory)
2) /usr/local/bin/snmpget -v 1 -c mycommunity_ro localhost
ocStbHostAVInterfaceType.1
getaddrinfo: localhost Name or service not known
snmpget: Unknown host (localhost) (No such file or directory)
3) /usr/local/bin/snmpget -v 1 -c mycommunity_ro localhost:705
ocStbHostAVInterfaceType.1
getaddrinfo: localhost Name or service not known
snmpget: Unknown host (localhost:705) (No such file or directory)
Any ideas why my subagent can not process these SNMP requests?
My snmpd.conf file contents are:
master agentx
agentxsocket localhost:705
rocommunity mycommunity_ro
My snmp.conf file contents are:
mibdirs +/usr/local/share/snmp/mibs
mibs +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
Dave Shield <[EMAIL PROTECTED]> wrote: Date: Mon, 16 Jul 2007 17:13:40 +0100
From: "Dave Shield" <[EMAIL PROTECTED]>
To: "Need Help" <[EMAIL PROTECTED]>
Subject: Re: Starting Subagent on our hardware box causes MIB errors
CC: [email protected]
On 16/07/07, Need Help wrote:
> Originally I did not instruct the master agent and subagent to use any
> specific port and the subagent could not connect to the master agent. I
> then decided to make the following changes to indicate the master agent and
> subagent should use port 705:
>
>
> Updated the "snmpd.conf" file to include:
>
> master agentx
> agentxsocket localhost:705
> rocommunity mycommunity_ro
And does the master agent open this socket?
If you run "netstat -an" (or equivalent) on the box,
can you see anything listening on port 705?
Dave
---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news,
photos & more. -------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders