SNMP on AIX I cannot get it working

greatmich
greatmich used Ask the Experts™
on
I had an issue dealing with this before here on expert exchange. Whatever steps I did on that one I did setting this other AIX machine up.  The snmpv3.conf files are identical and it starts but the log is showing errors and network admin is saying that he still cannot see my box.  Here are the errors.

01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1020 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1021 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1023 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1025 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1026 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1031 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1032 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1034 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1036 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1041 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-180 Error in /etc/mibs.defs file, line 1042 : unrecognized type.
 01/27/10 12:22:58 PM -  snmpd: 1473-149 Line number 170 contains an unsupported value : xmd.
 01/27/10 12:22:58 PM -  snmpd: 1473-155 Line number 171 defines a duplicate entry.
 01/27/10 12:22:58 PM -  Tracing is set to 0.
 01/27/10 12:22:58 PM -  SNMP agent: initialization complete.
 01/27/10 12:23:00 PM -  Accepted new SMUX inet socket connection on fd=10 from 127.0.0.1 port 33119.
 01/27/10 12:23:53 PM -  Accepted new DPI inet socket connection on fd=11 from 10.1.30.11 port 33173.
 01/27/10 12:23:53 PM -  Accepted new DPI inet socket connection on fd=12 from 10.1.30.11 port 33174.
 01/27/10 12:23:53 PM -  Accepted new DPI inet socket connection on fd=13 from 10.1.30.11 port 33175.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013

Commented:
Hi again,

strange! There is no file /etc/mibs.defs in AIX! It's /etc/mib.defs which contains the MIB object definitions!

And obviously the file is question is corrupt, whatever its name might be.

I would try to get /etc/mib.defs from a running system and see if it works better.

wmp

Author

Commented:
I copied an existing work mib.defs file over to the box that I am trying to get working and I got the same error.   What do you think?
Most Valuable Expert 2013
Top Expert 2013

Commented:
Is there actually a mibs.defs file? If yes, throw it away!
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Author

Commented:
no I just got searching from top to bottom
Most Valuable Expert 2013
Top Expert 2013

Commented:
And the message?
1473-180 Error in /etc/mibs.defs file, line 1020 : unrecognized type. ...
Did you write it by hand?
 

Author

Commented:
copy and paste
Most Valuable Expert 2013
Top Expert 2013

Commented:
I just created an /etc/mibs.defs file (just for curiosity) containing some nonsense.
I restarted snmpd, all went well. The new file was ignored at all.
Maybe there is an additional configuration file somewhere pointing to mibs.defs which I'm not aware of.
But it's not in snmpdv3.conf, not in snmpd.peers and not in snmpmib.conf.
Maybe you could grep for the string "mibs.defs" in all files under /etc.
But as this file is not present and snmpd complains nonetheless, I'm just completely clueless....

Author

Commented:
nope grepped it nothing  and i will contact IBM, thanks!!!
Just a comment - some people on this thread are referring to /etc/mibs.defs, and others are referring to /etc/mib.defs.

Unlike other UNIX flavors, AIX uses the /etc/mib.defs file (not /etc/mibs.defs) for all its MIB definitions.
The corruption error you are experiencing is actually a known issue with AIX.

One fairly common reason for this problem to crop up is updating the /etc/mib.defs file with the xmd MIB from the AIX Performance Toolbox.  The root cause of the problem is the xmd MIB contains plus symbols (+), which are seen as invalid characters.

HINT: Back up your MIB definitions file in case anything goes haywire.
cp /etc/mib.defs /etc/mib.defs.bak

Now, open up your /etc/mib.defs file with your favorite text editor, and look for + symbols, then change the "+" symbol to the word "plus".

For example, if you find a line that looks like this:
xmdNFSV3ClntReaddir+ OBJECT-TYPE

You should change it to look like this:
xmdNFSV3ClntReaddirplus OBJECT-TYPE


Repeat for all instances of the + symbol.

The cacti folks have a bit more detail on this issue as well:
http://forums.cacti.net/viewtopic.php?t=19040
Most Valuable Expert 2013
Top Expert 2013

Commented:
nickjeffrey,

all you wrote is true for /etc/mib.defs. But why in the world would greatmich's snmpd complain about /etc/mibs.defs, a file which obviously doesn't exist?

And greatmich wrote that he copied over an /etc/mib.defs from a working system, but snmpd errors nonetheless!

How would you explain those oddnesses? I've no idea!

wmp

Author

Commented:
there are no + in the file I just looked for it.

Author

Commented:
THis is a line that it is whining about.
vacmSecurityToGroupStorageType vacmSecurityToGroupEntry.4 StorageType     read-create     current

Do you see anything else that could be convered?
Most Valuable Expert 2013
Top Expert 2013

Commented:
So -

I've found exactly the same line on my AIX 5.2, 5.3 and 6.1 systems (yes, I NEED to run that many versions!)

vacmSecurityToGroupStorageType vacmSecurityToGroupEntry.4 StorageType     read-create     current

Needless to say that none of my snmpd's does complain about it.

Sounds crazy, but - how about copying /etc/mib.defs to /etc/mibs.defs ?

wmp

IBM had me restart the mibs first then start snmp and that worked
Most Valuable Expert 2013
Top Expert 2013

Commented:
Fine!
But what is "restart the mibs"? Do you mean the snmpmibd process or its relatives (hostmibd, aixmibd)?
I can imagine that this might have helped, but then remains the question "why /etc/mibs.def"??
Anyway, glad to hear that it works now!
wmp
 
 
 

Author

Commented:
This what I did exactly, pulled from .sh_history and I am sorry that I did not ask why for the mibs.defs, it would have helped us all.

stopsrc -s hostmibd
stopsrc -s snmpmibd
stopsrc -s aixmibd
stopsnmpd ls snmpd
stopsrc -s snmpd
ps -ef |grep snmpd
startsrc -s snmpd
startsrc -s  hostmibd
startsrc -s snmpmibd
startsrc -s aixmibd
snmpinfo -h 127.0.0.1 -md

Author

Commented:
I asked IBM, the ticket was close but will see if he answers.

Author

Commented:
This is what IBM says.

Shawn,

The coders of snmp have the error messages tagged has /etc/mibs.def instead of /etc/mib.defs.
See the output of strings on snmpd.
# strings /usr/sbin/snmpd|grep -i mib

/etc/mib.defs
Using file %s for MIB variable defaults.
# %s (value=%s) registered in MIB as oid %s
# %s (value=%ld) registered in MIB as oid %s
create_initial_mibViews
create_initial_mibViews
 -S Prevent non-root user from changing the MIB values.
/mib.defs
/mibs.data
snmpd: 1473-180 Error in /etc/mibs.defs file, line %1$d : %2$s.
snmpd: 1473-180 Error in /etc/mibs.defs file, line %1$d : %2$s.
snmpd: 1473-180 Error in /etc/mibs.defs file, line %1$d : %2$s.

It's most likely been like that since the beginning.

I've created pmr XXXXXXXXX to address getting the message changed to the correct file name.

Most Valuable Expert 2013
Top Expert 2013

Commented:
What a snare! That's why we've been on the wrong track all the time!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial