Eu tenho dois servidores ntp com um servidor cliente.
Os servidores NTP estão sincronizados com o tempo OK.
O cliente ficou preso no .INIT. passo, mas a sincronização funciona manualmente.
O ping do cliente e permitiram políticas com servidores NTP.
Todas as máquinas estão na versão do CentOS 7.
Firewallinng:
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client ssh ntp
ports: 443/tcp 123/tcp 123/udp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
Exibir o estado do cliente ntp:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.0.0.1 .INIT. 16 u - 64 0 0.000 0.000 0.000
10.0.0.2 .INIT. 16 u - 64 0 0.000 0.000 0.000
Tente:
# ntpdate -d -d -d -d 10.0.0.1
9 Jan 13:38:30 ntpdate[17833]: ntpdate [email protected] Wed Apr 12 21:24:06 UTC 2017 (1)
Looking for host 10.0.0.1 and service ntp
host found : 10.0.0.1
transmit(10.0.0.1)
transmit to 10.0.0.1
receive(10.0.0.1)
offset: 0.063550, delay 0.00024
transmit(10.0.0.1)
transmit to 10.0.0.1
receive(10.0.0.1)
offset: 0.063537, delay 0.00027
transmit(10.0.0.1)
transmit to 10.0.0.1
receive(10.0.0.1)
offset: 0.063543, delay 0.00034
transmit(10.0.0.1)
transmit to 10.0.0.1
receive(10.0.0.1)
offset: 0.063526, delay 0.00023
server 10.0.0.1, port 123
stratum 3, precision -23, leap 00, trust 000
refid [10.0.0.1], delay 0.02585, dispersion 0.00000
transmitted 4, in filter 4
reference time: ddff34f7.aeaac96d Tue, Jan 9 2018 13:32:55.682
originate timestamp: ddff364c.fb3327e5 Tue, Jan 9 2018 13:38:36.981
transmit timestamp: ddff364c.eae5727e Tue, Jan 9 2018 13:38:36.917
filter delay: 0.02586 0.02589 0.02596 0.02585
0.00000 0.00000 0.00000 0.00000
filter offset: 0.063550 0.063537 0.063543 0.063526
0.000000 0.000000 0.000000 0.000000
delay 0.02585, dispersion 0.00000
offset 0.063526
9 Jan 13:38:36 ntpdate[17833]: adjust time server 10.0.0.1 offset 0.063526 sec
Tudo bem
Segunda tentativa:
# ntpdate -u 10.0.0.1
9 Jan 13:39:38 ntpdate[17836]: adjust time server 10.0.0.1 offset 0.063340 sec
Tudo bem
Encontrei um tópico do RHEL com problemas de IPv4 / IPv6:
link
Eu adiciono o parâmetro "-4" ao arquivo ntpd:
# cat /etc/sysconfig/ntpd
# Command line options for ntpd
OPTIONS="-g -4"
Eu repito o teste completo e o resultado é o mesmo.
Eu verifico o serviço de status:
# systemctl status ntpd
? ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: active (running) since mar. 2018-01-09 13:40:21 CET; 3s ago
Process: 17863 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 17864 (ntpd)
CGroup: /system.slice/ntpd.service
+-17864 /usr/sbin/ntpd -u ntp:ntp -g -4
janv. 09 13:40:21 client_server systemd[1]: Starting Network Time Service...
janv. 09 13:40:21 client_server systemd[1]: Started Network Time Service.
janv. 09 13:40:21 client_server ntpd[17864]: proto: precision = 0.130 usec
janv. 09 13:40:21 client_server ntpd[17864]: 0.0.0.0 c01d 0d kern kernel time sync enabled
Eu não vi nenhum problema ... Mas com o ntpq -p, o NTP parou no .INIT. passo.
Alguém tem uma ideia, por favor?