Re: Undefined Subroutine with mib2c

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
[sorry for the delay in responding to this]

2008/4/7 Seann Clark <[email protected]>:
>            If I try anything, even if it is to verify/remake the
>  current configuration usually yields the results of: Undefined
>  subroutine &SNMP::initMib called at /usr/bin/mib2c line 47.

That routine should be defined in the file 'SNMP.pm'.


> The list of the packages I have installed (using YUM) are:
    [snip]
>  net-snmp-perl-5.4-17.fc7

That is the package which ought to contain initMib.

What does 'rpm -q -l net-snmp-perl | grep SNMP.pm'   report?
Have a look at this file - does it contain "sub initMib" ?

What does the top of /usr/bib/mib2c look like?
I presume it starts something like "#!/usr/bin/perl" ?

Try running
    /usr/bin/perl -V

That will display a list of places where perl looks for modules.
Does the location of SNMP.pm (as reported by rpm -q -l)
appear on this list?





>  Unrelated to this, but still an issue I am playing with, that is less
>  frustrating, is, I have a host, that only selectively answers snmp
>  queries from its network interface. I have verified traffic isn't
>  blocked going to it, and I get nothing. At the same time, on the local
>  box if I talk to localhost for the snmpwalk, it works, on the host, to
>  the network interface, nothing. I bound it to the network interface and
>  the loopback, and know it is listening on the proper interfaces on the
>  proper ports.

There are typically three places where SNMP traffic might be blocked:
  -  by a firewall (e.g. iptables configuration)
  -  by /etc/hosts.{allow,deny} settings
  -  by the snmpd.conf access control settings

Try starting the agent using

     snmpd -f -Le -d

and send a query to the network interface.
Do you see a raw packet dump or not?
If not, then it's probably iptables which is blocking "remote" SNMP traffic.

If you do see an incoming packet dump, but nothing going out, then
it's probably either /etc/hosts.{allow,deny} or snmpd.conf access control
which is blocking things.
   What else is logged by the agent when you run this query?
What are your access control settings?

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.