Home »

Проблема с синхрони...
 

Проблема с синхронизацией времени.  


stum
Сообщения: 1
 stum
(@stum)
Эникей
Присоединился: 1 год назад

Всем привет. Словил очень странную проблему и в первый раз.

На сервере постоянно происходит рассинхронизация системного времени. На ночь, выключил астериск и на утро заметил, что со временем все хорошо. Включил астериск и в течении часа, время рассинхронезировалось. При рестарте chronyd, время синхронизируется сразу. Потом в течении 1-2ч снова время кривое.

В наличии:

Centos7, asterisk 16, apache, iptables, chronyd default config.

Астериск поставил наднях. Ради него весь этот сервер поднял (новый). Аналогичный сервер поднимал год назад, там все работает до сих пор хорошо. Инструкцию по настройке систем использовал этого сайта.

Chronyd теряет источник, как я понял. NTP server ставил и дефольный и локальный. Результат одинаковый.

Sep 8 17:47:19 astr chronyd[2572]: System clock was stepped by -392.765086 seconds
Sep 8 18:00:30 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 8 18:00:30 astr systemd: Starting Time & Date Service...
Sep 8 18:00:30 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 8 18:00:30 astr systemd: Started Time & Date Service.
Sep 8 18:01:17 astr systemd: Stopping LSB: Asterisk PBX...
Sep 8 18:01:17 astr asterisk: Stopping safe_asterisk: [ OK ]
Sep 8 18:01:17 astr asterisk: Shutting down asterisk: [ OK ]
Sep 8 18:01:17 astr systemd: Stopped LSB: Asterisk PBX.
Sep 9 00:00:01 astr systemd: Starting update of the root trust anchor for DNSSEC validation in unbound...
Sep 9 00:00:02 astr systemd: Started update of the root trust anchor for DNSSEC validation in unbound.
Sep 9 02:32:26 astr rsyslogd: imjournal: journal reloaded... [v8.24.0-52.el7_8.2 try http://www.rsyslog.com/e/0 ]
Sep 9 08:23:14 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 08:23:14 astr systemd: Starting Time & Date Service...
Sep 9 08:23:14 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 08:23:14 astr systemd: Started Time & Date Service.
Sep 9 08:29:49 astr systemd: Starting LSB: Asterisk PBX...
Sep 9 08:29:49 astr asterisk: Starting asterisk:
Sep 9 08:29:49 astr systemd: Can't open PID file /var/run/asterisk/asterisk.pid (yet?) after start: No such file or directory
Sep 9 08:29:49 astr systemd: asterisk.service: Supervising process 4826 which is not our child. We'll most likely not notice when it exits.
Sep 9 08:29:49 astr systemd: Started LSB: Asterisk PBX.
Sep 9 09:22:28 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 09:22:28 astr systemd: Starting Time & Date Service...
Sep 9 09:22:28 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 09:22:28 astr systemd: Started Time & Date Service.
Sep 9 09:35:10 astr systemd: Time has been changed
Sep 9 09:37:55 astr chronyd[2572]: Forward time jump detected!
Sep 9 09:37:55 astr chronyd[2572]: Can't synchronise: no selectable sources
Sep 9 09:41:08 astr chronyd[2572]: Selected source 10.50.0.11
Sep 9 09:41:08 astr chronyd[2572]: System clock wrong by -574.385889 seconds, adjustment started
Sep 9 09:45:27 astr chronyd[2572]: Selected source 10.50.0.10
Sep 9 10:07:48 astr chronyd[2572]: chronyd exiting
Sep 9 10:07:48 astr systemd: Stopping NTP client/server...
Sep 9 10:07:48 astr systemd: Stopped NTP client/server.
Sep 9 10:07:48 astr yum[5403]: Erased: chrony-3.4-1.el7.x86_64
Sep 9 10:07:48 astr systemd: Reloading.
Sep 9 10:07:48 astr systemd: asterisk.service: Supervising process 4826 which is not our child. We'll most likely not notice when it exits.
Sep 9 10:09:29 astr systemd: Reloading.
Sep 9 10:09:29 astr systemd: asterisk.service: Supervising process 4826 which is not our child. We'll most likely not notice when it exits.
Sep 9 10:09:29 astr systemd: Reloading.
Sep 9 10:09:29 astr systemd: asterisk.service: Supervising process 4826 which is not our child. We'll most likely not notice when it exits.
Sep 9 10:09:29 astr yum[5428]: Installed: chrony-3.4-1.el7.x86_64
Sep 9 10:09:53 astr systemd: Starting NTP client/server...
Sep 9 10:09:53 astr chronyd[5550]: Could not open IPv6 command socket : Address family not supported by protocol
Sep 9 10:09:53 astr chronyd[5550]: Initial frequency 10.468 ppm
Sep 9 10:09:53 astr systemd: Started NTP client/server.
Sep 9 10:02:50 astr chronyd[5550]: Selected source 85.21.78.23
Sep 9 10:02:50 astr chronyd[5550]: System clock wrong by -428.928932 seconds, adjustment started
Sep 9 10:02:50 astr systemd: Time has been changed
Sep 9 10:02:50 astr chronyd[5550]: System clock was stepped by -428.928932 seconds
Sep 9 10:02:57 astr systemd: Reloading.
Sep 9 10:02:57 astr systemd: asterisk.service: Supervising process 4826 which is not our child. We'll most likely not notice when it exits.
Sep 9 10:06:05 astr chronyd[5550]: Selected source 78.36.18.184
Sep 9 10:09:36 astr chronyd[5550]: chronyd exiting
Sep 9 10:09:36 astr systemd: Stopping NTP client/server...
Sep 9 10:09:36 astr systemd: Stopped NTP client/server.
Sep 9 10:09:36 astr systemd: Starting NTP client/server...
Sep 9 10:09:36 astr chronyd[5695]: Frequency 12.118 +/- 0.603 ppm read from /var/lib/chrony/drift
Sep 9 10:09:36 astr systemd: Started NTP client/server.
Sep 9 10:09:41 astr chronyd[5695]: Selected source 192.36.143.130
Sep 9 10:10:32 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 10:10:32 astr systemd: Starting Time & Date Service...
Sep 9 10:10:32 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 10:10:32 astr systemd: Started Time & Date Service.
Sep 9 10:27:42 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 10:27:42 astr systemd: Starting Time & Date Service...
Sep 9 10:27:42 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 10:27:42 astr systemd: Started Time & Date Service.

# cat /var/log/messages
Sep 9 10:45:01 astr rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-52.el7_8.2" x-pid="918" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 9 11:09:19 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 11:09:19 astr systemd: Starting Time & Date Service...
Sep 9 11:09:19 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 11:09:19 astr systemd: Started Time & Date Service.
Sep 9 11:23:56 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 11:23:56 astr systemd: Starting Time & Date Service...
Sep 9 11:23:56 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 11:23:56 astr systemd: Started Time & Date Service.
Sep 9 11:39:43 astr systemd: Stopping The Apache HTTP Server...
Sep 9 11:39:44 astr systemd: Stopped The Apache HTTP Server.
Sep 9 11:39:44 astr systemd: Starting The Apache HTTP Server...
Sep 9 11:39:44 astr systemd: Started The Apache HTTP Server.
Sep 9 11:55:15 astr systemd: Stopping The Apache HTTP Server...
Sep 9 11:55:16 astr systemd: Stopped The Apache HTTP Server.
Sep 9 11:55:16 astr systemd: Starting The Apache HTTP Server...
Sep 9 11:55:17 astr systemd: Started The Apache HTTP Server.
Sep 9 11:57:51 astr systemd: Stopping The Apache HTTP Server...
Sep 9 11:57:52 astr systemd: Stopped The Apache HTTP Server.
Sep 9 11:57:52 astr systemd: Starting The Apache HTTP Server...
Sep 9 11:57:52 astr systemd: Started The Apache HTTP Server.
Sep 9 12:12:13 astr systemd: Time has been changed
Sep 9 12:12:27 astr chronyd[5695]: Forward time jump detected!
Sep 9 12:12:27 astr chronyd[5695]: Can't synchronise: no selectable sources
Sep 9 12:12:39 astr dbus[656]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 9 12:12:39 astr systemd: Starting Time & Date Service...
Sep 9 12:12:39 astr dbus[656]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 9 12:12:39 astr systemd: Started Time & Date Service.
[root@astr ~]#

# timedatectl
Local time: Wed 2020-09-09 12:15:09 MSK
Universal time: Wed 2020-09-09 09:15:09 UTC
RTC time: Wed 2020-09-09 09:05:35
Time zone: Europe/Moscow (MSK, +0300)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
[root@astr ~]#
[root@astr ~]# chronyc source
Unrecognized command
[root@astr ~]# chronyc sources
210 Number of sources = 4
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- tms04.deltatelesystems.ru 2 6 377 12 +825us[ +825us] +/- 81ms
^- time.ooonet.ru 2 6 377 12 +4151us[+4151us] +/- 60ms
^- ns1.ooonet.ru 2 6 377 12 +7333us[+7333us] +/- 75ms
^* time100.stupi.se 1 6 377 13 +431us[ +911us] +/- 14ms
[root@astr ~]#
[root@astr ~]# chronyc sourcestats
210 Number of sources = 4
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
tms04.deltatelesystems.ru 5 3 272 +4.235 8.610 +929us 83us
time.ooonet.ru 5 3 271 -1.509 117.684 +4640us 2252us
ns1.ooonet.ru 5 4 271 -23.324 250.270 +3445us 3215us
time100.stupi.se 5 3 271 +1.493 68.059 +44us 830us

[root@astr ~]# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-09-09 10:09:36 MSK; 2h 18min ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 5697 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
Process: 5693 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 5695 (chronyd)
CGroup: /system.slice/chronyd.service
└─5695 /usr/sbin/chronyd -4

Sep 09 10:09:36 astr.local systemd[1]: Starting NTP client/server...
Sep 09 10:09:36 astr.local chronyd[5695]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
Sep 09 10:09:36 astr.local chronyd[5695]: Frequency 12.118 +/- 0.603 ppm read from /var/lib/chrony/drift
Sep 09 10:09:36 astr.local systemd[1]: Started NTP client/server.
Sep 09 10:09:41 astr.local chronyd[5695]: Selected source 192.36.143.130
Sep 09 12:12:27 astr.local chronyd[5695]: Forward time jump detected!
Sep 09 12:12:27 astr.local chronyd[5695]: Can't synchronise: no selectable sources
Sep 09 12:15:41 astr.local chronyd[5695]: Selected source 192.36.143.130
Sep 09 12:15:41 astr.local chronyd[5695]: System clock wrong by -574.417862 seconds, adjustment started
[root@astr ~]#

Ответить