Link to home
Start Free TrialLog in
Avatar of greatmich
greatmich

asked on

SNMP on AIX I cannot get it working

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.
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

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
Avatar of greatmich
greatmich

ASKER

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?
Is there actually a mibs.defs file? If yes, throw it away!
no I just got searching from top to bottom
And the message?
1473-180 Error in /etc/mibs.defs file, line 1020 : unrecognized type. ...
Did you write it by hand?
 
copy and paste
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....
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
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

there are no + in the file I just looked for it.
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?
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

ASKER CERTIFIED SOLUTION
Avatar of greatmich
greatmich

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
 
 
 
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
I asked IBM, the ticket was close but will see if he answers.
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.

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