LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-28-2014, 01:08 AM   #1
khung
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Rep: Reputation: Disabled
snmpwalk "timeout: No Response from localhost:1161" using net-snmp-5.4.3


I'm new to Linux. I'm writing an SNMP extension agent using the MIB for Dummies (http://www.net-snmp.org/wiki/index.php/MIB_for_Dummies) config file (mib2c.mfd.conf). I successfully created my executable, adeSensorsTable, using my adeSensorsTable.MIB (mib2c util auto-generated the C source code from adeSensorsTable.MIB which I compiled into an executable). I then ran my executable:

./adeSensorsTable -f -L -DadeSensorsTable -M localhost:1161

I'd have a warning as I single stepped through the code:

iquerySecName has not been configured - internal queries will fail
Warning: no access control information configured.
(Config search path: /etc/snmp:/usr/share/snmp:/usr/lib/snmp:/home/ken/.snmp)
It's unlikely this agent can serve any useful purpose in this state.
Run "snmpconf -g basic_setup" to help you configure the adeSensorsTable.conf file for this agent.
[init_smux] bind failed: Permission denied

On a separate terminal I ran:
snmpwalk -v 1 -c public localhost:1161

MyOwnTable terminal would return:
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]
Connection from UDP: [127.0.0.1]:52684->[127.0.0.1]

My snmpwalk terminal would return:
Timeout: No Response from localhost:1161

I'm not sure if snmp extension agent's warning is the show stopper in this case. I'd appreciate if someone could provide some pointers to my timeout issue. Thank you in advance!

Last edited by khung; 08-28-2014 at 04:02 PM.
 
Old 09-01-2014, 08:55 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Are you sure you're interrogating the correct port? What happens if you don't specify a port?
Code:
snmpwalk -v 1 -c public localhost
What does the following return about snmp-net (if anything?
Code:
nmap localhost
Perhaps these too...
Code:
lsof -Pni | grep snmpd
Code:
lsof -i tcp:1161
 
Old 09-02-2014, 01:44 AM   #3
khung
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ferrari,

Thank you for your correspondence. If I ran "snmpwalk -v 1 -c public localhost" I'd get pages of responses back. This is just the first few lines of the responses:

SNMPv2-MIB::sysDescr.0 = STRING: Linux ken-Extensa-5620 3.2.0-67-generic #101-Ubuntu SMP Tue Jul 15 17:45:51 UTC 2014 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (21084) 0:03:30.84
SNMPv2-MIB::sysContact.0 = STRING: G. S. Marzot <gmarzot@marzot.net>
SNMPv2-MIB::sysName.0 = STRING: ken-Extensa-5620
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01

"nmap localhost" returns:

Starting Nmap 5.21 ( http://nmap.org ) at 2014-09-01 23:24 PDT

Nmap scan report for localhost (127.0.0.1)
Host is up (0.000012s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
53/tcp open domain
199/tcp open smux
631/tcp open ipp
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds

"lsof -Pni | grep snmpd" returns:

snmpd 14468 snmp 7u IPv4 607609 0t0 UDP 127.0.0.1:161

"lsof -i tcp:1161" returns nothing but

"lsof -i udp:1161" returns my snmp extension agent adeSensorsTable:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
adeSensor 15153 root 5u IPv4 623703 0t0 UDP localhost:1161

I think the name adeSensorsTable was truncated on the previous line.

I then tried to use snmpget to reach one of my extension agent objects:

snmptranslate -On xxxxx-MIB::adeSensorsTable.aDESensorsEntry.vrms
and got:

.1.3.6.1.4.1.43905.1.1.1.1.2

then I ran:

snmpget -v 1 -c public localhost:1161 .1.3.6.1.4.1.43905.1.1.1.1.2

I'd get the same response:

Connection from UDP: [127.0.0.1]:55176->[127.0.0.1]
Connection from UDP: [127.0.0.1]:55176->[127.0.0.1]
Connection from UDP: [127.0.0.1]:55176->[127.0.0.1]
Connection from UDP: [127.0.0.1]:55176->[127.0.0.1]
Connection from UDP: [127.0.0.1]:55176->[127.0.0.1]

from adeSensorsTable executable.

I'm stumped here!
 
Old 09-02-2014, 03:34 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I confess I'm way over my head on this, and while I have a basic understanding of SNMP, I don't really understand what you're trying to do here. In any case, the error you first reported regarding 'iquerySecName' (and maybe other config issues too) need to be addressed first. Therefore I'm going to point you at the snmpd.conf manpage.

http://www.net-snmp.org/docs/man/snmpd.conf.html

Enjoy!
 
Old 09-02-2014, 11:54 AM   #5
khung
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ferrari, the SNMP commands I ran was just try to validate that the connectivity wasn't there. You can ignore that. I agree with you that resolving the iquerySecName is the main issue. I've looked the man page before and there was not much of an explanation what is iquerySecName and how to use it. I don't understand how to construct this iquerySecName properly. Any help is appreciated!
 
Old 09-02-2014, 03:06 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Well, I've never had to configure snmpd.conf before, but from what I can gleam from a bit of googling, iquerySecName is used to specify the username for internal SNMP queries, and this name must first be explicitly defined with createUser first. Any access rights are defined by rouser.
Code:
createUser <internalname> MD5 "internal monitor"
iquerySecName <internalname>
rouser _internal noauth>
Maybe if you look at some sample snmpd.conf files (a few I've linked to below), it will help to get an idea on producing a working configuration

http://serverfault.com/questions/248...for-disk-usage
http://dev.miteric.com/2008/12/net-s...-settings.html
http://www.adventuresinoss.com/?p=1220
http://blog.tersmitten.nl/how-to-get...ntu-12-04.html

That's the best that I can do.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMPWALK : Timeout: No Response from localhost Manivasagam Linux - Server 2 08-19-2014 11:25 AM
Gentoo - addition of "ucd-snmp/diskio" module to Net-SNMP ursusca Linux - Server 2 08-03-2012 02:59 AM
Using net-snmp: Timeout, no response from host Treikayan Linux - Software 1 03-18-2009 03:38 PM
snmpwalk Timeout: No Response from host thedonkdonk Linux - Software 1 11-27-2007 03:49 PM
NET-SNMP version 5.1.2 / Timeout: No Response from <server> The00Dustin Linux - Software 2 03-07-2006 05:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration