Just to ensure that I wasn't delusional, I removed the "master agentx"
line from snmpd.conf, and snmpd appeared in the list of running
processes when doing ps -ef.
I first encountered this problem when I ran "example-daemon" in the
background, and kept getting:
Warning: Failed to connect to agentX master agent
messages, and then checked to ensure that snmpd was running, which it
apparently wasn't.
I am running on Solaris 9 platform using net-snmp-5.4.1 build.
Before attempting to get the subagent running, I did have snmpd running
without "master agentx" and successfully executed "snmpget sysUpTime.0"
etc.
Does anyone have any idea why snmpd is not appearing in the list of
running processes?
########################################################################
###
#
# 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
# 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"
# Turn on Master Agent X Support
master agentx
########################################################################
###
# 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 something
# 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 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
Thanks,
Randy
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
I presume you mean "master agentx" (as you have later)
> Then, I restart snmpd and do "ps -ef", and snmpd process doesn't appear.
> The interesting thing is that when I execute snmpd, it appears to
> execute from the command line.
Sorry - it's not quite clear what you mean by that last.
If you add the line "master agentx" and then start the agent using
snmpd -f -Le
what does it display?
Dave
<If you add the line "master agentx" and then start the agent using
snmpd -f -Le
what does it display?>
# snmpd -f -Le
Turning on AgentX master support.
Error: Couldn't open a master agentx socket to listen on ():
Should I create an agentx.conf file perhaps?
< Sorry - it's not quite clear what you mean by that last.>
At the command line, when I execute snmpd as follows:
# snmpd
There aren't any error messages - it appears to now be executing. ps -ef
doesn't confirm that though.
<I presume you mean "master agentx" (as you have later)>
Yes, sorry that's what I meant.
Randy
OK - that's the most important thing to fix.
Does the directory /var/agentx exist?
Who is it owned by, and what are the permissions?
Who are you starting the agent as? Root, or an unprivileged user?
> Should I create an agentx.conf file perhaps?
No - that shouldn't be necessary.
I'm starting the agent as 'root'. Everything is owned by 'root' because
I configured/built/installed as 'root' (I had to). /var/agentx does not
exist.
Randy
-----Original Message-----
From: dave....@googlemail.com [mailto:dave....@googlemail.com] On
Behalf Of Dave Shield
Sent: Tuesday, October 30, 2007 10:31 AM
To: Smith, Randy
Cc: net-snm...@lists.sourceforge.net
Subject: Re: Adding "master agentx" line to snmpd.conf then running
snmpd, then do ps -ef, snmpd not there
Try creating this directory. Then restart the agent ("snmpd -f -Le")
What does this report?
#snmpd -f -Le
Turning on AgentX master support.
NET-SNMP version 5.4.1
I ps -ef'd it and it appears to be running now?
Thanks!
-----Original Message-----
From: dave....@googlemail.com [mailto:dave....@googlemail.com] On
Behalf Of Dave Shield
Sent: Tuesday, October 30, 2007 10:52 AM
To: Smith, Randy
Cc: net-snm...@lists.sourceforge.net
Subject: Re: Adding "master agentx" line to snmpd.conf then running
snmpd, then do ps -ef, snmpd not there