- Este tópico contém 47 respostas, 7 vozes e foi atualizado pela última vez 15 anos, 2 meses atrás por rpedrosa1979.
-
AutorPosts
-
-
fevereiro 19, 2009 às 2:20 pm #43653rpedrosa1979Participante
Pessoal boa tarde,
Já não sei oque fazer mais, tenho um cliente que possui varias filiais e cada switch, router utiliza o NTP.
O NTP está instalado em uma maquina fedora , que faz referencia de sincronização em um outro IP, até ai tudo bem.
O serviço está ativo e rodando.Há duas semanas atrás obsersei que nenhum dos Switches do cliente está sincronizando.
Funcionou bem durante varios meses e agora parou tudo.Comandos que utilizei :
conf t
clock timezone GMT-3 -3
clock summer-time GMT-2 date Oct 14 2008 0:00 Feb 17 2009 0:00
ntp server “ip do meu servidor NTP”ai quando vc digita:
Switch-2#sh ntp associations
address ref clock st when poll reach delay offset disp
~192.168.0.247 0.0.0.0 16 – 64 0 0.0 0.00 16000.
* master (synced), # master (unsynced), + selected, – candidate, ~ configuredSwitch-2#sh ntp associations detail
192.168.0.247 configured, insane, invalid, unsynced, stratum 16
ref ID 0.0.0.0, time 00000000.00000000 (21:00:00.000 GMT-3 Thu Dec 31 1899)
our mode client, peer mode unspec, our poll intvl 64, peer poll intvl 64
root delay 0.00 msec, root disp 0.00, reach 0, sync dist 218613.571
delay 0.00 msec, offset 0.0000 msec, dispersion 16000.00
precision 2**5, version 3
org time 00000000.00000000 (21:00:00.000 GMT-3 Thu Dec 31 1899)
rcv time 00000000.00000000 (21:00:00.000 GMT-3 Thu Dec 31 1899)
xmt time CD48128D.965F2010 (14:17:01.587 GMT-3 Thu Feb 19 2009)
filtdelay = 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filtoffset = 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filterror = 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0Switch-2#sh ntp status
Clock is unsynchronized, stratum 16, no reference clock
nominal freq is 250.0000 Hz, actual freq is 249.9985 Hz, precision is 2**24
reference time is 00000000.00000000 (21:00:00.000 GMT-3 Thu Dec 31 1899)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.00 msec, peer dispersion is 0.00 msecSwitch-2#sh clock detail
.14:18:33.443 GMT-3 Thu Feb 19 2009 (coloquei na mão a hora)
Time source is NTP
Summer time starts 00:00:00 GMT-3 Tue Oct 14 2008
Summer time ends 00:00:00 GMT-2 Tue Feb 17 2009Alguem dotado de maior conhecimento do que o meu poderia me ajudar?
Um abraço Ricardo Pedrosa
-
fevereiro 19, 2009 às 3:26 pm #64169RODRIGOKDParticipante
Olá Ricardo,
Não posso te ajudar muito com relação à config dos switchs, mas tente o seguinte comando no Fedora:
tcpdump -nn ip proto \udp and port 123 and host “ip-do-switch”Com este comando vc poderá saber se o servidor ntp (Fedora) esta recebendo os pacotes NTP dos switchs.
Talvez isso possa te ajudar a isolar o problema.abs
Rodrigo Dallabona
-
fevereiro 19, 2009 às 3:43 pm #64170rpedrosa1979Participante
O meu servidor ntp está recebendo os pacotes.
[root@cacti-bmg ~]# tcpdump -nn ip proto \udp and port 123 and host 192.168.0.64
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
15:32:52.412244 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:33:56.413026 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 4815:35:00.413758 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:36:04.414590 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:37:08.415233 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:38:12.416003 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:39:16.417942 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:40:20.417455 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
15:41:24.418215 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
^C
9 packets captured
9 packets received by filter
0 packets dropped by kernel -
fevereiro 19, 2009 às 4:00 pm #64171Gustavo Rodrigues RamosParticipante
E não está respondendo :-).
-
fevereiro 19, 2009 às 4:01 pm #64172Gustavo Rodrigues RamosParticipante
Qual é a saída do comando “lsof -i udp:123” no seu servidor de NTP?
-
fevereiro 19, 2009 às 4:03 pm #64173rpedrosa1979Participante
Gustavo ele está respondendo sim.
Tá sim ou estou enganado? -
fevereiro 19, 2009 às 4:03 pm #64174RODRIGOKDParticipante
Pelo resultado do tcpdump, o Fedora esta recebendo os pacotes, mas não esta retornando… deveria haver uma linha mais ou menos assim:
… IP 192.168.0.247.123 > 192.168.0.64.123: NTPv3, Server, length 48
esta parecendo que o problema esta no servidor ntp
Veja um exemplo do tcpdump no meu servidor ntp:
15:57:00.830471 IP 10.10.10.13.123 > 10.10.10.10.123: NTPv4, Client, length 48
15:57:00.830745 IP 10.10.10.10.123 > 10.10.10.13.123: NTPv4, Server, length 48
15:57:00.831165 IP 10.10.10.13.123 > 10.10.10.10.123: NTPv4, Client, length 48
15:57:00.831245 IP 10.10.10.10.123 > 10.10.10.13.123: NTPv4, Server, length 48o ip 10.10.10.13 (cliente) solicita e o 10.10.10.10 (server) responde…
abs
Rodrigo Dallabona -
fevereiro 19, 2009 às 4:04 pm #64175rpedrosa1979Participante
Gustavo abaixo a saida do comando.
[root@cacti-bmg ~]# lsof -i udp:123
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
ntpd 23955 ntp 16u IPv4 2613638 UDP *:ntp
ntpd 23955 ntp 17u IPv6 2613639 UDP *:ntp
ntpd 23955 ntp 18u IPv6 2613643 UDP localhost6.localdomain6:ntp
ntpd 23955 ntp 19u IPv6 2613644 UDP [fe80::20c:29ff:fef8:8e56]:ntp
ntpd 23955 ntp 20u IPv4 2613645 UDP cacti-bmg:ntp
ntpd 23955 ntp 21u IPv4 2613646 UDP 192.168.0.247:ntp -
fevereiro 19, 2009 às 4:08 pm #64176Gustavo Rodrigues RamosParticipante
Você tem iptables ativado no fedora?
E, não, pela saída do tcpdump, o fedora não está respondendo.
-
fevereiro 19, 2009 às 4:11 pm #64177Gustavo Rodrigues RamosParticipante
Ah! e o daemon do ntp está com a porta 123/udp aberta. Resta saber se ele está sincronizando com uma fonte confiável. Dê uma olhada no /var/log/messages em busca de alguma informações de sincronização ou não. Eu não lembro se o fedora tem alguma coisa como o ntp-status.. ntpdate, etc…. mas vale procurar…
-
fevereiro 19, 2009 às 4:11 pm #64178rpedrosa1979Participante
Minha praia maior é com cisco, Linux eu apanho um pouco, mas vamos lá..
[root@cacti-bmg ~]# yum -y update iptables
Configurando o processo de atualização
Nenhum pacote marcado para atualização
[root@cacti-bmg ~]# yum -y install iptables
Configurando o processo de instalação
Analisando argumentos da instalação de pacotes
O pacote iptables-1.4.1.1-2.fc8.i386 já está instalado em sua última versão
Nada a ser feito -
fevereiro 19, 2009 às 4:13 pm #64179Gustavo Rodrigues RamosParticipante
cara, veja se o iptables tem alguma regra. tente iptables -nvL (mas não post aqui as suas regras !!!!). Veja se a chain INPUT está como ACCEPT.. Se estiver então não é isso.
-
fevereiro 19, 2009 às 4:16 pm #64180rpedrosa1979Participante
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
533K 66M RH-Firewall-1-INPUT all — * * 0.0.0.0/0 0.0.0.0/0Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
Chain OUTPUT (policy ACCEPT 438K packets, 128M bytes)
Chain RH-Firewall-1-INPUT (1 references) -
fevereiro 19, 2009 às 4:17 pm #64181Gustavo Rodrigues RamosParticipante
Ótimo, não é isso. Como está configurado o seu ntp server ? 🙂 Na verdade, a pergunta é, foi feita alguma alteração ?
-
fevereiro 19, 2009 às 4:19 pm #64182rpedrosa1979Participante
vc fala dentro do Sw ou dentro do vi /etc/ntpd.conf ?
dentro do SW:
conf t
clock timezone GMT-3 -3
clock summer-time GMT-2 date Oct 14 2008 0:00 Feb 17 2009 0:00
ntp server “ip do meu servidor NTP” -
fevereiro 19, 2009 às 4:20 pm #64183Gustavo Rodrigues RamosParticipante
pergunta básica. Você já tentou reiniciar o ntpd no fedora ?
killall -HUP ntpd
-
fevereiro 19, 2009 às 4:20 pm #64184Gustavo Rodrigues RamosParticipante
no ntpd.conf do linux… é o linux que não está respondendo… o sw está ok.
-
fevereiro 19, 2009 às 4:23 pm #64185rpedrosa1979Participante
[root@cacti-bmg ~]# vi /etc/ntp.conf
# “memoria” para o escorregamento de frequencia do micro
# pode ser necessario criar esse arquivo manualmente com
# o comando touch ntp.drift
driftfile /etc/ntp.drift# estatisticas do ntp que permitem verificar o historico
# de funcionamento e gerar graficos
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable# servidores publicos do projeto ntp.br
server a.ntp.br iburst
server b.ntp.br iburst
server c.ntp.br iburst# outros servidores
# server outro-servidor.dominio.br iburst# configuracoes de restricao de acesso
restrict default kod notrap nomodify nopeer
“/etc/ntp.conf” 23L, 737C -
fevereiro 19, 2009 às 4:26 pm #64186Gustavo Rodrigues RamosParticipante
Veja se os logs estão ok no diretório /var/log/ntpstats/…
-
fevereiro 19, 2009 às 4:29 pm #64187Gustavo Rodrigues RamosParticipante
Lembrei.. tenta o comando “ntpstat” no fedora…
-
fevereiro 19, 2009 às 4:32 pm #64188rpedrosa1979Participante
[root@cacti-bmg ~]# ntpstat
synchronised to NTP server (200.160.0.8) at stratum 3
time correct to within 960 ms
polling server every 64 s -
fevereiro 19, 2009 às 4:35 pm #64189Gustavo Rodrigues RamosParticipante
service ntpd restart 🙂 (isso é no fedora…)
-
fevereiro 19, 2009 às 4:36 pm #64190rpedrosa1979Participante
ehhe.. eu sei Gustavo , nao tem como dar esse comando no switch.. hehe
[root@cacti-bmg ~]# service ntpd restart
Desligando o ntpd: [ OK ]
Iniciando o ntpd: [ OK ] -
fevereiro 19, 2009 às 4:40 pm #64191Gustavo Rodrigues RamosParticipante
Agora faça o seguinte, deixe o tcpdump rolando no fedora… desconfigure o ntp em um dos switches e configure novamente (reset!! :-D) e veja o que aparece no tcpdump… a comunicação tem que ser ida e volta ….
-
fevereiro 19, 2009 às 4:43 pm #64192rpedrosa1979Participante
ok, vou fazer isso..
Switch-2(config)#no ntp server 192.168.0.247
Só nao posso resetar o meu swtich -
fevereiro 19, 2009 às 4:44 pm #64193rpedrosa1979Participante
É não deu… ah nem viu…
Switch-2#sh ntp status
Clock is unsynchronized, stratum 16, no reference clock
nominal freq is 250.0000 Hz, actual freq is 249.9985 Hz, precision is 2**24
reference time is 00000000.00000000 (21:00:00.000 GMT-3 Thu Dec 31 1899)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.00 msec, peer dispersion is 0.00 msec[root@cacti-bmg ~]# tcpdump -nn ip proto \udp and port 123 and host 192.168.0.64
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
16:43:47.506241 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:48.506310 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:49.506346 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:50.506365 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:51.506416 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:52.506450 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:53.506514 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:54.506528 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:55.506586 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:56.506628 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:57.506670 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:58.506716 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:43:59.506756 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
16:44:00.506781 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
^C
14 packets captured
14 packets received by filter
0 packets dropped by kernel -
fevereiro 19, 2009 às 4:45 pm #64194Gustavo Rodrigues RamosParticipante
Não tem nenhuma mensagem no seu messages sobre o ntp ?
cat /var/log/messages | grep ntpd
-
fevereiro 19, 2009 às 4:51 pm #64195rpedrosa1979Participante
Feb 19 00:05:52 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 00:40:02 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 00:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 00:57:06 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 01:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 02:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 02:56:37 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 03:13:40 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 03:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 03:47:51 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 04:04:54 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 04:39:03 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 04:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 04:56:07 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 05:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 06:04:23 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 06:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 07:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 08:21:00 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 08:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 09:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 10:37:35 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 10:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 11:28:51 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 11:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 12:20:07 cacti-bmg ntpd[23955]: synchronized to 200.189.40.8, stratum 2
Feb 19 12:41:09 cacti-bmg ntpd[23955]: synchronized to 200.160.0.8, stratum 2
Feb 19 12:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 13:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 15:27:55 cacti-bmg ntpd[23955]: kernel time sync status change 4001
Feb 19 15:45:34 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 16:19:10 cacti-bmg ntpd[23955]: kernel time sync status change 0001
Feb 19 16:21:40 cacti-bmg ntpd[23955]: ntpd exiting on signal 1
Feb 19 16:21:40 cacti-bmg ntpd[23955]: can’t open /etc/ntp.drift.TEMP: Permissio n denied
Feb 19 16:25:53 cacti-bmg ntpd[9229]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 16:25:53 cacti-bmg ntpd[9230]: precision = 3.000 usec
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #0 wildcard, 0.0.0. 0#123 Disabled
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #2 lo, ::1#123 Enab led
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #3 eth0, fe80::20c: 29ff:fef8:8e56#123 Enabled
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #4 lo, 127.0.0.1#12 3 Enabled
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Listening on interface #5 eth0, 192.168.0. 247#123 Enabled
Feb 19 16:25:53 cacti-bmg ntpd[9230]: kernel time sync status 0040
Feb 19 16:25:53 cacti-bmg ntpd[9230]: Frequency format error in /etc/ntp.drift
Feb 19 16:26:00 cacti-bmg ntpd[9230]: synchronized to 200.189.40.8, stratum 2
Feb 19 16:26:00 cacti-bmg ntpd[9230]: kernel time sync status change 0001
Feb 19 16:29:09 cacti-bmg ntpd[9230]: synchronized to 200.160.0.8, stratum 2
Feb 19 16:36:39 cacti-bmg ntpd[9230]: ntpd exiting on signal 15
Feb 19 16:36:39 cacti-bmg ntpd[9230]: can’t open /etc/ntp.drift.TEMP: Permission denied
Feb 19 16:36:40 cacti-bmg ntpd[9373]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 16:36:40 cacti-bmg ntpd[9374]: precision = 3.000 usec
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #0 wildcard, 0.0.0. 0#123 Disabled
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #2 lo, ::1#123 Enab led
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #3 eth0, fe80::20c: 29ff:fef8:8e56#123 Enabled
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #4 lo, 127.0.0.1#12 3 Enabled
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Listening on interface #5 eth0, 192.168.0. 247#123 Enabled
Feb 19 16:36:40 cacti-bmg ntpd[9374]: kernel time sync status 0040
Feb 19 16:36:40 cacti-bmg ntpd[9374]: Frequency format error in /etc/ntp.drift
Feb 19 16:36:47 cacti-bmg ntpd[9374]: synchronized to 200.160.0.8, stratum 2
Feb 19 16:36:47 cacti-bmg ntpd[9374]: kernel time sync status change 0001
Feb 19 16:47:57 cacti-bmg ntpd[9374]: ntpd exiting on signal 15
Feb 19 16:47:57 cacti-bmg ntpd[9374]: can’t open /etc/ntp.drift.TEMP: Permission denied
Feb 19 16:47:57 cacti-bmg ntpd[9507]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 16:47:57 cacti-bmg ntpd[9508]: precision = 4.000 usec
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #0 wildcard, 0.0.0. 0#123 Disabled
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #2 lo, ::1#123 Enab led
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #3 eth0, fe80::20c: 29ff:fef8:8e56#123 Enabled
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #4 lo, 127.0.0.1#12 3 Enabled
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Listening on interface #5 eth0, 192.168.0. 247#123 Enabled
Feb 19 16:47:57 cacti-bmg ntpd[9508]: kernel time sync status 0040
Feb 19 16:47:57 cacti-bmg ntpd[9508]: Frequency format error in /etc/ntp.drift
Feb 19 16:48:04 cacti-bmg ntpd[9508]: synchronized to 200.160.0.8, stratum 2
Feb 19 16:48:04 cacti-bmg ntpd[9508]: kernel time sync status change 0001 -
fevereiro 19, 2009 às 4:58 pm #64196Gustavo Rodrigues RamosParticipante
Tente:
#touch /etc/ntp.drift
e depois troque a linha abaixo do arquivo ntp.conf:
De:
restrict default kod notrap nomodify nopeer
Para:
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
OU
restrict default nomodify notrapEssa é a minha última sugestão! 🙂
-
fevereiro 19, 2009 às 4:59 pm #64197Gustavo Rodrigues RamosParticipante
E re-inicie o ntpd 🙂 rssss
-
fevereiro 19, 2009 às 4:59 pm #64198RODRIGOKDParticipante
tente isto no fedora:
touch /etc/ntp.drift
chown ntp /etc/ntp.drift
chmod 644 /etc/ntp.drifte reinicie o NTP
Rodrigo Dallabona
-
fevereiro 19, 2009 às 5:00 pm #64199RODRIGOKDParticipante
Desculpe Gustavo, não vi que vc já tinha postado…
-
fevereiro 19, 2009 às 5:06 pm #64200rpedrosa1979Participante
Gustavo agradeço a sua atençao, ainda não funcionou .
Obrigado mesmo. -
fevereiro 19, 2009 às 5:23 pm #64201rpedrosa1979Participante
E se alguem mais puder me ajudar serei muito grato
-
fevereiro 19, 2009 às 5:44 pm #64202Gustavo Rodrigues RamosParticipante
cat /var/log/messages | grep ntpd | grep “Feb 19 17”
Eu sou brasileiro… 🙂
-
fevereiro 19, 2009 às 5:52 pm #64203rpedrosa1979Participante
tb sou brasileio e …
[root@cacti-bmg ~]# cat /var/log/messages | grep ntpd | grep “Feb 19 17”
Feb 19 17:05:48 cacti-bmg ntpd[9508]: ntpd exiting on signal 15
Feb 19 17:05:48 cacti-bmg ntpd[9508]: can’t open /etc/ntp.drift.TEMP: Permission denied
Feb 19 17:05:49 cacti-bmg ntpd[9709]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 17:05:49 cacti-bmg ntpd[9710]: precision = 3.000 usec
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #2 lo, ::1#123 Enabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #3 eth0, fe80::20c:29ff:fef8:8e56#123 Enabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Listening on interface #5 eth0, 192.168.0.247#123 Enabled
Feb 19 17:05:49 cacti-bmg ntpd[9710]: kernel time sync status 0040
Feb 19 17:05:49 cacti-bmg ntpd[9710]: Frequency format error in /etc/ntp.drift
Feb 19 17:05:56 cacti-bmg ntpd[9710]: synchronized to 200.160.0.8, stratum 2
Feb 19 17:05:56 cacti-bmg ntpd[9710]: kernel time sync status change 0001
Feb 19 17:07:33 cacti-bmg ntpd[9710]: ntpd exiting on signal 15
Feb 19 17:07:33 cacti-bmg ntpd[9710]: can’t open /etc/ntp.drift.TEMP: Permission denied
Feb 19 17:07:33 cacti-bmg ntpd[9744]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 17:07:33 cacti-bmg ntpd[9745]: precision = 3.000 usec
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #2 lo, ::1#123 Enabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #3 eth0, fe80::20c:29ff:fef8:8e56#123 Enabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Listening on interface #5 eth0, 192.168.0.247#123 Enabled
Feb 19 17:07:33 cacti-bmg ntpd[9745]: kernel time sync status 0040
Feb 19 17:07:33 cacti-bmg ntpd[9745]: Frequency format error in /etc/ntp.drift
Feb 19 17:07:40 cacti-bmg ntpd[9745]: synchronized to 200.160.0.8, stratum 2
Feb 19 17:07:40 cacti-bmg ntpd[9745]: kernel time sync status change 0001
Feb 19 17:13:37 cacti-bmg ntpd[9745]: ntpd exiting on signal 15
Feb 19 17:13:37 cacti-bmg ntpd[9745]: can’t open /etc/ntp.drift.TEMP: Permission denied
Feb 19 17:15:36 cacti-bmg ntpd[1916]: ntpd [email protected]-o Tue Apr 15 14:22:58 UTC 2008 (1)
Feb 19 17:15:36 cacti-bmg ntpd[1917]: precision = 2.000 usec
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #1 wildcard, ::#123 Disabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #2 lo, ::1#123 Enabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #3 eth0, fe80::20c:29ff:fef8:8e56#123 Enabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Listening on interface #5 eth0, 192.168.0.247#123 Enabled
Feb 19 17:15:36 cacti-bmg ntpd[1917]: kernel time sync status 0040
Feb 19 17:15:36 cacti-bmg ntpd[1917]: Frequency format error in /etc/ntp.drift
Feb 19 17:15:43 cacti-bmg ntpd[1917]: synchronized to 200.160.0.8, stratum 2
Feb 19 17:15:25 cacti-bmg ntpd[1917]: time reset -17.079489 s
Feb 19 17:18:42 cacti-bmg ntpd[1917]: synchronized to 200.189.40.8, stratum 2
Feb 19 17:29:27 cacti-bmg ntpd[1917]: synchronized to 200.160.0.8, stratum 2
Feb 19 17:30:19 cacti-bmg ntpd[1917]: synchronized to 200.192.232.8, stratum 2
Feb 19 17:30:41 cacti-bmg ntpd[1917]: kernel time sync status change 0001
Feb 19 17:41:23 cacti-bmg ntpd[1917]: synchronized to 200.189.40.8, stratum 2
Feb 19 17:49:47 cacti-bmg ntpd[1917]: synchronized to 200.192.232.8, stratum 2 -
fevereiro 19, 2009 às 5:57 pm #64204Gustavo Rodrigues RamosParticipante
chown ntp /etc/ntp.drift
chmod 644 /etc/ntp.driftE tira a linha de restrict do ntp.conf. Restart.
-
fevereiro 19, 2009 às 6:01 pm #64205RODRIGOKDParticipante
o problema não é só na permissão de gravação no arquivo ntp.drift, pois o NTP tbem tenta criar um arquivo temporário em /etc/ e não consegue
minha sugestão:
Altere o arquivo ntpd.conf:
De: driftfile /etc/ntp.drift
Para: driftfile /var/lib/ntp/driftExecute:
mkdir /var/lib/ntp
touch /var/lib/ntp/drift
chown ntp -R /var/lib/ntpReinicie o ntp
-
fevereiro 19, 2009 às 6:02 pm #64206rpedrosa1979Participante
vou testar.. vlw
-
fevereiro 19, 2009 às 9:35 pm #64207EdsonParticipante
Meus caros, li toda a saga e espero que dê tudo certo. Parabéns!
-
fevereiro 19, 2009 às 11:03 pm #64208miovieiraParticipante
Pelo que vi, o router está mandando NTP version 3, para o Fedora.
Se no Fedora não estiver configurado para version 3, apresentará problemas.
Como não sei como verifica a versão do NTP no Fedora, aconselhor vc fazer o seguinte no router:
enable
config t
ntp server 192.168.0.247 version 1 (Aí vc testa, vê se sincronizou) se não sincronizou ntp server 192.168.0.247 version 2.
O default do Cisco é mandar ntp version 3, pq foram implementadas algumas melhorias.
Bom, caso não funcione aí vc fala com o Gustavo..rs
Sorte. -
fevereiro 20, 2009 às 10:31 am #64209Gustavo Rodrigues RamosParticipante
miovieira, essa é a melhor dica que eu vi até agora… 🙂
-
fevereiro 20, 2009 às 11:18 am #64210vstrabelloParticipante
Estranho, quando fui mexer com NTP por curiosidade o único problema fio que estava com uma diferença de 2 horas!
-
fevereiro 20, 2009 às 11:49 am #64211Gustavo Rodrigues RamosParticipante
Esse tipo de diferença é do timezone aplicado no sistema operacional (independente de ser IOS, Windows, Linux ou JunOS).
O NTP ajusta o relógio de acordo com o horário GMT. Não haverá diferença no ajuste, mas pode haver diferença na forma de mostrar o horário depois de aplicado o timezone pelo sistema operacional.
-
fevereiro 20, 2009 às 11:58 am #64212rpedrosa1979Participante
Boa tarde pessoal, vou testar essas configurações que ainda não foram feitas por mim.
Estava no cliente hoje de manha. -
fevereiro 20, 2009 às 1:52 pm #64213Alexandre AvelarParticipante
vstrabello, esta diferença não é problema. Você deve configurar o timezone do Brasil, ou seja, -3;
#clock timezone BR -3. é algo assim. -
fevereiro 20, 2009 às 2:12 pm #64214rpedrosa1979Participante
Pessoal, como não tenho nada configurado no meu iptables, eu desabilitei o serviço e agora o NTP está funcionando perfeitamente.
OBRIGADO A TODOS AMIGOS QUE ME AJUDARAM.
VLW GUSTAVO.
[root@cacti-bmg ~]# tcpdump -nn ip proto \udp and port 123 and host 192.168.0.64
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
14:11:34.374800 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
14:11:34.375097 IP 192.168.0.247.123 > 192.168.0.64.123: NTPv3, Server, length 48
14:12:38.375622 IP 192.168.0.64.123 > 192.168.0.247.123: NTPv3, Client, length 48
14:12:38.375950 IP 192.168.0.247.123 > 192.168.0.64.123: NTPv3, Server, length 4 -
fevereiro 20, 2009 às 2:20 pm #64215rpedrosa1979Participante
clock timezone GMT-3 -3
clock summer-time GMT-2 date Oct 14 2008 0:00 Feb 17 2009 0:00Eu recomendo usar esse parametro no switch, pra quem tem ou teve problema com horario de verão
-
-
AutorPosts
- Você deve fazer login para responder a este tópico.