Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Unknown engine ID" error

215 views
Skip to first unread message

Ravi Kumar

unread,
Mar 18, 2012, 4:09:47 AM3/18/12
to
Hi all,

I have created snmpv3 user from the following command

snmpget -v 3 -u ravi -l authNoPriv -a MD5 -A abcdefghij localhost sysUpTime.0

when i try to snmpget after starting snmpd i found following unknown
engine id error

/root/software/net-snmp>snmpget -v3 -u ravi -l authNoPriv -a MD5 -A
abcdefghij localhost sysUpTime.0
snmpwalk: Unknown engine ID (Sub-id not found: (top) -> sysUpTime)


can any one help me on this.

Thanks,,,,,,,

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Robert Story

unread,
Mar 19, 2012, 10:59:25 AM3/19/12
to
On Sun, 18 Mar 2012 13:39:47 +0530 Ravi wrote:
RK> Hi all,
RK>
RK> I have created snmpv3 user from the following command
RK>
RK> snmpget -v 3 -u ravi -l authNoPriv -a MD5 -A abcdefghij localhost
RK> sysUpTime.0
RK>
RK> when i try to snmpget after starting snmpd i found following unknown
RK> engine id error
RK>
RK> /root/software/net-snmp>snmpget -v3 -u ravi -l authNoPriv -a MD5 -A
RK> abcdefghij localhost sysUpTime.0
RK> snmpwalk: Unknown engine ID (Sub-id not found: (top) -> sysUpTime)

Mibs might not be loaded correctly.. try using the OID directly:

snmpget -v3 -u ravi -l authNoPriv -a MD5 -A abcdefghij \
localhost .1.3.6.1.2.1.1.3.0

Then check out the FAQs on the net-snmp web site on how to configure net-snmp
to load mibs...

Ravi Kumar

unread,
Mar 20, 2012, 4:42:41 AM3/20/12
to
still it is not working.

/root>snmpwalk -v 3 -u ravi -l authNoPriv -a MD5 -A mypass
192.168.2.11 .1.3.6.1.2.1.1
snmpwalk: Unknown engine ID

moreover createuser commands is not getting replaced by key in
persistent snmpd.conf after restarting snmpd (as per snmpv3
documentation).

createUser ravi MD5 mypass


thanks........

Robert Story

unread,
Mar 20, 2012, 11:25:06 AM3/20/12
to
On Tue, 20 Mar 2012 14:12:41 +0530 Ravi wrote:
RK> moreover createuser commands is not getting replaced by key in
RK> persistent snmpd.conf after restarting snmpd (as per snmpv3
RK> documentation).
RK>
RK> createUser ravi MD5 mypass

Are you stopping snmpd before editing the snmpd.conf file? If so, and it's not
changing, the either you don't have permissions, or you are editing the wrong
file.

Ravi Kumar

unread,
Mar 20, 2012, 2:47:24 PM3/20/12
to
I am using root credential to do all these so no issues with permissions.
I have changed these two files

/usr/local/share/snmp/snmpd.conf ( added "rwuser ravi auth system" )
/var/net-snmp/snmpd.conf ( added "createUser ravi MD5
mypass123" and then started snmpd)

The snmpd was not running when i modified above files.
Used following to start snmpd after that.

./snmpd -c /usr/local/share/snmp/snmpd.conf,/var/net-snmp/snmpd.conf

I found following warnings while starting snmpd

/var/net-snmp/snmpd.conf: line 50: Warning: Unknown token: engineBoots.
/var/net-snmp/snmpd.conf: line 51: Warning: Unknown token: oldEngineID.

Thanks,,,,,,,,,,,,

Dave Shield

unread,
Mar 20, 2012, 3:37:44 PM3/20/12
to
On 20 March 2012 18:47, Ravi Kumar <myne...@gmail.com> wrote:
> Used following to start snmpd after that.
>
> ./snmpd -c /usr/local/share/snmp/snmpd.conf,/var/net-snmp/snmpd.conf

The agent ought to pick up the persistent config file automatically.
You shoudn't need to specify this explicitly. (And that might well
be confusing things).

Is this an agent that you compiled yourself?
If so (and you used the default configure settings)
then it should probably be looking in /usr/local/share/snmp
automatically as well.

Try starting the agent with simply "./snmpd"


> I found following warnings while starting snmpd
>
> /var/net-snmp/snmpd.conf: line 50: Warning: Unknown token: engineBoots.
> /var/net-snmp/snmpd.conf: line 51: Warning: Unknown token: oldEngineID.

That's worrying.
Those should be picked up by the code that's pretty central to
the running of the agent.
How did you run "configure" when you compiled the agent?

Dave

Ravi Kumar

unread,
Mar 21, 2012, 3:22:37 PM3/21/12
to
> Is this an agent that you compiled yourself?
> If so (and you used the default configure settings)
> then it should probably be looking in /usr/local/share/snmp
> automatically as well.
>

I have two versions of snmpd in my machine.One which is shipped with
fedora OS and another which i checked
out from svn repository and installed after compilation.


/root/software/net-snmp>whereis snmpd
snmpd: /usr/sbin/snmpd /usr/local/sbin/snmpd /usr/share/man/man8/snmpd.8.gz

>>    How did you run "configure" when you compiled the agent?

I used following configure script for compilation of svn source.

./configure \
--with-out-mib-modules="" \
--with-mib-modules="Rmon agentx host examples target
notification disman notification-log-mib ip-mib" \
--with-default-snmp-version="2" \
--with-sys-location="india" \
--with-logfile="/var/log/snmpd.log" \
--with-sys-contact="ravi....@gmail.com" \
--with-persistent-directory="/var/log" \
--enable-static --disable-shared \
--with-ldflags=-Bstatic \
--disable-manuals \
--disable-scripts \
--without-root-access \

> Try starting the agent with simply   "./snmpd"

After make and make install I executed the following command as you said

/usr/local/sbin/snmpd

but I am still getting following warnings and persistent data file is
not getting replaced by key.

buffer too small to read octet string (13 < 13)
buffer too small to read octet string (0 < 13)
buffer too small to read octet string (0 < 13)
MIB search path: /root/.snmp/mibs:/usr/local/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 6 in
/usr/local/share/snmp/mibs/RFC1213-MIB.txt
Cannot find module (SNMPv2-TC): At line 8 in
/usr/local/share/snmp/mibs/RMON-MIB.txt
/usr/local/share/snmp/snmpd.conf: line 46: Warning: Unknown token: syscontact.
Turning on AgentX master support.
/var/log/snmpd.conf: line 39: Warning: Unknown token: setserialno.
/var/log/snmpd.conf: line 44: Warning: Unknown token: ifXTable.
/var/log/snmpd.conf: line 45: Warning: Unknown token: ifXTable.
/var/log/snmpd.conf: line 46: Warning: Unknown token: ifXTable.

What are these warnings and why are they comming ?


how can I know what are the non -persistent and persistent data file
are being used by given snmpd
If we have multiple snmpd installed ?


thanks.....................

Niels Baggesen

unread,
Mar 21, 2012, 7:07:58 PM3/21/12
to
On Thu, Mar 22, 2012 at 12:52:37AM +0530, Ravi Kumar wrote:
> I have two versions of snmpd in my machine.One which is shipped with
> fedora OS and another which i checked
> out from svn repository and installed after compilation.

svn was replaced with git some time ago. What version / revision
is the source that you have?

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers --- R W Hamming

Ravi Kumar

unread,
Mar 22, 2012, 12:56:40 PM3/22/12
to
versions and branch details are below.

./snmpd -v

NET-SNMP version: 5.7.rc1
Web: http://www.net-snmp.org/
Email: net-snm...@lists.sourceforge.net



>svn info
Path: .
URL: https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk/net-snmp/agent
Repository Root: https://net-snmp.svn.sourceforge.net/svnroot/net-snmp
Repository UUID: 06827809-a52a-0410-b366-d66718629ded
Revision: 20533
Node Kind: directory
Schedule: normal
Last Changed Author: dts12
Last Changed Rev: 20513
Last Changed Date: 2011-06-21 19:58:48 +0530 (Tue, 21 Jun 2011)


Thanks,,,,,

Robert Story

unread,
Mar 26, 2012, 11:42:02 AM3/26/12
to
On Thu, 22 Mar 2012 00:52:37 +0530 Ravi wrote:
RK> > Is this an agent that you compiled yourself?
RK> > If so (and you used the default configure settings)
RK> > then it should probably be looking in /usr/local/share/snmp
RK> > automatically as well.
RK> >
RK>
RK> I have two versions of snmpd in my machine.One which is shipped with
RK> fedora OS and another which i checked
RK> out from svn repository and installed after compilation.

You need addition setup to support multiple agents on a single machine.

http://www.net-snmp.org/wiki/index.php/Multiple_Agents

Dave Shield

unread,
Mar 26, 2012, 4:48:16 PM3/26/12
to
On 21 March 2012 19:22, Ravi Kumar <myne...@gmail.com> wrote:
>> Is this an agent that you compiled yourself?
>> If so (and you used the default configure settings)
>> then it should probably be looking in /usr/local/share/snmp
>> automatically as well.
>>
>
> I have two versions of snmpd in my machine.One which is shipped with
> fedora OS and another which i checked
> out from svn repository and installed after compilation.

The one that you compiled from source will probably be
looking in /usr/local/share/snmp automatically.

The one shipped with Fedora will probably be looking
at /usr/share/snmp instead.

(/usr/local is typically used for local additions, so vendor
supplied software won't tend to look there).

Dave
0 new messages