Discussion:
Timeout: No Response from localhost.
S***@emc.com
2007-12-21 18:01:01 UTC
Permalink
Hi,

I was wondering if someone could take a quick look at my conf file below
and see why when I do the following:

/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0

I get the following error message:

Timeout: No Response from localhost.

This is assuming of course that startup of 'snmpd' master agent is
successful (I tried the patch to get rid of the first three messages and
it didn't work but apparently it the agent is running noneless).

# snmpd -f -Le
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
Turning on AgentX master support.
NET-SNMP version 5.4.1


Thank you again for your response,
Randy


########################################################################
###
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
########################################################################
###
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will
make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation Cambridge

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact "contact administrator"

########################################################################
###
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]

rwuser auth

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rouser

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity whatever

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity private



########################################################################
###
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
# arguments: host [community] [portnum]

#trapsink 10.4.5.178 public

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink 168.159.121.153 public

# informsink: A SNMPv2c inform (acknowledged trap) receiver
# arguments: host [community] [portnum]

#informsink 10.4.10.94 public 162

# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity public

# authtrapenable: Should we send traps when authentication failures
occur
# arguments: 1 | 2 (1 = yes, 2 = no)

authtrapenable 2
Dave Shield
2007-12-21 18:24:48 UTC
Permalink
Post by S***@emc.com
I was wondering if someone could take a quick look at my conf file below
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUpTime.0
Timeout: No Response from localhost.
The two thing to check are:
a) whether the agent is actually reading this config file,
and
b) whether it is receiving the request


Try starting the agent using

snmpd -f -Le -Dread-config -d


It should generate some debugging output relating to
the config file. Can you see the expected content?
If not, check the location(s) that it's reading from.

If that looks correct, then try issuing the snmpget command
Do you see a raw packet dump of the incoming request?

If not, then there may be some firewall-style filtering
going on (e.g. iptables or similar).

Dave
Kuczynski, Edward
2007-12-21 20:00:53 UTC
Permalink
We ran into a problem having both readonly and r/w in the conf file for v2.
It wouldn't hurt to comment out the r/w and try again.

Just a thought.
Ed

-----Original Message-----
From: net-snmp-users-***@lists.sourceforge.net [mailto:net-snmp-users-***@lists.sourceforge.net] On Behalf Of ***@emc.com
Sent: Friday, December 21, 2007 1:01 PM
To: net-snmp-***@lists.sourceforge.net
Subject: Timeout: No Response from localhost.

Hi,

I was wondering if someone could take a quick look at my conf file below
and see why when I do the following:

/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0

I get the following error message:

Timeout: No Response from localhost.

This is assuming of course that startup of 'snmpd' master agent is
successful (I tried the patch to get rid of the first three messages and
it didn't work but apparently it the agent is running noneless).

# snmpd -f -Le
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
Turning on AgentX master support.
NET-SNMP version 5.4.1


Thank you again for your response,
Randy


########################################################################
###
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
########################################################################
###
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will
make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation Cambridge

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact "contact administrator"

########################################################################
###
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]

rwuser auth

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rouser

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity whatever

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity private



########################################################################
###
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
# arguments: host [community] [portnum]

#trapsink 10.4.5.178 public

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink 168.159.121.153 public

# informsink: A SNMPv2c inform (acknowledged trap) receiver
# arguments: host [community] [portnum]

#informsink 10.4.10.94 public 162

# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity public

# authtrapenable: Should we send traps when authentication failures
occur
# arguments: 1 | 2 (1 = yes, 2 = no)

authtrapenable 2


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Dave Shield
2007-12-21 20:41:34 UTC
Permalink
Post by Kuczynski, Edward
We ran into a problem having both readonly and r/w in the conf file for v2.
It wouldn't hurt to comment out the r/w and try again.
Would you care to expand on the problem you were seeing?

The usual issue with rw/ro clashes is when you have the
same community (or SNMPv3 user) for both ro and rw.
In that situation, it tends to be SET requests that fail
(when the read-only configuration is applied first).

I've never come across a situation where having both
rw and ro settings would block GET requests.

Dave
S***@emc.com
2007-12-21 21:03:32 UTC
Permalink
Thanks Ed/Dave
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine. Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.

To summarize: When I use the snmpd.conf file that I generate on my
system (which follows below), snmpget -c .... works.
When I use snmpd.conf that my coworker generated on AIX (pasted wayy
down below in the original email), snmpget -c ... timeout.
Dave, the debug info. is pasted below when issuing snmpget -f -Le
-Dread_config -d using the snmpd.conf file my coworker generated below.


My goal is to use my coworkers snmpd.conf file ultimately (the
snmpd.conf pasted wayy below in the original email). I just don't know
why it's not responding to the snmpget -c ....

Does this help? Thanks again for your response.

========================= Good snmpd.conf file - snmpget works with this
============================================

########################################################################
###
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
########################################################################
###
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will
make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation Cambridge,MA

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
"snmpd.conf.mine" 93 lines, 2470 characters
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact "Randy 5-1901"



########################################################################
###
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]

rwuser randy

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]
rouser rouser .1.3.6.1.4.1.1139

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity public .1.3.6.1.2.1.1

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity private 127.0.0.1



########################################################################
###
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink lca1099
# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity public

# authtrapenable: Should we send traps when authentication failures
occur
# arguments: 1 | 2 (1 = yes, 2 = no)

authtrapenable 2

===================================== Output from 'snmpd -f -Le
-Dread_config using snmpd.conf devised by my coworker using snmpconf
===============================================



read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:44 examining:
rwuser
auth
read_config: Found a parser. Calling it: rwuser / auth
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:54 examining:
rocommu
nity whatever
read_config: Found a parser. Calling it: rocommunity / whatever
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:59 examining:
rwcommu
nity private
read_config: Found a parser. Calling it: rwcommunity / private
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:76 examining:
trap2si
nk 168.159.121.153 public
read_config: Found a parser. Calling it: trap2sink / 168.159.121.153
public
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:86 examining:
trapcom
munity public
read_config: Found a parser. Calling it: trapcommunity / public
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:91 examining:
authtra
penable 2
read_config: Found a parser. Calling it: authtrapenable / 2
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:116
examining: agenta
ddress 1161
read_config: Found a parser. Calling it: agentaddress / 1161
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:123
examining: com2se
c notConfigUser default public
read_config: Found a parser. Calling it: com2sec / notConfigUser
default
public
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:44 examining:
rwuser
auth
read_config: Found a parser. Calling it: rwuser / auth
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:54 examining:
rocommu
nity whatever
read_config: Found a parser. Calling it: rocommunity / whatever
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:59 examining:
rwcommu
nity private
read_config: Found a parser. Calling it: rwcommunity / private
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:76 examining:
trap2si
nk 168.159.121.153 public
read_config: Found a parser. Calling it: trap2sink / 168.159.121.153
public
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:86 examining:
trapcom
munity public
read_config: Found a parser. Calling it: trapcommunity / public
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:91 examining:
authtra
penable 2
read_config: Found a parser. Calling it: authtrapenable / 2
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:116
examining: agenta
ddress 1161
read_config: Found a parser. Calling it: agentaddress / 1161
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:123
examining: com2se
c notConfigUser default public
read_config: Found a parser. Calling it: com2sec / notConfigUser
default
public
group1 "" any noAuthNoPriv exact allview none none
read_config: Found a parser. Calling it: access / group1 "" any
noAu
thNoPriv exact allview none none
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:131
examining: access
notConfigGroup "" any auth exact allview none none
read_config: Found a parser. Calling it: access / notConfigGroup ""
any
auth exact allview none none
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:143
examining: master
agentx
read_config: Found a parser. Calling it: master / agentx
Turning on AgentX master support.
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.conf:147
examining: agentX
Socket udp:localhost:705
read_config: Found a parser. Calling it: agentXSocket /
udp:localhost:705
read_config: /opt/emc/dist/local/usr/share/snmp/snmpd.local.conf: No
such file o
r directory
read_config: config dir: /opt/emc/dist/local/usr/lib/snmp
read_config: Directory not present: /opt/emc/dist/local/usr/lib/snmp
read_config: config dir: //.snmp
read_config: Directory not present: //.snmp
read_config: config path used for snmpd:/var/net-snmp (persistent
path:/var/net
-snmp)
read_config: config dir: /var/net-snmp
read_config: Reading configuration /var/net-snmp/snmpd.conf
read_config: /var/net-snmp/snmpd.conf:32 examining: usmUser 1 3
0x80001f88801bea
6feb47261304 0x414e65774461793500 0x414e65774461793500 NULL
.1.3.6.1.6.3.10.1.1.
2 0x5069c825448c5b6bd4281aaf3ce2ddb5 .1.3.6.1.6.3.10.1.2.2
0x5069c825448c5b6bd42
81aaf3ce2ddb5 0x00
read_config: Found a parser. Calling it: usmUser / 1 3
0x80001f88801bea6feb4726
1304 0x414e65774461793500 0x414e65774461793500 NULL
.1.3.6.1.6.3.10.1.1.2 0x5069
c825448c5b6bd4281aaf3ce2ddb5 .1.3.6.1.6.3.10.1.2.2
0x5069c825448c5b6bd4281aaf3ce
2ddb5 0x00
read_config: /var/net-snmp/snmpd.conf:33 examining: setserialno
764030627
read_config: Found a parser. Calling it: setserialno / 764030627
read_config: /var/net-snmp/snmpd.conf:41 examining: engineBoots 80
read_config: Found a parser. Calling it: engineBoots / 80
read_config: /var/net-snmp/snmpd.conf:42 examining: oldEngineID
0x80001f88801bea
6feb47261304
read_config: /var/net-snmp/snmpd.local.conf: No such file or directory
read_config: config path used for
agentx:/opt/emc/dist/local/usr/etc/snmp:/opt/
emc/dist/local/usr/share/snmp:/opt/emc/dist/local/usr/lib/snmp://.snmp
(persiste
nt path:/var/net-snmp)
read_config: config dir: /opt/emc/dist/local/usr/etc/snmp
read_config: Directory not present: /opt/emc/dist/local/usr/etc/snmp
read_config: config dir: /opt/emc/dist/local/usr/share/snmp
read_config: /opt/emc/dist/local/usr/share/snmp/agentx.conf: No such
file or dir
ectory
read_config: /opt/emc/dist/local/usr/share/snmp/agentx.local.conf: No
such file
or directory
read_config: config dir: /opt/emc/dist/local/usr/lib/snmp
read_config: Directory not present: /opt/emc/dist/local/usr/lib/snmp
read_config: config dir: //.snmp
read_config: Directory not present: //.snmp
read_config: config path used for agentx:/var/net-snmp (persistent
path:/var/ne
t-snmp)
read_config: config dir: /var/net-snmp
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config: config path used for
snmp:/opt/emc/dist/local/usr/etc/snmp:/opt/em
c/dist/local/usr/share/snmp:/opt/emc/dist/local/usr/lib/snmp://.snmp
(persistent
path:/var/net-snmp)
read_config: config dir: /opt/emc/dist/local/usr/etc/snmp
read_config: Directory not present: /opt/emc/dist/local/usr/etc/snmp
read_config: config dir: /opt/emc/dist/local/usr/share/snmp
read_config: /opt/emc/dist/local/usr/share/snmp/snmp.conf: No such file
or direc
tory
read_config: /opt/emc/dist/local/usr/share/snmp/snmp.local.conf: No such
file or
directory
read_config: config dir: /opt/emc/dist/local/usr/lib/snmp
read_config: Directory not present: /opt/emc/dist/local/usr/lib/snmp
read_config: config dir: //.snmp
read_config: Directory not present: //.snmp
read_config: config path used for snmp:/var/net-snmp (persistent
path:/var/net-
snmp)
read_config: config path used for snmp:/var/net-snmp (persistent
path:/var/net-
snmp)
read_config: config dir: /var/net-snmp
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory
read_config: storing: #
# net-snmp (or ucd-snmp) persistent data file.
#
########################################################################
####
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
# **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
########################################################################
####
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in
SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd
administrators.
# (Did I mention: do not edit this file?)
#



-----Original Message-----
From: Kuczynski, Edward [mailto:***@ll.mit.edu]
Sent: Friday, December 21, 2007 3:01 PM
To: Smith, Randy; net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

We ran into a problem having both readonly and r/w in the conf file for
v2.
It wouldn't hurt to comment out the r/w and try again.

Just a thought.
Ed

-----Original Message-----
From: net-snmp-users-***@lists.sourceforge.net
[mailto:net-snmp-users-***@lists.sourceforge.net] On Behalf Of
***@emc.com
Sent: Friday, December 21, 2007 1:01 PM
To: net-snmp-***@lists.sourceforge.net
Subject: Timeout: No Response from localhost.

Hi,

I was wondering if someone could take a quick look at my conf file below
and see why when I do the following:

/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0

I get the following error message:

Timeout: No Response from localhost.

This is assuming of course that startup of 'snmpd' master agent is
successful (I tried the patch to get rid of the first three messages and
it didn't work but apparently it the agent is running noneless).

# snmpd -f -Le
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
Turning on AgentX master support.
NET-SNMP version 5.4.1


Thank you again for your response,
Randy


########################################################################
###
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
########################################################################
###
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will
make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation Cambridge

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact "contact administrator"

########################################################################
###
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]

rwuser auth

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rouser

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity whatever

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity private



########################################################################
###
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
# arguments: host [community] [portnum]

#trapsink 10.4.5.178 public

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink 168.159.121.153 public

# informsink: A SNMPv2c inform (acknowledged trap) receiver
# arguments: host [community] [portnum]

#informsink 10.4.10.94 public 162

# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity public

# authtrapenable: Should we send traps when authentication failures
occur
# arguments: 1 | 2 (1 = yes, 2 = no)

authtrapenable 2


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Dave Shield
2007-12-21 21:15:31 UTC
Permalink
Post by S***@emc.com
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine.
Using which community? "public" or "private"?

Because I wouldn't expect the entry
rocommunity public .1.3.6.1.2.1.1
to work (since it's missing the network source field, which
should come before the OID)
Post by S***@emc.com
Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.
Hmmm....
That output looks OK at first sight.

Do you see the packet dump output when you make the query?


Can you confirm that the two "snmpget" requests are
effectively identical (run from the same host, with exactly
the same parameters, apart from the community string)?
i.e.
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c private
localhost SNMPv2-MIB::sysUpTime.0
(with the working config)
and
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever
localhost SNMPv2-MIB::sysUpTime.0
(with the broken config)


How are you starting the two agents?
What's the exact command you use in each case?

Dave
S***@emc.com
2007-12-21 21:35:39 UTC
Permalink
Silly me!
For the snmpd.conf file I generated it's not:

rocommunity public .1.3.6.1.2.1.1

but rather:

rocommunity whatever

And the snmpget -c command works fine.

But when I use the snmpd.conf file my coworkder generated (in original
email) using community 'whatever' also, I get the timeout.

Dave, I have spent most of the day alternating these two conf file and
starting and restarting snmpd and the results are the same - the snmpget
times out using my coworkers snmpd.conf but works fine using mine. But
for the one I generated ( using 'rocommunity whatever' also), it works
fine.

In each case I am starting the agent on Solaris 9 using the following
startup script:

========================================================================
===============

stty erase

PATH=$PATH:/opt/emc/dist/local/usr/bin
PATH=$PATH:/opt/emc/dist/local/usr/sbin
PATH=$PATH:/usr/local/bin
export PATH
MIBDIRS=/opt/emc/dist/local/usr/share/snmp/mibs
export MIBDIRS
snmpd&
echo "Simple Test"
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0
mount lsca2055:/opt/SUNWspro /opt/SUNWspro
PATH=$PATH:/opt/SUNWspro/bin
export PATH

LD_LIBRARY_PATH=/opt/emc/dist/local/usr/lib
export LD_LIBRARY_PATH

========================================================================
================

FYI, the results of this startup are as follows:

# . ./startup
1513
Simple Test
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (176) 0:00:01.76
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy
#



-----Original Message-----
From: ***@googlemail.com [mailto:***@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, December 21, 2007 4:16 PM
To: Smith, Randy
Cc: net-snmp-***@lists.sourceforge.net
Subject: Re: Timeout: No Response from localhost.
Post by S***@emc.com
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine.
Using which community? "public" or "private"?

Because I wouldn't expect the entry
rocommunity public .1.3.6.1.2.1.1
to work (since it's missing the network source field, which
should come before the OID)
Post by S***@emc.com
Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.
Hmmm....
That output looks OK at first sight.

Do you see the packet dump output when you make the query?


Can you confirm that the two "snmpget" requests are
effectively identical (run from the same host, with exactly
the same parameters, apart from the community string)?
i.e.
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c private
localhost SNMPv2-MIB::sysUpTime.0
(with the working config)
and
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever
localhost SNMPv2-MIB::sysUpTime.0
(with the broken config)


How are you starting the two agents?
What's the exact command you use in each case?

Dave
S***@emc.com
2007-12-21 21:41:11 UTC
Permalink
P.S The result I posted in the previous email of running the 'startup'
script were results using the snmpd.conf file that I generated.

When I run the 'startup' script using my coworker's snmpd.conf file, I
get the following results:

# . ./startup
1523
Simple Test
Timeout: No Response from localhost.
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy

-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 4:36 PM
To: 'Dave Shield'
Cc: net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

Silly me!
For the snmpd.conf file I generated it's not:

rocommunity public .1.3.6.1.2.1.1

but rather:

rocommunity whatever

And the snmpget -c command works fine.

But when I use the snmpd.conf file my coworkder generated (in original
email) using community 'whatever' also, I get the timeout.

Dave, I have spent most of the day alternating these two conf file and
starting and restarting snmpd and the results are the same - the snmpget
times out using my coworkers snmpd.conf but works fine using mine. But
for the one I generated ( using 'rocommunity whatever' also), it works
fine.

In each case I am starting the agent on Solaris 9 using the following
startup script:

========================================================================
===============

stty erase

PATH=$PATH:/opt/emc/dist/local/usr/bin
PATH=$PATH:/opt/emc/dist/local/usr/sbin
PATH=$PATH:/usr/local/bin
export PATH
MIBDIRS=/opt/emc/dist/local/usr/share/snmp/mibs
export MIBDIRS
snmpd&
echo "Simple Test"
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0
mount lsca2055:/opt/SUNWspro /opt/SUNWspro
PATH=$PATH:/opt/SUNWspro/bin
export PATH

LD_LIBRARY_PATH=/opt/emc/dist/local/usr/lib
export LD_LIBRARY_PATH

========================================================================
================

FYI, the results of this startup are as follows:

# . ./startup
1513
Simple Test
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (176) 0:00:01.76
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy
#



-----Original Message-----
From: ***@googlemail.com [mailto:***@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, December 21, 2007 4:16 PM
To: Smith, Randy
Cc: net-snmp-***@lists.sourceforge.net
Subject: Re: Timeout: No Response from localhost.
Post by S***@emc.com
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine.
Using which community? "public" or "private"?

Because I wouldn't expect the entry
rocommunity public .1.3.6.1.2.1.1
to work (since it's missing the network source field, which
should come before the OID)
Post by S***@emc.com
Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.
Hmmm....
That output looks OK at first sight.

Do you see the packet dump output when you make the query?


Can you confirm that the two "snmpget" requests are
effectively identical (run from the same host, with exactly
the same parameters, apart from the community string)?
i.e.
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c private
localhost SNMPv2-MIB::sysUpTime.0
(with the working config)
and
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever
localhost SNMPv2-MIB::sysUpTime.0
(with the broken config)


How are you starting the two agents?
What's the exact command you use in each case?

Dave
Dave Shield
2007-12-21 22:05:03 UTC
Permalink
Post by S***@emc.com
# . ./startup
1513
Simple Test
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (176) 0:00:01.76
When I run the 'startup' script using my coworker's snmpd.conf file, I
# . ./startup
1523
Simple Test
Timeout: No Response from localhost.
Hmmm..... I'm running out of ideas here.

Other things you could try:

- add the line "sleep 5" after "snmpd &"
(in case the one setup takes a little bit longer to start up)

- check there aren't any strange non-printable characters
in your colleague's config file
(grep rocommunity snmpd.conf | cat -vte)

- take a copy of the two config files, strip out all of the comments,
and check that the two slimmed down configs still show
the same behaviour. That should make it easier to compare
the contents.
Then try removing "irrelevant" entries from each of them,
(such as all the trap-related settings) and try again.
Where the two files are different, try tweaking one of them
to match the other, and try again.

Eventually you should be able to get to a state where the
two files are identical - and presumably both work or both fail.
If you take this a step at a time, you should be able to determine
which the offending line is.

Good luck!

Dave
S***@emc.com
2007-12-21 22:09:30 UTC
Permalink
Dave,
Getting back to you on the packets that you requested ....

When I run using the snmpd.conf file I generated (the one that works), I
didn't see much in the way of packets. The first output below will show
this. However, further below, you'll see the output of packets from
using the snmpd.conf file in question:
Thanks again for your input

====================================== Packet output using snmpd.conf
file I generated ==================================


#snmpd -f -Le -Dread_config -d
# net-snmp (or ucd-snmp) persistent data file.
#
########################################################################
####
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
# **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
########################################################################
####
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in
SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd
administrators.
# (Did I mention: do not edit this file?)
#








500 0x414e65774461793500 NULL .1.3.6.1.6.3.10.1.1.2
0x5069c825448c5b6bd4281aaf3c
e2ddb5 .1.3.6.1.6.3.10.1.2.2 0x5069c825448c5b6bd4281aaf3ce2ddb5 0x00
read_config: storing: setserialno 764030637
read_config: storing:
##########################################################
####
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing:
##########################################################
####
read_config: storing:

read_config: storing: engineBoots 90
read_config: storing: oldEngineID 0x80001f88801bea6feb47261304

Sending 96 bytes to UDP: [168.159.121.99]:162
0000: 30 5E 02 01 01 04 06 70 75 62 6C 69 63 A7 51 02
0^.....public.Q.
0016: 04 10 62 9C BD 02 01 00 02 01 00 30 43 30 0E 06
..b........0C0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 00 B6 30 17 06
.+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01
.+...........+..
0064: 06 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01
......0...+.....
0080: 01 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 03
......+.........

NET-SNMP version 5.4.1

========================================================================
=================================================
========================================================================
=================================================

When I run using the snmpd.conf file in question which my coworker
generated, I get a series of packet output as follows:

read_config: storing:

read_config: storing: engineBoots 91
read_config: storing: oldEngineID 0x80001f88801bea6feb47261304

Sending 96 bytes to UDP: [168.159.121.153]:162
0000: 30 5E 02 01 01 04 06 70 75 62 6C 69 63 A7 51 02
0^.....public.Q.
0016: 04 4C 8C D8 28 02 01 00 02 01 00 30 43 30 0E 06
.L..(......0C0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 00 B4 30 17 06
.+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01
.+...........+..
0064: 06 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01
......0...+.....
0080: 01 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 03
......+.........

NET-SNMP version 5.4.1

Received 80 bytes from UDP: [127.0.0.1]:34339
0000: 01 01 00 00 00 00 00 00 00 00 00 00 2A 40 D0 4C
............*@.L
0016: 3C 00 00 00 00 00 00 00 05 04 00 00 01 00 00 00
<...............
0032: 88 1F 00 00 03 00 00 00 02 00 00 00 03 00 00 00
................
0048: 19 00 00 00 4E 65 74 2D 53 4E 4D 50 20 41 67 65 ....Net-SNMP
Age
0064: 6E 74 58 20 73 75 62 2D 61 67 65 6E 74 00 00 00 ntX
sub-agent...


Sending 88 bytes to UDP: [127.0.0.1]:34339
0000: 01 12 00 00 05 00 00 00 00 00 00 00 2A 40 D0 4C
............*@.L
0016: 44 00 00 00 BE 01 00 00 00 00 00 00 04 00 00 00
D...............
0032: 05 04 00 00 01 00 00 00 88 1F 00 00 03 00 00 00
................
0048: 02 00 00 00 03 00 00 00 19 00 00 00 4E 65 74 2D
............Net-
0064: 53 4E 4D 50 20 41 67 65 6E 74 58 20 73 75 62 2D SNMP AgentX
sub-
0080: 61 67 65 6E 74 00 00 00 agent...


Received 20 bytes from UDP: [127.0.0.1]:34339
0000: 01 0D 00 00 05 00 00 00 00 00 00 00 2B 40 D0 4C
............+@.L
0016: 00 00 00 00 ....


Sending 28 bytes to UDP: [127.0.0.1]:34339
0000: 01 12 00 00 05 00 00 00 00 00 00 00 2B 40 D0 4C
............+@.L
0016: 08 00 00 00 9B 07 00 00 00 00 00 00 ............



-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 4:41 PM
To: Smith, Randy; Dave Shield
Cc: net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

P.S The result I posted in the previous email of running the 'startup'
script were results using the snmpd.conf file that I generated.

When I run the 'startup' script using my coworker's snmpd.conf file, I
get the following results:

# . ./startup
1523
Simple Test
Timeout: No Response from localhost.
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy

-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 4:36 PM
To: 'Dave Shield'
Cc: net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

Silly me!
For the snmpd.conf file I generated it's not:

rocommunity public .1.3.6.1.2.1.1

but rather:

rocommunity whatever

And the snmpget -c command works fine.

But when I use the snmpd.conf file my coworkder generated (in original
email) using community 'whatever' also, I get the timeout.

Dave, I have spent most of the day alternating these two conf file and
starting and restarting snmpd and the results are the same - the snmpget
times out using my coworkers snmpd.conf but works fine using mine. But
for the one I generated ( using 'rocommunity whatever' also), it works
fine.

In each case I am starting the agent on Solaris 9 using the following
startup script:

========================================================================
===============

stty erase

PATH=$PATH:/opt/emc/dist/local/usr/bin
PATH=$PATH:/opt/emc/dist/local/usr/sbin
PATH=$PATH:/usr/local/bin
export PATH
MIBDIRS=/opt/emc/dist/local/usr/share/snmp/mibs
export MIBDIRS
snmpd&
echo "Simple Test"
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0
mount lsca2055:/opt/SUNWspro /opt/SUNWspro
PATH=$PATH:/opt/SUNWspro/bin
export PATH

LD_LIBRARY_PATH=/opt/emc/dist/local/usr/lib
export LD_LIBRARY_PATH

========================================================================
================

FYI, the results of this startup are as follows:

# . ./startup
1513
Simple Test
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (176) 0:00:01.76
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy
#



-----Original Message-----
From: ***@googlemail.com [mailto:***@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, December 21, 2007 4:16 PM
To: Smith, Randy
Cc: net-snmp-***@lists.sourceforge.net
Subject: Re: Timeout: No Response from localhost.
Post by S***@emc.com
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine.
Using which community? "public" or "private"?

Because I wouldn't expect the entry
rocommunity public .1.3.6.1.2.1.1
to work (since it's missing the network source field, which
should come before the OID)
Post by S***@emc.com
Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.
Hmmm....
That output looks OK at first sight.

Do you see the packet dump output when you make the query?


Can you confirm that the two "snmpget" requests are
effectively identical (run from the same host, with exactly
the same parameters, apart from the community string)?
i.e.
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c private
localhost SNMPv2-MIB::sysUpTime.0
(with the working config)
and
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever
localhost SNMPv2-MIB::sysUpTime.0
(with the broken config)


How are you starting the two agents?
What's the exact command you use in each case?

Dave
S***@emc.com
2007-12-21 22:55:46 UTC
Permalink
Good news: I found the problem with the snmpd.conf file that was in
question.

There was a line at the bottom of the file, which I overlooked, as
follows:

#agentaddress 161
agentaddress 1161

I uncommented out the 'agentaddress 161' and commented out the
'agentaddress 1161' and now the snmpget -c .... works.
I failed to post that in my original email, I supposed because I
overlooked it. Sorry about that.
Randy

-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 5:10 PM
To: Smith, Randy; 'Dave Shield'
Cc: 'net-snmp-***@lists.sourceforge.net'
Subject: RE: Timeout: No Response from localhost.

Dave,
Getting back to you on the packets that you requested ....

When I run using the snmpd.conf file I generated (the one that works), I
didn't see much in the way of packets. The first output below will show
this. However, further below, you'll see the output of packets from
using the snmpd.conf file in question:
Thanks again for your input

====================================== Packet output using snmpd.conf
file I generated ==================================


#snmpd -f -Le -Dread_config -d
# net-snmp (or ucd-snmp) persistent data file.
#
########################################################################
####
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
# **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
########################################################################
####
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in
SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd
administrators.
# (Did I mention: do not edit this file?)
#








500 0x414e65774461793500 NULL .1.3.6.1.6.3.10.1.1.2
0x5069c825448c5b6bd4281aaf3c
e2ddb5 .1.3.6.1.6.3.10.1.2.2 0x5069c825448c5b6bd4281aaf3ce2ddb5 0x00
read_config: storing: setserialno 764030637
read_config: storing:
##########################################################
####
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing:
##########################################################
####
read_config: storing:

read_config: storing: engineBoots 90
read_config: storing: oldEngineID 0x80001f88801bea6feb47261304

Sending 96 bytes to UDP: [168.159.121.99]:162
0000: 30 5E 02 01 01 04 06 70 75 62 6C 69 63 A7 51 02
0^.....public.Q.
0016: 04 10 62 9C BD 02 01 00 02 01 00 30 43 30 0E 06
..b........0C0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 00 B6 30 17 06
.+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01
.+...........+..
0064: 06 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01
......0...+.....
0080: 01 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 03
......+.........

NET-SNMP version 5.4.1

========================================================================
=================================================
========================================================================
=================================================

When I run using the snmpd.conf file in question which my coworker
generated, I get a series of packet output as follows:

read_config: storing:

read_config: storing: engineBoots 91
read_config: storing: oldEngineID 0x80001f88801bea6feb47261304

Sending 96 bytes to UDP: [168.159.121.153]:162
0000: 30 5E 02 01 01 04 06 70 75 62 6C 69 63 A7 51 02
0^.....public.Q.
0016: 04 4C 8C D8 28 02 01 00 02 01 00 30 43 30 0E 06
.L..(......0C0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 00 B4 30 17 06
.+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01
.+...........+..
0064: 06 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01
......0...+.....
0080: 01 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 03
......+.........

NET-SNMP version 5.4.1

Received 80 bytes from UDP: [127.0.0.1]:34339
0000: 01 01 00 00 00 00 00 00 00 00 00 00 2A 40 D0 4C
............*@.L
0016: 3C 00 00 00 00 00 00 00 05 04 00 00 01 00 00 00
<...............
0032: 88 1F 00 00 03 00 00 00 02 00 00 00 03 00 00 00
................
0048: 19 00 00 00 4E 65 74 2D 53 4E 4D 50 20 41 67 65 ....Net-SNMP
Age
0064: 6E 74 58 20 73 75 62 2D 61 67 65 6E 74 00 00 00 ntX
sub-agent...


Sending 88 bytes to UDP: [127.0.0.1]:34339
0000: 01 12 00 00 05 00 00 00 00 00 00 00 2A 40 D0 4C
............*@.L
0016: 44 00 00 00 BE 01 00 00 00 00 00 00 04 00 00 00
D...............
0032: 05 04 00 00 01 00 00 00 88 1F 00 00 03 00 00 00
................
0048: 02 00 00 00 03 00 00 00 19 00 00 00 4E 65 74 2D
............Net-
0064: 53 4E 4D 50 20 41 67 65 6E 74 58 20 73 75 62 2D SNMP AgentX
sub-
0080: 61 67 65 6E 74 00 00 00 agent...


Received 20 bytes from UDP: [127.0.0.1]:34339
0000: 01 0D 00 00 05 00 00 00 00 00 00 00 2B 40 D0 4C
............+@.L
0016: 00 00 00 00 ....


Sending 28 bytes to UDP: [127.0.0.1]:34339
0000: 01 12 00 00 05 00 00 00 00 00 00 00 2B 40 D0 4C
............+@.L
0016: 08 00 00 00 9B 07 00 00 00 00 00 00 ............



-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 4:41 PM
To: Smith, Randy; Dave Shield
Cc: net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

P.S The result I posted in the previous email of running the 'startup'
script were results using the snmpd.conf file that I generated.

When I run the 'startup' script using my coworker's snmpd.conf file, I
get the following results:

# . ./startup
1523
Simple Test
Timeout: No Response from localhost.
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy

-----Original Message-----
From: Smith, Randy
Sent: Friday, December 21, 2007 4:36 PM
To: 'Dave Shield'
Cc: net-snmp-***@lists.sourceforge.net
Subject: RE: Timeout: No Response from localhost.

Silly me!
For the snmpd.conf file I generated it's not:

rocommunity public .1.3.6.1.2.1.1

but rather:

rocommunity whatever

And the snmpget -c command works fine.

But when I use the snmpd.conf file my coworkder generated (in original
email) using community 'whatever' also, I get the timeout.

Dave, I have spent most of the day alternating these two conf file and
starting and restarting snmpd and the results are the same - the snmpget
times out using my coworkers snmpd.conf but works fine using mine. But
for the one I generated ( using 'rocommunity whatever' also), it works
fine.

In each case I am starting the agent on Solaris 9 using the following
startup script:

========================================================================
===============

stty erase

PATH=$PATH:/opt/emc/dist/local/usr/bin
PATH=$PATH:/opt/emc/dist/local/usr/sbin
PATH=$PATH:/usr/local/bin
export PATH
MIBDIRS=/opt/emc/dist/local/usr/share/snmp/mibs
export MIBDIRS
snmpd&
echo "Simple Test"
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever localhost
SNMPv2-MIB::sysUp
Time.0
mount lsca2055:/opt/SUNWspro /opt/SUNWspro
PATH=$PATH:/opt/SUNWspro/bin
export PATH

LD_LIBRARY_PATH=/opt/emc/dist/local/usr/lib
export LD_LIBRARY_PATH

========================================================================
================

FYI, the results of this startup are as follows:

# . ./startup
1513
Simple Test
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (176) 0:00:01.76
Now mounting
nfs mount: mount: /opt/SUNWspro: Device busy
#



-----Original Message-----
From: ***@googlemail.com [mailto:***@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, December 21, 2007 4:16 PM
To: Smith, Randy
Cc: net-snmp-***@lists.sourceforge.net
Subject: Re: Timeout: No Response from localhost.
Post by S***@emc.com
fyi, the conf file pasted earlier is one that a coworker devised on AIX
using the snnpconf. However, interestingly, when I use the following
snmpd.conf that I generated myself on Solaris, the 'snmpget -c ....'
works fine.
Using which community? "public" or "private"?

Because I wouldn't expect the entry
rocommunity public .1.3.6.1.2.1.1
to work (since it's missing the network source field, which
should come before the OID)
Post by S***@emc.com
Also, following the 'good' snmpd.conf file, Dave you will
see the output from the snmpd -f -Le -Dread_config -d' using the
snmpd.conf file that my coworker generated.
Hmmm....
That output looks OK at first sight.

Do you see the packet dump output when you make the query?


Can you confirm that the two "snmpget" requests are
effectively identical (run from the same host, with exactly
the same parameters, apart from the community string)?
i.e.
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c private
localhost SNMPv2-MIB::sysUpTime.0
(with the working config)
and
/opt/emc/dist/local/usr/bin/snmpget -v 1 -c whatever
localhost SNMPv2-MIB::sysUpTime.0
(with the broken config)


How are you starting the two agents?
What's the exact command you use in each case?

Dave
Kuczynski, Edward
2007-12-24 13:23:48 UTC
Permalink
I afraid it didn't happen to me, just to a friend, so I added that as another item to try.

Merry Christmas!

Ed


-----Original Message-----
From: ***@googlemail.com [mailto:***@googlemail.com] On Behalf Of Dave Shield
Sent: Friday, December 21, 2007 3:42 PM
To: Kuczynski, Edward
Cc: ***@emc.com; net-snmp-***@lists.sourceforge.net
Subject: Re: Timeout: No Response from localhost.
Post by Kuczynski, Edward
We ran into a problem having both readonly and r/w in the conf file for v2.
It wouldn't hurt to comment out the r/w and try again.
Would you care to expand on the problem you were seeing?

The usual issue with rw/ro clashes is when you have the
same community (or SNMPv3 user) for both ro and rw.
In that situation, it tends to be SET requests that fail
(when the read-only configuration is applied first).

I've never come across a situation where having both
rw and ro settings would block GET requests.

Dave
Clarence Joseph
2007-12-24 14:52:00 UTC
Permalink
Merry Christmas Ed

thank a lot for the info...

regards,
ajit
Post by Kuczynski, Edward
I afraid it didn't happen to me, just to a friend, so I added that as another item to try.
Merry Christmas!
Ed
-----Original Message-----
Behalf Of Dave Shield
Sent: Friday, December 21, 2007 3:42 PM
To: Kuczynski, Edward
Subject: Re: Timeout: No Response from localhost.
Post by Kuczynski, Edward
We ran into a problem having both readonly and r/w in the conf file for
v2.
Post by Kuczynski, Edward
It wouldn't hurt to comment out the r/w and try again.
Would you care to expand on the problem you were seeing?
The usual issue with rw/ro clashes is when you have the
same community (or SNMPv3 user) for both ro and rw.
In that situation, it tends to be SET requests that fail
(when the read-only configuration is applied first).
I've never come across a situation where having both
rw and ro settings would block GET requests.
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Kuczynski, Edward
2007-12-24 19:08:37 UTC
Permalink
Is mib2c.table_data.conf used anymore? I'd really appreciate if someone could give me some info. I have a read-only table I'd like to implement. Data will be read from a file.
1) In initialize-table, at the end it states init contents of table here. What's the preferred method? Do you call createEntry with a malloc'd table_entry whose pointer has been copied to the containers void*??
2) Who should call table_createEntry and when?

OR is the future using mib2c-iterate-access.conf or mib2c_mfd.conf ?

What do you guys use for creating and implementing read -only tables?

Ed
________________________________
Dave Shield
2008-01-03 10:09:36 UTC
Permalink
Post by Kuczynski, Edward
Is mib2c.table_data.conf used anymore?
Which version of mib2c.table_data are you referring to?
What does the code generated by this template look like?

Is the table registered using "netsnmp_register_table_data()"
or "netsnmp_tdata_register()"? The choice of helper used by
this template changed between the 5.2.x and 5.3.x lines.

The current table_data template (netsnmp_tdata_register)
is definitely still used - this would be my personal preferred
starting point for a MIB table (whether read-only or read-write).
Though other developers might see things differently.
Post by Kuczynski, Edward
1) In initialize-table, at the end it states init contents of table here.
What's the preferred method?
You've already created a data structure to hold the table as a whole
("table_data").
You pass this to the createEntry routine, together with the index values for the
new row. This routine then constructs a data structure for this new row, with
empty or default values for the various columns, inserts this row into
the table,
and passes the row back. You can then insert the appropriate (non-default)
values for selected colums. Something like:


table_data = netsnmp_tdata_create_table( "myTable", 0 );
// configure the structure of the table
netsnmp_tdata_register( reg, table_data, table_info );

// Initialise the table contents
netsnmp_tdata_row *row = myTable_createEntry( table_data, 1);
(myTable_entry *myRow = (myTable_entry *)row->data;
strcpy( data->name, "John");

netsnmp_tdata_row *row = myTable_createEntry( table_data, 2);
myRow = (myTable_entry *)row->data;
strcpy( data->name, "Paul");

netsnmp_tdata_row *row = myTable_createEntry( table_data, 3);
myRow = (myTable_entry *)row->data;
strcpy( data->name, "George");

netsnmp_tdata_row *row = myTable_createEntry( table_data, 4);
myRow = (myTable_entry *)row->data;
strcpy( data->name, "Ringo");
Post by Kuczynski, Edward
Who should call table_createEntry and when?
There are two situations where the createEntry routine would be called.
a) When the table is being populated from some external source
(either initially, or via the cache loading mechanism).

b) When a new row is being created dynamically (via SET requests).

Given that you are talking about a read-only table, then b) is not relevant.

Dave

Wes Hardaker
2007-12-27 21:50:12 UTC
Permalink
SR> # snmpd -f -Le
SR> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
SR> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
SR> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
SR> Turning on AgentX master support.
SR> NET-SNMP version 5.4.1

You might make sure that your snmpd.conf file is actually being read.
It's possible that it's reading one from somewhere else instead.

Run: snmpd -f -Le -Dread_config

and it should show you the files it loads.
--
Wes Hardaker
Sparta, Inc.
Loading...