#1 Le 03/02/2013, à 00:24
- bwaman
[RÉSOLU] problème synchronisation NTP ubntu 12.10
Bonjour a tous
je me tourne vers vous par ce que je n'arrive pas faire le mise a jour de l'horloge de mon ordinateur par internet
voila ce que j'ai si je force la mise a jour
ntpdate ntp.ubuntu.com
2 Feb 05:01:14 ntpdate[20348]: the NTP socket is in use, exiting
voila mon fichier ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#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# Specify one or more NTP servers.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support … strictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
le retour de la commande ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
173.244.211.10. .INIT. 16 u - 1024 0 0.000 0.000 0.000
soft-sea-01.ser .INIT. 16 u - 1024 0 0.000 0.000 0.000
stratum-2-core- .INIT. 16 u - 1024 0 0.000 0.000 0.000
pool-test.ntp.o .INIT. 16 u - 1024 0 0.000 0.000 0.000
nist1-chi.ustim .INIT. 16 u - 1024 0 0.000 0.000 0.000
europium.canoni .INIT. 16 u - 1024 0 0.000 0.000 0.000
service ntp status
* NTP server is running
si quelqu'un peut m'aiguiller
Dernière modification par bwaman (Le 05/02/2013, à 19:40)
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#2 Le 03/02/2013, à 01:02
- toutafai
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Bonsoir,
Visiblement, il ton serveur n'arrive pas /ne c'est jamais synchronisé à d'autre serveur NTP, d'ou les 2 questions suivantes :
as tu autorisé le port NTP dans iptables ?
as tu redirigé le port NTP dans ton routeur/box vers ton serveur ?
Tombé dans l'informatique étant petit, j'en ai fait mon métier. Utilisateur d'Ubuntu depuis novembre 2006, actuellement sous 20.04 x64 (Que d'évolution
depuis Dapper Drake ! Ça rajeunit pas ^^^).
Hors ligne
#3 Le 04/02/2013, à 04:48
- bwaman
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Salut
alors pour iptable c'est du d'origine je ne l'ai jamais modifier' pour la box routeur je ne peut pas répondre je suis dans une résidence ou on ce partage la connexion internet.
Donc on peut supposé que le port NTP est bloquer c'est quand même bizard windows utilise aussi ce port si je ne m'abuse
si c'est bien sa j'irai voir l'administrateur réseau
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#4 Le 04/02/2013, à 20:01
- toutafai
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
ben déjà il est bloqué au niveau d'iptables (au passage ufw est une interfaces graphique d'iptables permettant d'eviter la ligne de commande pour configurer iptables...)
Si windows arrive a utiliser ce port (choses à vérifier quand même) c'est que le port NTP est autorisé et diffusé sur le réseau local par la box/routeur en utilisant de la redirection de port via de l' UPnp par exemple...si c'est bien le cas, inutile de creuser du coté de la box/routeur.
Tombé dans l'informatique étant petit, j'en ai fait mon métier. Utilisateur d'Ubuntu depuis novembre 2006, actuellement sous 20.04 x64 (Que d'évolution
depuis Dapper Drake ! Ça rajeunit pas ^^^).
Hors ligne
#5 Le 05/02/2013, à 01:48
- bwaman
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
bonjour (ou bonsoir vive le décalage horaire ),
je pensé que iptable par défaut l'aissé tous passé (pas de règle spécifique)
j'ai installer ufw je l'ai configuré et sa na rien donné, comme règle j'ai mis 123/udp autorisé entrent et sortant , source n'importe ou
voila ce que j'ai
sudo ntpdate ntp.ubuntu.com
Error resolving ntp.ubuntu.com: Name or service not known (-2)
2 Feb 01:06:26 ntpdate[31387]: Can't find host ntp.ubuntu.com: Name or service not known (-2)
est ce que j'ai mal configuré le pare feu ?
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#6 Le 05/02/2013, à 03:11
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Le port NTP doit être ouvert seulement si la machine joue le rôle de serveur NTP, pas dans le cas de client NTP....
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#7 Le 05/02/2013, à 19:40
- bwaman
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
salut
bon j'ai trouver le port 123 est bien bloquer au niveau du routeur donc impossible de synchroniser, je vais voir avec l'administrateur réseau
merci pour votre aide je passe en résolu
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#8 Le 05/02/2013, à 20:02
- grandtoubab
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Salut,
Voila mon fichier
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#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
# You do need to talk to an NTP server or two (or three).
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
#http://www.manpagez.com/man/5/ntp.conf/
# utilisation des serveur stratum classe 2 http://www.cru.fr/services/ntp/serveurs_francais
server ntp.ensma.fr iburst
server ntp.internet-fr.net iburst
et ça marche
@ubuntu-desktop:~$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+diane.ensma.fr 131.188.3.221 2 u 527 1024 377 50.435 0.550 2.234
*ntp.internet-fr 195.220.94.163 2 u 307 1024 377 38.874 1.301 1.683
Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....
Hors ligne
#9 Le 05/02/2013, à 21:40
- toutafai
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
One Point :--)
Tombé dans l'informatique étant petit, j'en ai fait mon métier. Utilisateur d'Ubuntu depuis novembre 2006, actuellement sous 20.04 x64 (Que d'évolution
depuis Dapper Drake ! Ça rajeunit pas ^^^).
Hors ligne
#10 Le 05/02/2013, à 21:54
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Je persiste et je signe....
Quand je fais ça sur mon PC (avec l'IP d'un serveur NTP)
ntpdate 195.220.94.163
5 Feb 20:51:21 ntpdate[21042]: adjust time server 195.220.94.163 offset -0.241787 sec
Ça marche et je n'ai pas installé NTP server et je n'ai pas ouvert le port 123 et j'ai même rien fais parce que ntpdate est installé en standard avec Ubuntu....
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#11 Le 05/02/2013, à 22:03
- grandtoubab
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Je persiste et je signe....
Quand je fais ça sur mon PC (avec l'IP d'un serveur NTP)ntpdate 195.220.94.163 5 Feb 20:51:21 ntpdate[21042]: adjust time server 195.220.94.163 offset -0.241787 sec
Ça marche et je n'ai pas installé NTP server et je n'ai pas ouvert le port 123 et j'ai même rien fais parce que ntpdate est installé en standard avec Ubuntu....
ntpdate c'est en mode commande, il faut que tu le lances toi même
ntp c'est un deamon qui tourne tout seul en se basant sur le fichier /etc/ntp.conf
@ubuntu-desktop:~$ ps -edf | grep ntp
ntpd 2159 1 0 Feb03 ? 00:00:13 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 114:127
voir les manuels
man ntpd
The ntpd program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers
man ntpdate
ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the server arguments to determine the correct time
Le serveur c'est la machine sur laquelle on se synchronise, dans une utilisation familiale le Pc est le client
voici les paquets installés chez moi:
@ubuntu-desktop:~$ sudo dpkg -l | grep ntp
ii ntp 1:4.2.6.p3+dfsg-1ubuntu3.1 Network Time Protocol daemon and utility programs
ii ntpdate 1:4.2.6.p3+dfsg-1ubuntu3.1 client for setting system time from NTP servers
Dernière modification par grandtoubab (Le 05/02/2013, à 22:11)
Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....
Hors ligne
#12 Le 06/02/2013, à 00:00
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Bonjour a tous
je me tourne vers vous par ce que je n'arrive pas faire le mise a jour de l'horloge de mon ordinateur par internet
voila ce que j'ai si je force la mise a journtpdate ntp.ubuntu.com 2 Feb 05:01:14 ntpdate[20348]: the NTP socket is in use, exiting
@grantoubab: Quelle était la question déjà ???
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#13 Le 06/02/2013, à 14:14
- grandtoubab
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
bwaman a écrit :Bonjour a tous
je me tourne vers vous par ce que je n'arrive pas faire le mise a jour de l'horloge de mon ordinateur par internet
voila ce que j'ai si je force la mise a journtpdate ntp.ubuntu.com 2 Feb 05:01:14 ntpdate[20348]: the NTP socket is in use, exiting
@grantoubab: Quelle était la question déjà ???
je me tourne vers vous par ce que je n'arrive pas faire le mise a jour de l'horloge de mon ordinateur par internet
c'est le rôle du daemon ntpd
Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....
Hors ligne
#14 Le 06/02/2013, à 14:27
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
ntpdate le fait très bien aussi....et à ce qu'il me semble c'est ce qui est utilisé en standard dans Ubuntu.
Lorsque dans les propriétés système -> date et heure, l'utilisateur choisi d'avoir son heure calée sur le temps internet, Ubuntu n'installe pas 'ntpd'.
Il récupère l'heure avec ntpdate à chaque lancement du PC et c'est bien suffisant.
Alors je veux bien qu'une simple question, qui demandait juste une explication d'utilisation d'Ubuntu, amène une grande discussion sur ntpd, son paramétrage, les ports, les Box internet, les FAI, etc, etc, mais à mon avis le prochain pékin qui se posera la même question et qui va tomber sur ce sujet va zapper à vitesse grand V.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#15 Le 06/02/2013, à 18:37
- grandtoubab
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
mais à mon avis le prochain pékin qui se posera la même question et qui va tomber sur ce sujet va zapper à vitesse grand V.
Bien dit toutefois la réponse au problème initial c'est que l'on ne peut pas lancer ntpdate si le daemon est activé
@ubuntu-desktop:/usr/sbin$ sudo ntpdate ntp.ubuntu.com
6 Feb 17:26:22 ntpdate[9442]: the NTP socket is in use, exiting
Donc j'arrete le daemon:
@ubuntu-desktop:/usr/sbin$ sudo /etc/init.d/ntp stop
* Stopping NTP server ntpd [ OK ]
Et je peux donc utiliser ntpdate:
@ubuntu-desktop:/usr/sbin$ sudo ntpdate ntp.ubuntu.com
6 Feb 17:30:54 ntpdate[9495]: adjust time server 91.189.94.4 offset -0.000980 sec
Mais comme j'aime bien que daemon le fasse automatiquement
@ubuntu-desktop:/usr/sbin$ sudo /etc/init.d/ntp start
* Starting NTP server ntpd [ OK ]
Pour info sur ntpdate dans Ubuntu
http://askubuntu.com/questions/217463/w … 486#232486
Dernière modification par grandtoubab (Le 06/02/2013, à 18:41)
Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....
Hors ligne
#16 Le 06/02/2013, à 19:06
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Bien dit toutefois la réponse au problème initial c'est que l'on ne peut pas lancer ntpdate si le daemon est activé
Mais c'est justement pour ça qu'il ne faut pas l'installer.
A moins d'être enclin à la paranoïa de l'heure et de ne pas pouvoir vivre sans être sur que son PC ne s'est pas décalé de 0,0002 secondes dans la journée.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#17 Le 06/02/2013, à 19:36
- grandtoubab
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
je n'eteints pas ma machine donc pour éviter la dérive j'ai besoin de ntpd.
voir les infos officielles en anglais
https://help.ubuntu.com/12.04/serverguide/NTP.html
Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....
Hors ligne
#18 Le 06/02/2013, à 19:59
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Admettons, et en plus tu vas me dire que tu es en IP statique et que le dhcp te renouvelle pas et que .....
Chacun sa méthode, j'aurais mis un cron avec ntpdate dedans.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#19 Le 07/02/2013, à 18:38
- bwaman
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
salut a tous
j'ai lu les message et j'ai bien ris
je viens de testé sur un autre réseau et tous marche a merveille petite preuve
ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+142.201.7.148 198.82.1.201 3 u 91 128 377 17.179 5.834 28.623
-ox.eicat.ca 206.108.0.131 2 u 30 128 377 16.818 8.254 3.487
-chelsea.ii1.net 128.233.150.93 2 u 102 128 377 82.004 -7.255 3.382
+backup.relay.mt 132.246.11.227 3 u 20 128 377 9.812 4.852 36.629
*europium.canoni 193.79.237.14 2 u 81 128 377 87.291 4.639 2.124
que dire de plus humm port ntp bloqué a faire débloqué
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#20 Le 07/02/2013, à 19:07
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
que dire de plus humm port ntp bloqué a faire débloqué lol
Sauf si tu n'utilises que ntpdate pour faire ta mise à jour de l'heure.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#21 Le 09/02/2013, à 22:07
- bwaman
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Il y a un autre moyen pour faire la mise a jour automatique de l'heure ?
CPU: Intel Centrino Duo 2.2Ghz GPU: Nvidia 8600GS
RAM: 4Go HDD: 2X250Go
UBUNTU 12.10 (64Bits) [ The Quantal Quetzal ]
Hors ligne
#22 Le 10/02/2013, à 02:38
- Maisondouf
Re : [RÉSOLU] problème synchronisation NTP ubntu 12.10
Ben oui, puis c'est déjà installé, c'est ntpdate.
Il suffit de le lancer régulièrement pour que l'heure soit tenue à jour.
ntpdate <serveur1> <serveur2> ....
Tu recopies ça en mettant les noms des serveurs de qui tu veux dans un fichier 'tagada', tu lui mets l'attribut x d'exécutable et tu le mets dans le répertoire /etc/cron.hourly.
Il sera exécuté toutes les heures.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne