LINUX.ORG.RU

Не синхронизуется время chrony centos7

 , ,


0

1

Всем добра. Столкнулся с проблемой При рестарте хрони время синхронизируется норм, а через несколько минут начинает отставать. timedatectl выдает это

Local time: Thu 2019-09-26 15:42:26 MSK
  Universal time: Thu 2019-09-26 12:42:26 UTC
        RTC time: Thu 2019-09-26 12:42:52
       Time zone: Europe/Moscow (MSK, +0300)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a
[root@fabrika-sveta ~]# date
Thu Sep 26 15:42:33 MSK 2019
Хотя после рестарта NTP synchronized всегда yes. Время отстает критично - за сутки на полчаса. В логах
chronyd[1234]: Can't synchronise: no majority

Ответ на: комментарий от mord0d
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking

Vadim777 ()
Ответ на: комментарий от mord0d

systemctl status chronyd.service выдает:

]# systemctl status chronyd.service -l
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-09-26 16:02:07 MSK; 55min ago
     Docs: man:chronyd(8)
           man:chrony.conf(5)
  Process: 16603 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
  Process: 16599 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 16601 (chronyd)
   CGroup: /system.slice/chronyd.service
           └─16601 /usr/sbin/chronyd

Sep 26 16:48:48 mysite.com chronyd[16601]: System clock wrong by 1.486167 seconds, adjustment started
Sep 26 16:49:53 mysite.com chronyd[16601]: Selected source 80.240.216.155
Sep 26 16:49:53 mysite.com chronyd[16601]: System clock wrong by 2.143344 seconds, adjustment started
Sep 26 16:49:53 mysite.com chronyd[16601]: Can't synchronise: no selectable sources
Sep 26 16:52:03 mysite.com chronyd[16601]: Selected source 80.240.216.155
Sep 26 16:52:03 mysite.com chronyd[16601]: System clock wrong by -5.032285 seconds, adjustment started
Sep 26 16:53:06 mysite.com chronyd[16601]: Selected source 192.36.143.130
Sep 26 16:54:11 mysite.com chronyd[16601]: Selected source 91.207.136.50
Sep 26 16:56:21 mysite.com chronyd[16601]: Selected source 192.36.143.130
Sep 26 16:56:21 mysite.com chronyd[16601]: System clock wrong by 6.208668 seconds, adjustment started

Vadim777 ()
Ответ на: комментарий от stage3
rpm -qa | grep chrony
chrony-3.4-1.el7.x86_64
 chronyc sources
210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^x cello.corbina.net             2   6    77    46   -270ms[-3031ms] +/-   43ms
^- ns.aksinet.net                2   6   377    43   -211ms[ -211ms] +/-   30ms
^* time100.stupi.se              1   6   377    43   -175ms[  -35ms] +/-   12ms
^- bagnikita.com                 2   6   377    43   -180ms[  -41ms] +/-   41ms

Vadim777 ()