El siguiente procedimiento es para dar solución al error de sincronización durante un descubrimiento realizado con el protocolo SNMPv3 a dispositivos con un firmware que no ejecuta un procedimiento de autenticación completo, por tal motivo se ve afectado la colección de datos.
El módulo Net::SNMP utiliza el esquema del procedimiento en la Sección 4 de RFC 3414 para realizar el descubrimiento.
Parece que el firmware del hardware no exige la comprobación de la puntualidad y no responde con una PDU de informe usmStatsNotInTimeWindows durante el proceso de descubrimiento, por lo tanto se genera un error de sincronización.
Ejemplo de Error:
error: [2633] Net::SNMP::_discovery_synchronization_cb(): Time synchronization failed during discovery debug: [2636] Net::SNMP::_discovery_synchronization_cb(): synchronization failed error: [1064] Net::SNMP::PDU::_report_pdu_error(): Received usmStatsUnknownEngineIDs.0 Report-PDU with value 11769 error: [299] Net::SNMP::MessageProcessing::prepare_data_elements(): Received usmStatsUnknownEngineIDs.0 Report-PDU with value 11769 error: [398] Net::SNMP::Dispatcher::_transport_response_received(): Received usmStatsUnknownEngineIDs.0 Report-PDU with value 11769 error: [2520] Net::SNMP::__ANON__(): Received usmStatsUnknownEngineIDs.0 Report-PDU with value 11769 during discovery |
Nota:
Antes de realizar la edicion del archivo SNMP.pm es recomendable realizar un BKP, una vez realizado el BKP abrimos el archivo SNMP.pm ubicado en la ruta /usr/local/share/perl5/Net/
Buscar el siguiente apartado:
2620 if (($this->{_security}->discovered()) && 2621 ($this->{_error} =~ /usmStatsNotInTimeWindows/)) 2622 { 2623 $this->_error_clear(); 2624 DEBUG_INFO('discovery and synchronization complete'); 2625 return $this->_discovery_complete(); 2626 } 2627 2628 # If we received the usmStatsNotInTimeWindows report or no error, but 2629 # we are still not synchronized, provide a generic error message. 2630 2631 if ((!$this->{_error}) || ($this->{_error} =~ /usmStatsNotInTimeWindows/)) { 2632 $this->_error_clear(); 2633 $this->_error('Time synchronization failed during discovery'); 2634 } |
Nota: buscar con la siguiente linea: if (($this→{_security}→discovered())
Ya localizado el segmento se tiene que editar y comentar las líneas correspondientes quedando de la siguiente manera:
2620 if ( $this->{_security}->discovered() ) 2621# ($this->{_error} =~ /usmStatsNotInTimeWindows/)) 2622 { 2623 $this->_error_clear(); 2624 DEBUG_INFO('discovery and synchronization complete'); 2625 return $this->_discovery_complete(); 2626 } 2627 2628 # If we received the usmStatsNotInTimeWindows report or no error, but 2629 # we are still not synchronized, provide a generic error message. 2630 #LATAM Bypass "sincronización de tiempo" de SNMPv3 2631# if ((!$this->{_error}) || ($this->{_error} =~ /usmStatsNotInTimeWindows/)) { 2632# $this->_error_clear(); 2633# $this->_error('Time synchronization failed during discovery'); 2634# } |
Finalizando la edición es necesario reiniciar el servicio snmpd: service snmpd restart
Referencias:
Perl Net::SNMP Error: Time synchronization failed during discovery
https://rt.cpan.org/Public/Bug/Display.html?id=127094