Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you encounter the 'Time synchronization failed during discovery' error using the perl Net::SNMP library there may be a fairly easy work around.  It may be as easy as editing the Net::SNMP module to not invoke this error.  The following advice should be executed as root.

Find Net::SNMP

In order to find where Net::SNMP is on the subject system issue the following command.

Code Block
# find /usr/ -type f -path "*/Net/SNMP.pm"
/usr/local/share/perl5/Net/SNMP.pm
/usr/share/perl5/Net/SNMP.pm

If you are unfortunate as in the above example two SNMP.pm files may be returned.  In order to determine which one perl is invoking use the perl -V command.

Code Block
# perl -V | grep -A 30 @INC
  @INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .
# 

The @INC array is a list of directories that perl looks in to find modules.  This is a top down, match first find operation.  Based on this the version in /usr/local/share/perl5/Net will be utilized because it will be found first.

Edit Net::SNMP

Always make a backup of a module prior to editing it.  A command such as 'cp SNMP.pm SNMP.pm.unpatched works well.