L'output del comando ntpstat mostra "non sincronizzato":
# ntpstat unsynchronised time server re-starting
L'output del comando "ntpq -p" mostra che nessuno dei server ntp è stato scelto:
# ntpq -p ========================================== remote refid st t when poll reach delay offset jitter =============================================== ntp-server .INIT. 16 u - 16 0 0.000 0.000 0.000 ntp-server .INIT. 16 u - 16 0 0.000 0.000 0.000
L'output del comando as mostra che entrambi i server ntp sono stati rifiutati:
# ntpq> as ind assID status conf reach auth condition last_event cnt =========================================================== 1 54459 8000 yes yes none reject 2 54460 8000 yes yes none reject
L'output del comando rv mostra che entrambi i server ntp sono nello stato "non raggiungibile":
# ntpq> rv 54459 assID=54459 status=8000 unreach, conf, no events, srcadr=, srcport=123, dstadr=x.x.x.x, dstport=123, leap=11, ..........
# ntpq> rv 54460 assID=54460 status=8000 unreach, conf, no events, srcadr=, srcport=123, dstadr=x.x.x.x, dstport=123, leap=11, ..........
La soluzione
"Limita predefinito ignora ” nel file di configurazione ntp impedisce l'accesso dal server ntp remoto. Il file di configurazione ntp è il seguente:
# cat /etc/ntp.conf restrict default kod nomodify notrap nopeer noquery ignore restrict -6 default kod nomodify notrap nopeer noquery ignore ...
"restrict default ignore" impedirà l'accesso non solo da tutti i client ma anche da tutti i server ntp remoti.
Soluzione 1
1. Modifica /etc/ntp.conf e modificare la configurazione per consentire l'accesso illimitato da tutte le macchine:
Cambia da:
restrict default kod nomodify notrap nopeer noquery ignore restrict -6 default kod nomodify notrap nopeer noquery ignore
A
restrict default restrict -6 default
2. Riavvia il servizio ntpd:
# service ntpd restart
3. Attendi qualche minuto, quindi esegui "ntpq -p" per verificare se funziona.
Soluzione 2
1. Modifica /etc/ntp.conf e modificare la configurazione per consentire l'accesso illimitato da un server ntp specifico:
Cambia da:
restrict default kod nomodify notrap nopeer noquery ignore restrict -6 default kod nomodify notrap nopeer noquery ignore
A
restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict xxx.xxx.xxx.xxx (IP address of a specific ntp server)
2. Riavvia il servizio ntpd:
# service ntpd restart
3. Attendi qualche minuto, quindi esegui "ntpq -p" per verificare se funziona.