Windows ntpdate bind failed permission denied

Xubuntu 10.10 I am trying to keep time and date managed by NTP servers. The utility for doing this opens a window where my time zone is selected (America/Chicago) and 'Keep synchronized with Internet servers" is selected. Beneath that is Select Servers. From that box, I select "ntp.tmc.edu (Texas, USA)" with a check mark and click CLOSE. At some time I installed the ntp (Network Time Protocol) daemon in my system. First sign of a problem is the window still says SELECT SERVERS.
  1. Unhappy Time and date problem.

    Xubuntu 10.10

    I am trying to keep time and date managed by NTP servers. The utility for doing this opens a window where my time zone is selected (America/Chicago) and ‘Keep synchronized with Internet servers» is selected. Beneath that is Select Servers. From that box, I select «ntp.tmc.edu (Texas, USA)» with a check mark and click CLOSE.

    At some time I installed the ntp (Network Time Protocol) daemon in my system.

    First sign of a problem is the window still says SELECT SERVERS. Seems like it should show the server selected.

    In any case, I found some info in another thread. It said

    Open a terminal window and type «sudo ntpdate» to automatically update your clock settings from the same source your atomic clock uses.

    Here is the output from that:

    19 Mar 09:01:01 ntpdate[2739]: no servers can be used, exiting

    Then I tried the following .. as suggested in the other thread:

    jb@john-xubuntu:~/Desktop$ ntpdate pool.ntp.org
    19 Mar 09:01:54 ntpdate[2743]: bind() fails: Permission denied

    Then I tried:

    jb@john-xubuntu:~/Desktop$ ntpdate ntp.tmc.edu
    19 Mar 09:19:34 ntpdate[2779]: bind() fails: Permission denied

    Any help with this is appreciated. Thank you in advance.

    Edit: Maybe everything is working fine … the time/date returned from ntpdate command is correct.

    Last edited by jfbooth; March 19th, 2011 at 03:32 PM.

    Reason: comment


  2. Re: Time and date problem.

    ntpdate needs to be run as root:
    sudo ntpdate ntp.tmc.edu


  3. Re: Time and date problem.

    Quote Originally Posted by tredegar
    View Post

    ntpdate needs to be run as root:
    sudo ntpdate ntp.tmc.edu

    +1 put sudo before your commands


  4. Re: Time and date problem.

    thank you Gentlemen. Does this look right?

    jb@john-xubuntu:~/Desktop$ sudo ntpdate ntp.tmc.edu
    [sudo] password for jb:
    19 Mar 16:18:31 ntpdate[2976]: the NTP socket is in use, exiting
    jb@john-xubuntu:~/Desktop$


  5. Re: Time and date problem.

    19 Mar 16:18:31 ntpdate[2976]: the NTP socket is in use, exiting

    This means that ntp is already running (you must have done something to set this up)

    ps -Al | grep ntp should show the process


  6. Re: Time and date problem.

    you must have done something to set this up

    Yes .. I did with the Time/Date utility in Xubuntu. The question is .. since the utility does not show the server I check marked as being ‘selected’, I wasn’t sure it was working.

    It says to pick a server .. and I did. I put a check mark by ntp.tmc.edu .. then it came back to the window saying Select Servers .. so I wasn’t sure it was working.

    The terminal command

    Code:

    sudo ntpdate ntp.tmc.edu

    returned

    Code:

    19 Mar 16:18:31 ntpdate[2976]: the NTP socket is in use, exiting

    So .. is the ‘utility’ as I have described it working??? The skunk in the woodpile is the freekin UTILIY does not indicate I selected a server .. but I GUESS it is working if the service is running. The whole issue is the behavior of the utility. Starts with a window to pick a server … new window opens, check mark a server and click OK .. comes back to window saying pick a server.


Модераторы: GRooVE, alexco

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.

corsik

мл. сержант
Сообщения: 98
Зарегистрирован: 2009-07-31 11:18:58
Откуда: Калининград
Контактная информация:

Re: NTP сервер

Блин неусмотрел, когда сервера прописывал написал в ntp.conf

вместо

:oops:
Теперь всё заработало :smile:


Хостинговая компания Host-Food.ru

Хостинг HostFood.ru

 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/


Kuzma

проходил мимо

Re: NTP сервер

Непрочитанное сообщение

Kuzma » 2009-11-03 15:20:11

Как узнать расхождения во времени с несколькими компьютерами в сети и unix сервером (которые под виндой)?


Squirel

рядовой
Сообщения: 10
Зарегистрирован: 2008-08-01 3:15:37

Re: NTP сервер

Непрочитанное сообщение

Squirel » 2009-11-05 4:00:12

Kuzma писал(а):Как узнать расхождения во времени с несколькими компьютерами в сети и unix сервером (которые под виндой)?

В смысле? Синхронизировать с unix сервером?


Aleks778

проходил мимо

Re: NTP сервер

Непрочитанное сообщение

Aleks778 » 2009-11-27 9:54:36

Настраивал все вроде по статье. Открыл в файерволле порты:

Код: Выделить всё

02700 allow udp from any 123 to ХХ.ХХХ.ХХ.ХХ in via rl0
02800 allow udp from ХХ.ХХХ.ХХ.ХХ to any dst-port 123 out via rl0

конфиг:

Код: Выделить всё

/etc/>cat ntp.conf
server 0.europe.pool.ntp.org prefer
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

#server 2.ru.pool.ntp.org iburst prefer
#server 3.ru.pool.ntp.org iburst
#server 1.ru.pool.ntp.org iburst
#server 3.ua.pool.ntp.org iburst
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
restrict default ignore
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict localhost

restrict 0.europe.pool.ntp.org noquery notrap
restrict 1.europe.pool.ntp.org noquery notrap
restrict 2.europe.pool.ntp.org noquery notrap
restrict 3.europe.pool.ntp.org noquery notrap

в логах вижу такое:

Код: Выделить всё

/var/log/>tail -20 ntp.log
26 Nov 16:12:18 ntpd[709]: ntpd exiting on signal 15
26 Nov 16:16:43 ntpd[709]: synchronized to 88.159.82.127, stratum 2
26 Nov 16:16:44 ntpd[709]: time reset +0.679062 s
26 Nov 16:16:44 ntpd[709]: kernel time sync status change 2001
26 Nov 16:20:42 ntpd[709]: synchronized to 88.159.82.127, stratum 2
26 Nov 16:21:21 ntpd[709]: synchronized to 89.238.71.133, stratum 3
26 Nov 21:42:51 ntpd[709]: kernel time sync status change 6001
26 Nov 21:59:55 ntpd[709]: kernel time sync status change 2001
26 Nov 22:34:04 ntpd[709]: kernel time sync status change 6001
26 Nov 23:59:30 ntpd[709]: kernel time sync status change 2001
27 Nov 01:58:56 ntpd[709]: kernel time sync status change 6001
27 Nov 03:24:15 ntpd[709]: kernel time sync status change 2001
27 Nov 03:58:26 ntpd[709]: kernel time sync status change 6001
27 Nov 04:15:29 ntpd[709]: kernel time sync status change 2001
27 Nov 06:14:56 ntpd[709]: kernel time sync status change 6001
27 Nov 06:32:00 ntpd[709]: kernel time sync status change 2001
27 Nov 07:06:11 ntpd[709]: kernel time sync status change 6001
27 Nov 07:23:15 ntpd[709]: kernel time sync status change 2001
27 Nov 07:57:24 ntpd[709]: kernel time sync status change 6001
27 Nov 09:05:43 ntpd[709]: kernel time sync status change 2001

Код: Выделить всё

/var/log/>ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*bock133.dotsour 89.238.71.130    3 u  734 1024  377   63.884   -3.471   0.449
+127-82-ftth.ons 193.79.237.14    2 u  558 1024  377   51.012  -14.415   1.348
+ntp1.exa.net.uk 195.66.241.10    2 u  543 1024  377   62.613   -9.056   1.008
+web01.ookoo.org 145.238.203.14   2 u  574 1024  377   56.912  -14.010   1.414

не пойму — оно работает или нет? вроде как последняя синхронизация проходила аж 26 ноября ( это вроде перезагрузка у меня была)

Спасибо


Аватара пользователя

m0ps

лейтенант
Сообщения: 986
Зарегистрирован: 2008-05-08 20:18:06
Откуда: Chernigov (Ukraine)
Контактная информация:

Re: NTP сервер

Непрочитанное сообщение

m0ps » 2009-11-27 10:09:12

все работает. для уверенности можешь проверить разницу во времени с сервером, который отмечен звездочкой:


Keks

рядовой
Сообщения: 33
Зарегистрирован: 2009-05-12 12:41:34
Откуда: Днепрбург

Re: NTP сервер

Непрочитанное сообщение

Keks » 2009-12-21 12:38:25

Привет ребята ;-) .
проблема такая, поднял NTP но не выводит команды, вот они

Код: Выделить всё

# ntpq -p
ntpq: write to localhost failed: Permission denied

Код: Выделить всё

ntpdate -q localhost
# ntpdate -q localhost
21 Dec 11:38:56 ntpdate[58248]: sendto(localhost): Unknown error: 0
21 Dec 11:38:57 ntpdate[58248]: sendto(localhost): Permission denied
21 Dec 11:38:58 ntpdate[58248]: sendto(localhost): Permission denied
21 Dec 11:38:59 ntpdate[58248]: sendto(localhost): Permission denied
server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
21 Dec 11:39:00 ntpdate[58248]: no server suitable for synchronization found

С эти поломал голову, что не так ткните пальцем.

выводит команды.

Код: Выделить всё

# ntpdate -q 0.ua.pool.ntp.org
server 82.207.71.5, stratum 2, offset -0.010849, delay 0.06146
server 91.198.10.1, stratum 2, offset -0.026630, delay 0.08936
server 78.152.160.1, stratum 2, offset -0.014057, delay 0.06140
21 Dec 10:18:24 ntpdate[57918]: adjust time server 78.152.160.1 offset -0.014057 sec

Код: Выделить всё

# sockstat -4 | grep ntp
root     ntpd       57883 20 udp4   *:123                 *:*
root     ntpd       57883 21 udp4   10.0.1.2:123          *:*
root     ntpd       57883 22 udp4   10.0.0.221:123        *:*
root     ntpd       57883 23 udp4   127.0.0.1:123         *:*

конфиг ntp.conf

Код: Выделить всё

#----NTP-SERVER-----------------
server 82.207.71.1 iburst prefer
server 213.179.228.1 iburst
server 193.34.155.3 iburst
server 85.90.215.231 iburst
server 62.149.0.30 iburst
server 212.90.124.5 iburst
server 91.198.10.4 iburst
server 212.111.205.110 iburst


#server 127.127.1.0 iburst burst
#fudge 127.127.1.0  stratum 9
#server 127.127.1.0
#fudge 127.127.1.0 stratum 8

driftfile /var/db/ntpd.drift
logfile /var/log/ntpd.log

restrict default ignore
#restrict 127.0.0.1
restrict 82.207.71.1 noquery notrap
restrict 213.179.228.1 noquery notrap
restrict 193.34.155.3 noquery notrap
restrict 85.90.215.231 noquery notrap
restrict 62.149.0.30 noquery notrap
restrict 212.90.124.5 noquery notrap
restrict 91.198.10.4 noquery notrap
restrict 212.111.205.110 noquery notrap

restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap

правила на фаервол

Код: Выделить всё

#----allow NTP requests from gateway to NET-----------------------------

${fwcmd} add 2300 allow log udp from any to ${extip} 123 in via ${extif}
${fwcmd} add 2310 allow log udp from ${extip} 123 to any out via ${extif}
${fwcmd} add 2320 allow log udp from any 123 to ${extip} in via ${extif}
${fwcmd} add 2330 allow log udp from ${extip} to any 123 out via ${extif}

конфиг rc.conf

Код: Выделить всё

#----NTP---------------
ntpd_enable="YES"
ntpd_program="/usr/local/bin/ntpd"

Код: Выделить всё

# uname -a
FreeBSD gateway.nn.local 7.1-RELEASE FreeBSD 7.1-RELEASE #2: Thu Sep 24 16:08:06 EEST 2009     yyyy@gateway.nn.local:/usr/obj/usr/src/sys/FIREWALL  i386

/var/log/ntp.log

Код: Выделить всё

21 Dec 11:33:37 ntpd[58230]: synchronized to 82.207.71.1, stratum 2
21 Dec 11:33:37 ntpd[58230]: kernel time sync status change 2001

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


Аватара пользователя

m0ps

лейтенант
Сообщения: 986
Зарегистрирован: 2008-05-08 20:18:06
Откуда: Chernigov (Ukraine)
Контактная информация:

Re: NTP сервер

Непрочитанное сообщение

m0ps » 2009-12-21 13:03:07

# ntpq -p
ntpq: write to localhost failed: Permission denied

от рута запусти


Keks

рядовой
Сообщения: 33
Зарегистрирован: 2009-05-12 12:41:34
Откуда: Днепрбург

Re: NTP сервер

Непрочитанное сообщение

Keks » 2009-12-21 13:18:43

Решётка стоит, я итак от рута запускаю.

Код: Выделить всё

# ntpq -p
ntpq: write to localhost failed: Permission denied


mymymy

сержант
Сообщения: 224
Зарегистрирован: 2008-05-16 21:23:38
Откуда: Москва

Re: NTP сервер

Непрочитанное сообщение

mymymy » 2009-12-23 10:04:13

KampuH писал(а):Доброе всем время суток!
У нас на шлюзовой машине был настроен и работал NTP сервер, но сейчас не запускается в debug.log пишет: ntpd[..]: ntp_io: estimated max descriptors: 7264, initial socket boundary: 20 и в корне появляется файл ntpd.core
[/code]

Решил так:

Код: Выделить всё

ntpd_enable="YES"
ntpd_program="/usr/sbin/ntpd"
ntpd_sync_on_start="NO"
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2009-12-28 9:27:09

m0ps писал(а):все работает. для уверенности можешь проверить разницу во времени с сервером, который отмечен звездочкой:

привет!
а что это за баг? что не так?

Код: Выделить всё

zabbix# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*zazel.corbina.n 62.117.76.140    2 u   35   64   17    3.201   -0.004   0.070
+phobos.bsys-net 192.36.143.150   2 u   32   64   17    2.052    1.313   0.053
+93.185.187.89   192.36.143.151   2 u   34   64   17   17.935    0.087   2.072
-ntp.mechel-bank 192.36.143.150   2 u   33   64   17   38.026   -7.969   0.041
zabbix#
zabbix# cat /var/log/ntp.log
25 Dec 16:43:19 ntpd[41957]: ntpd exiting on signal 15
25 Dec 16:43:28 ntpd[41997]: synchronized to 188.128.19.66, stratum 3
25 Dec 16:43:28 ntpd[41997]: kernel time sync status change 2001
25 Dec 16:45:32 ntpd[41997]: ntpd exiting on signal 15
25 Dec 16:46:52 ntpd[822]: synchronized to 85.21.78.6, stratum 2
25 Dec 16:46:53 ntpd[822]: time reset +1.129756 s
25 Dec 16:46:53 ntpd[822]: kernel time sync status change 2001
25 Dec 16:52:02 ntpd[822]: synchronized to 193.41.86.177, stratum 5
25 Dec 16:59:11 ntpd[822]: ntpd exiting on signal 15
25 Dec 17:03:45 ntpd[1423]: ntpd exiting on signal 15
25 Dec 17:06:10 ntpd[1545]: ntpd exiting on signal 15
25 Dec 17:06:38 ntpd[1619]: ntpd exiting on signal 15
25 Dec 17:06:45 ntpd[1646]: synchronized to 85.21.78.6, stratum 2
25 Dec 17:06:45 ntpd[1646]: kernel time sync status change 2001
25 Dec 17:07:56 ntpd[1646]: ntpd exiting on signal 15
25 Dec 17:08:05 ntpd[1691]: synchronized to 85.21.78.6, stratum 2
25 Dec 17:08:05 ntpd[1691]: kernel time sync status change 2001
25 Dec 17:10:18 ntpd[1691]: ntpd exiting on signal 15
25 Dec 17:10:27 ntpd[1760]: synchronized to 85.21.78.6, stratum 2
25 Dec 17:10:27 ntpd[1760]: kernel time sync status change 2001
25 Dec 17:11:32 ntpd[1760]: ntpd exiting on signal 15
25 Dec 17:11:39 ntpd[1811]: synchronized to 85.21.78.6, stratum 2
25 Dec 17:11:39 ntpd[1811]: kernel time sync status change 2001
27 Dec 08:38:03 ntpd[1811]: kernel time sync status change 6001
27 Dec 08:46:15 ntpd[1811]: kernel time sync status change 2001
27 Dec 10:28:40 ntpd[1811]: kernel time sync status change 6001
27 Dec 11:02:47 ntpd[1811]: kernel time sync status change 2001
27 Dec 19:10:39 ntpd[1811]: kernel time sync status change 6001
27 Dec 19:44:52 ntpd[1811]: kernel time sync status change 2001
27 Dec 21:46:03 ntpd[1811]: kernel time sync status change 6001
27 Dec 23:01:12 ntpd[1811]: kernel time sync status change 2001
27 Dec 23:45:41 ntpd[1811]: kernel time sync status change 6001
28 Dec 00:09:34 ntpd[1811]: kernel time sync status change 2001
28 Dec 01:34:54 ntpd[1811]: kernel time sync status change 6001
28 Dec 03:00:19 ntpd[1811]: kernel time sync status change 2001
28 Dec 08:57:25 ntpd[1811]: ntpd exiting on signal 15
28 Dec 08:57:34 ntpd[724]: synchronized to 85.21.78.6, stratum 2
28 Dec 08:57:34 ntpd[724]: kernel time sync status change 2001

Junos OS kernel based on FreeBSD UNIX.


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2009-12-28 9:29:05

Код: Выделить всё

zabbix# ntpdate -q 85.21.78.6
server 85.21.78.6, stratum 2, offset 0.001349, delay 0.02882
28 Dec 09:28:19 ntpdate[1720]: adjust time server 85.21.78.6 offset 0.001349 sec
zabbix# ntpdate -q zazel.corbina.ru
server 85.21.78.6, stratum 2, offset 0.001363, delay 0.02875
28 Dec 09:28:30 ntpdate[1725]: adjust time server 85.21.78.6 offset 0.001363 sec
zabbix# ntpdate -q zazel.corbina.net
server 85.21.78.6, stratum 2, offset 0.001069, delay 0.02960
28 Dec 09:28:36 ntpdate[1729]: adjust time server 85.21.78.6 offset 0.001069 sec
zabbix#

Junos OS kernel based on FreeBSD UNIX.


Аватара пользователя

m0ps

лейтенант
Сообщения: 986
Зарегистрирован: 2008-05-08 20:18:06
Откуда: Chernigov (Ukraine)
Контактная информация:

Re: NTP сервер

Непрочитанное сообщение

m0ps » 2009-12-28 9:52:03

vintovkin писал(а):а что это за баг? что не так?

а что не так? время ведь синхронизируется…


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2009-12-28 11:54:03

m0ps писал(а):

vintovkin писал(а):а что это за баг? что не так?

а что не так? время ведь синхронизируется…

меня смущает срочка в логах:

Код: Выделить всё

27 Dec 23:45:41 ntpd[1811]: kernel time sync status change 6001

это ошибка или что это такое?

Junos OS kernel based on FreeBSD UNIX.


Аватара пользователя

m0ps

лейтенант
Сообщения: 986
Зарегистрирован: 2008-05-08 20:18:06
Откуда: Chernigov (Ukraine)
Контактная информация:

Re: NTP сервер

Непрочитанное сообщение

m0ps » 2009-12-28 12:02:36


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2009-12-28 12:27:37

значит это баг, но можно просто забить на него и всё? :smile:

Junos OS kernel based on FreeBSD UNIX.


muxa

проходил мимо

Re: NTP сервер

Непрочитанное сообщение

muxa » 2010-01-28 21:22:58

в конфиге

Код: Выделить всё

server ntp.psn.ru prefer
server 0.ru.pool.ntp.org 
server 1.ru.pool.ntp.org
server ntp1.imvp.ru
server ntp2.imvp.ru

driftfile /etc/ntp.drift
logfile /var/log/ntp.log

restrict default ignore
restrict 192.168.112.0 mask 255.255.255.0 nomodify notrap
restrict localhost

restrict ntp.psn.ru prefer
restrict 0.ru.pool.ntp.org 
restrict 1.ru.pool.ntp.org
restrict ntp1.imvp.ru
restrict ntp2.imvp.ru

в итоге получаем

# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
alpha.prao.psn. 192.36.143.151 2 u 10 64 1 56.840 1.948 0.002
kent.naviteh.ru .INIT. 16 u — 64 0 0.000 0.000 0.000
80.90.180.142 .INIT. 16 u — 64 0 0.000 0.000 0.000
ntp1.imvp.ru .PPS. 1 u 7 64 1 99.046 -12.407 0.002
ntp2.imvp.ru .PPS. 1 u 6 64 1 105.893 -14.915 0.002

то есть нету синхронизации с 2-мя серверами полученными из пула. как победить?


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2010-01-29 8:53:57

muxa писал(а):ps конфиг нафирал от руки могут быть опчатки.

почему от руки?
как конектитесь к ОС?
путти не юзаете??

Junos OS kernel based on FreeBSD UNIX.


snorlov

подполковник
Сообщения: 3918
Зарегистрирован: 2008-09-04 11:51:25
Откуда: Санкт-Петербург

Re: NTP сервер

Непрочитанное сообщение

snorlov » 2010-01-29 9:37:35

muxa писал(а):
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
alpha.prao.psn. 192.36.143.151 2 u 10 64 1 56.840 1.948 0.002
kent.naviteh.ru .INIT. 16 u — 64 0 0.000 0.000 0.000
80.90.180.142 .INIT. 16 u — 64 0 0.000 0.000 0.000
ntp1.imvp.ru .PPS. 1 u 7 64 1 99.046 -12.407 0.002
ntp2.imvp.ru .PPS. 1 u 6 64 1 105.893 -14.915 0.002
то есть нету синхронизации с 2-мя серверами полученными из пула. как победить?

А они сами могут быть в дауне или не недоступны


Аватара пользователя

vintovkin

ВДВ
Сообщения: 1288
Зарегистрирован: 2007-05-11 9:39:11
Откуда: CSKA

Re: NTP сервер

Непрочитанное сообщение

vintovkin » 2010-01-29 10:12:28

snorlov писал(а):

muxa писал(а):
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
alpha.prao.psn. 192.36.143.151 2 u 10 64 1 56.840 1.948 0.002
kent.naviteh.ru .INIT. 16 u — 64 0 0.000 0.000 0.000
80.90.180.142 .INIT. 16 u — 64 0 0.000 0.000 0.000
ntp1.imvp.ru .PPS. 1 u 7 64 1 99.046 -12.407 0.002
ntp2.imvp.ru .PPS. 1 u 6 64 1 105.893 -14.915 0.002
то есть нету синхронизации с 2-мя серверами полученными из пула. как победить?

А они сами могут быть в дауне или не недоступны

нате мой конфиг, и наслаждайтесь демоном нтп :smile:

Код: Выделить всё

server 85.21.78.6    iburst burst prefer
server 91.194.10.40  iburst burst
server 93.185.187.89 iburst burst
server 194.33.191.69 iburst burst

driftfile /etc/ntp/drift
logfile /var/log/ntp.log

restrict default ignore
restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap
restrict localhost
restrict 85.21.78.6
restrict 91.194.10.40
restrict 93.185.187.89
restrict 194.33.191.69

Junos OS kernel based on FreeBSD UNIX.


muxa

проходил мимо

Re: NTP сервер

Непрочитанное сообщение

muxa » 2010-01-29 14:18:57

А они сами могут быть в дауне или не недоступны

нуну. а вот ты б взял бы из цитаты и проверил сервачки на доступность

из пула выдаются только доступные серваки.

вот из за этого парадокса (глюка) нельзя указывать в конфиге адреса пулов. что меня не устраивает.


Аватара пользователя

m0ps

лейтенант
Сообщения: 986
Зарегистрирован: 2008-05-08 20:18:06
Откуда: Chernigov (Ukraine)
Контактная информация:

Re: NTP сервер

Непрочитанное сообщение

m0ps » 2010-01-29 14:41:35

muxa писал(а):

А они сами могут быть в дауне или не недоступны

нуну. а вот ты б взял бы из цитаты и проверил сервачки на доступность

из пула выдаются только доступные серваки.

вот из за этого парадокса (глюка) нельзя указывать в конфиге адреса пулов. что меня не устраивает.

а зачем тебе что бы все сервера были доступны? все-равно синхронизируется с одним а не всеми одновременно серверами


Аватара пользователя

RaDiST_1977

мл. сержант
Сообщения: 86
Зарегистрирован: 2006-10-31 12:04:36
Откуда: Зеленоград

Re: NTP сервер

Непрочитанное сообщение

RaDiST_1977 » 2010-07-01 14:27:00

Обновил вчера ntpd, руководствуясь данной статьей.
все вроде стартует, только странно, что в логах демона нет сообщений о синхронизации, до обновления они присутствовали
конфиг нтп

Код: Выделить всё

#
restrict default ignore
#
#####################################
#Servers
#####################################
#server 192.5.41.40
#server 195.2.64.5
#server 195.13.1.153
server 192.36.143.150
server 192.36.143.151
server 192.36.143.152
server 192.36.143.153
server 192.36.143.164
server 192.36.143.234
server 62.117.76.142
server 62.117.76.141
server 62.117.76.138
#####################################
#Servers Restrictions
#####################################
restrict 192.5.41.40 noquery notrap
restrict 195.2.64.5 noquery notrap
restrict 195.13.1.153 noquery notrap
restrict 195.2.64.5 noquery notrap
restrict 195.13.1.153 noquery notrap
restrict 192.36.143.150 noquery notrap
restrict 192.36.143.151 noquery notrap
restrict 192.36.143.152 noquery notrap
restrict 192.36.143.153 noquery notrap
restrict 192.36.143.164 noquery notrap
restrict 192.36.143.234 noquery notrap
restrict 62.117.76.142 noquery notrap
restrict 62.117.76.141 noquery notrap
restrict 62.117.76.138 noquery notrap
######################################
#Driftfile
######################################
driftfile /var/db/ntp.drift
logfile /var/log/ntpd.log
######################################
#LAN & Loopback
######################################
restrict 127.0.0.1 mask 255.255.255.255
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
######################################

запись в rc.conf

Код: Выделить всё

ntpd_enable="YES"
ntpd_program="/usr/local/bin/ntpd"

и вот что сыпется в логи после запуска демона

Код: Выделить всё

Jun 30 21:52:59 radist ntpd[51546]: ntpd 4.2.6p1-RC5@1.2149 Wed Jun 30 17:48:58 UTC 2010 (1)
Jun 30 21:52:59 radist ntpd[51547]: proto: precision = 3.072 usec
Jun 30 21:52:59 radist ntpd[51547]: ntp_io: estimated max descriptors: 230400, initial socket boundary: 20
Jun 30 21:52:59 radist ntpd[51547]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jun 30 21:52:59 radist ntpd[51547]: Listen normally on 1 lo0 127.0.0.1 UDP 123
Jun 30 21:52:59 radist ntpd[51547]: Listen normally on 2 lagg0 192.168.0.2 UDP 123
Jun 30 21:52:59 radist ntpd[51547]: Listening on routing socket on fd #23 for interface updates
Jun 30 23:32:30 radist ntpd[51547]: ntpd exiting on signal 15
Jun 30 23:32:30 radist ntpd[52942]: ntpd 4.2.6p1-RC5@1.2149 Wed Jun 30 17:48:58 UTC 2010 (1)
Jun 30 23:32:30 radist ntpd[52943]: proto: precision = 3.073 usec
Jun 30 23:32:30 radist ntpd[52943]: ntp_io: estimated max descriptors: 230400, initial socket boundary: 20
Jun 30 23:32:30 radist ntpd[52943]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jun 30 23:32:30 radist ntpd[52943]: Listen normally on 1 lo0 127.0.0.1 UDP 123
Jun 30 23:32:30 radist ntpd[52943]: Listen normally on 2 lagg0 192.168.0.2 UDP 123
Jun 30 23:32:30 radist ntpd[52943]: Listening on routing socket on fd #23 for interface updates

Код: Выделить всё

)# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+Time1.Stupi.SE  .PPS.            1 u    7   64  377   49.740    0.468   0.065
-Time2.Stupi.SE  .PPS.            1 u   64   64  377   49.682    0.795   0.335
-Time3.Stupi.SE  .GPS.            1 u   65   64  377   50.709    0.626   0.206
*Time4.Stupi.SE  .PPS.            1 u   35   64  377   49.787    0.466   0.041
-Time10.Stupi.SE .GPS.            1 u   25   64  377   54.149    0.162   0.119
+Time20.Stupi.SE .PPS.            1 u   29   64  377   49.834    0.489   0.078
-ntp1.imvp.ru    .PPS.            1 u    5   64  377    5.857  -10.757   0.194
-ntp2.imvp.ru    .PPS.            1 u   66   64  377    5.851  -10.619   0.290
-ntp3.imvp.ru    .PPS.            1 u   49   64  377    5.650  -10.381   0.541

Код: Выделить всё

ntpq -cas

ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1  8437  961a   yes   yes  none  sys.peer    sys_peer  1
  2  8438  941a   yes   yes  none candidate    sys_peer  1
  3  8439  941a   yes   yes  none candidate    sys_peer  1
  4  8440  931a   yes   yes  none   outlyer    sys_peer  1
  5  8441  931a   yes   yes  none   outlyer    sys_peer  1
  6  8442  931a   yes   yes  none   outlyer    sys_peer  1
  7  8443  9324   yes   yes  none   outlyer   reachable  2
  8  8444  9324   yes   yes  none   outlyer   reachable  2
  9  8445  9324   yes   yes  none   outlyer   reachable  2

вот такие вот дела, поэтому непонятно, присутствует синхронизация или нет, и если нет, то куда копать
P.S.
до обновления была версия ntpd 4.2.4p5-a


Аватара пользователя

RaDiST_1977

мл. сержант
Сообщения: 86
Зарегистрирован: 2006-10-31 12:04:36
Откуда: Зеленоград

Re: NTP сервер

Непрочитанное сообщение

RaDiST_1977 » 2010-07-01 14:38:45

а вот что мы получаем по команде ntpdate

Код: Выделить всё

# ntpdate -q radist.alexnet.net
server 192.168.0.2, stratum 2, offset -0.000011, delay 0.02568
 1 Jul 15:35:55 ntpdate[64697]: adjust time server 192.168.0.2 offset -0.000011 sec


Jony

рядовой
Сообщения: 20
Зарегистрирован: 2010-06-07 9:17:07

Re: NTP сервер

Непрочитанное сообщение

Jony » 2010-08-06 9:06:41

а вот объясните непонятливому…
везде в форумах, и тут в часности, пишут что надо оставлять в конфиге запись:

restrict default ignore # запретить доступ всем по дефолту

а на сайте совсем другое:

«Если вы хотите запретить всем машинам обращаться к вашему серверу NTP, добавьте следующую строку в файл /etc/ntp.conf:

restrict default ignore

Если вы хотите разрешить синхронизировать свои часы с вашим сервером только машинам в вашей сети, но запретить им настраивать сервер или быть равноправными участниками синхронизации времени, то вместо указанной добавьте строчку

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap»
вот тут: http://www.freebsd.org/doc/ru/books/han … k-ntp.html

так вот…внимание — вопрос: как надо ПРАВИЛЬНО написать?
тока ногами не сильно бейте, просто хочу разобраться


I’m trying to set up an NTP timeserver for hosts on my internal network to synchronise against.

I need to use authorisation in order to comply with PCI standards.

I’ve created a set of keys using ntp-keygen -M and added the below snippet to my /etc/ntp.conf file on the server.

enable auth
keys /etc/ntp.keys
trustedkey 1 7 17

I’m unable to connect to the server from a client. When I run «ntpq -c as» on the client I can see that auth is «bad» for my server. I have copied the key file that was generated on the server to the client and added the trusted key lines to the client too, like this:

server timeserver key 17
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
keys /etc/ntp.keys
trustedkey 1 7 17

Looking at the server logs I can see that I’m getting a permission denied fault when trying to read the file, as below.

Jan 30 12:38:01 ip-10-0-1-103 systemd[1]: Starting LSB: Start NTP daemon...
Jan 30 12:38:01 ip-10-0-1-103 ntp[28084]:  * Starting NTP server ntpd
Jan 30 12:38:01 ip-10-0-1-103 ntpd[28094]: ntpd 4.2.8p4@1.3265-o Wed Oct  5 12:34:45 UTC 2016 (1): Starting
Jan 30 12:38:01 ip-10-0-1-103 ntpd[28094]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:116
Jan 30 12:38:01 ip-10-0-1-103 ntp[28084]:    ...done.
Jan 30 12:38:01 ip-10-0-1-103 systemd[1]: Started LSB: Start NTP daemon.
Jan 30 12:38:01 ip-10-0-1-103 ntpd[28096]: proto: precision = 0.182 usec (-22)
Jan 30 12:38:01 ip-10-0-1-103 ntpd[28096]: authreadkeys: file /etc/ntp.keys: Permission denied

I have used ntpdate from the client machine to set the date from the server so I’m pretty confident that the networking is up and running. I’ve actually disabled iptables on both servers while I’m busy trying to set this up.

The key file is 600 on the server, like this:

-rw-------  1 root  root    1066 Jan 30 12:29 ntpkey_MD5key_timeserver.3694768152
lrwxrwxrwx  1 root  root      35 Jan 30 12:33 ntp.keys -> ntpkey_MD5key_timeserver.3694768152

I’ve tried changing the config to point to the actual file and not the symlink.

Can anybody help me work out what the error in the syslog means and how to resolve this?

EDIT: Looking at the source it looks like the «Permission denied» part of the error is coming from the OS.

Weird, ok, this is  BETA1 now, I did a reboot and send you the output of /var/log/ntpd.log:

Just after the complete reboot:
Dec 14 08:50:07 wifigate-ng ntpdate[65530]: can’t find host ntp1. <ourdomain>Dec 14 08:50:07 wifigate-ng ntpdate[65530]: can’t find host ntp2. <ourdomain>Dec 14 08:50:07 wifigate-ng ntpdate[65530]: no servers can be used, exiting
Dec 14 08:50:13 wifigate-ng ntpdate[10277]: can’t find host ntp1. <ourdomain>Dec 14 08:50:13 wifigate-ng ntpdate[10277]: can’t find host ntp2. <ourdomain>Dec 14 08:50:13 wifigate-ng ntpdate[10277]: no servers can be used, exiting
Dec 14 08:50:19 wifigate-ng ntpdate[11192]: can’t find host ntp1. <ourdomain>Dec 14 08:50:19 wifigate-ng ntpdate[11192]: can’t find host ntp2. <ourdomain>Dec 14 08:50:19 wifigate-ng ntpdate[11192]: no servers can be used, exiting
–-

The interesting thing is that later on both ntp servers are resolved properly when doing a ‘host ntp1.<ourdomain>’
I think the resolvers comes up after ntpdate thant that’s perhaps one part of the problem.

Things continue then:

Dec 14 08:50:24 wifigate-ng ntp: Giving up on time sync after 3 attempts.
Dec 14 08:50:24 wifigate-ng ntp: Starting NTP Daemon.
Dec 14 08:50:24 wifigate-ng ntpd[13009]: ntpd 4.2.6p5@1.2349-o Wed Dec 12 15:46:12 UTC 2012 (1)
Dec 14 08:50:24 wifigate-ng ntpd[13268]: proto: precision = 0.838 usec
Dec 14 08:50:24 wifigate-ng ntpd[13268]: ntp_io: estimated max descriptors: 11095, initial socket boundary: 20
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Listen and drop on 1 v6wildcard :: UDP 123
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Listen normally on 2 ix0 fe80::92e2:baff:fe0b:cdc UDP 123
<snip! repeats=»» for=»» every=»» interface=»» enabled=»»>Dec 14 08:50:24 wifigate-ng ntpd[13268]: peers refreshed
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Listening on routing socket on fd #43 for interface updates
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Deferring DNS for ntp1. <ourdomain>1
Dec 14 08:50:24 wifigate-ng ntpd[13268]: Deferring DNS for ntp2. <ourdomain>1
Dec 14 08:51:28 wifigate-ng ntpd[13268]: process_private: failed auth mod_okay 0
Dec 14 08:51:28 wifigate-ng ntpd[13268]: process_private: failed auth mod_okay 0
<snip this=»» message=»» thereafter=»» gets=»» repeated=»» twice=»» perminute=»»>–-

  • ps aux | grep does not reveal a running ntp or ntpd process.
  • ‘ntpq -p’ does not show peers
  • The GUI shows green in the services panel
  • The service status panel confirms what ntpq -p said: «No peers found, is the ntp service running?. «

Now when I restart the ntp server via GUI (takes longer than on the 2.0.1 box with OpenNTPD, the GUI (now correctly) tell: The Service is not started

Dec 14 09:03:59 wifigate-ng ntpd[13268]: ntpd exiting on signal 15
Dec 14 09:03:59 wifigate-ng ntpd[25394]: ntpd 4.2.6p5@1.2349-o Wed Dec 12 15:46:12 UTC 2012 (1)
–-

Issuing ntpdate ntp1 syncs the clock then — interestig, but I keep being unable to start ntpd…</snip></ourdomain></ourdomain></snip!></ourdomain></ourdomain></ourdomain></ourdomain></ourdomain></ourdomain></ourdomain>

My machine is always showing an hour ahead of the actual time. I am in Texas currently but the time never picks Day light savings. Any time I click on Set Time(Top Right Corner), my system just hangs right there. I have to turn off the machine each time. how do I fix this issue?
alt text

This is what happens when I try ntpdate: still 1 hour difference.

ntpdate time.nist.gov 
13 Dec 21:44:37 ntpdate[3098]: bind() fails: Permission denied 
sudo ntpdate time.nist.gov 
[sudo] password for ubuntu: ntpdate[3237]: step time server 192.43.244.18 offset - 12.151112 sec 

Jorge Castro's user avatar

Jorge Castro

70k123 gold badges462 silver badges652 bronze badges

asked Dec 13, 2010 at 13:18

t3ch's user avatar

7

Have you tried a console alternative to setting it from the gnome-panel time applet?
ntpdate is a favorite of mine. i have it setup in a cron script across several Machines and VM’s to ensure my system clock never gets skewed that far off. (once a week is fine by my standards. i find that I only migrate away from Atomic Time a few microseconds a week.)

However, with that said, give a try with

 ntpdate time.nist.gov

and see if it corrects your time issue, without a freeze.

If your system continues to freeze, see if you cant ssh in from another machine and have a look at /var/log/messages. On a Fedora system at one point i was 2 hours ahead of actual time, when i reset the date, it caused a panic because everything on the system was 2 hours ahead. Threw some ridiculous error about future time and locked up. I powered down the machine for a day and gave it another go in a recovery console without an issue.

Edit 1: Another thought occured to me to try and change your TimeZone settings. See if that will reconfigure your clock. See the article located at https://help.ubuntu.com/community/UbuntuTime

This may be a byproduct of messed up TZ settings.

answered Dec 14, 2010 at 2:06

lazyPower's user avatar

lazyPowerlazyPower

5,3212 gold badges32 silver badges40 bronze badges

2

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Wirezfree

Level 2
Level 2
Posts: 65
Joined: Mon Jan 06, 2014 7:30 pm

[SOLVED] NTP Errors

Hello,

I’m trying to investigate a series of Mint Logs entries
The first group are all ntp related..??

Code: Select all

Sender: ntpdate: the NTP socket is in use, exiting

Code: Select all

Sender: ntpdate: restrict: ignoring line 38, mask '::' unusable.

Code: Select all

Sender: ntpdate: error resolving pool 3.ubuntu.pool.ntp.org: Name or service not known (-2)
Sender: ntpdate: error resolving pool 2.ubuntu.pool.ntp.org: Name or service not known (-2)
Sender: ntpdate: error resolving pool 1.ubuntu.pool.ntp.org: Name or service not known (-2)
Sender: ntpdate: error resolving pool 0.ubuntu.pool.ntp.org: Name or service not known (-2)
Sender: ntpdate: error resolving pool ntp.ubuntu.com: Name or service not known (-2)

Following some related comments/threads to verify the issue gave some commands to check

Code: Select all

$ ntpdate pool.ntp.org
27 Jan 16:06:55 ntpdate[9755]: bind() fails: Permission denied

But if you

Code: Select all

$ sudo ntpdate -u pool.ntp.org
27 Jan 16:08:09 ntpdate[9839]: adjust time server 129.250.35.251 offset -0.000979 sec

Some comments/threads seem imply ntp maybe running multiple times..?
Where to check..?? I do not see any ntp items in system monitor.?

Regarding the:

Code: Select all

Sender: ntpdate: restrict: ignoring line 38, mask '::' unusable.

This appears to relate to the line:

In my ntp.conf file, when counting from the 1st command. see <<<<<
( snipped for brevity to show key areas )

Code: Select all

cat /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
pool ntp.ubuntu.com

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1     <<<<<
restrict ::1

Which then led to some other comments regarding:
resolv.conf
They always showed/implied the nameserver being:

But in myresolv.conf it is:

Any comments / guidance is welcome ~ Many Thanks :)

ps
Why am I concerned about accurate time..?
I plan to run some Amatuer Radio applications where time is ideally <=1 sec accuracy

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

User avatar

dave8671

Level 4
Level 4
Posts: 335
Joined: Sat Jul 23, 2016 7:04 pm

Re: NTP Errors

Post

by dave8671 » Fri Jan 31, 2020 2:36 pm

Mainly this is stating that the system can not sync with that server. Its a data and time server. is your clock right time? if so do not worry to much.

Wirezfree

Level 2
Level 2
Posts: 65
Joined: Mon Jan 06, 2014 7:30 pm

Re: NTP Errors

Post

by Wirezfree » Fri Jan 31, 2020 2:49 pm

dave8671 wrote: ↑

Fri Jan 31, 2020 2:36 pm


Mainly this is stating that the system can not sync with that server. Its a data and time server. is your clock right time? if so do not worry to much.

Yes, my time is correct…

I think maybe/possibly I have some how got ntp & ntpdate and systemd-timesyncd.service «all» doing time..??

Can I just uninstall ntp & ntpdate and just let systemd-timesyncd.service do the time.

Code: Select all

$ systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendo
   Active: active (running) since Thu 2020-01-30 18:20:57 GMT; 24h ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 682 (systemd-timesyn)
   Status: "Synchronized to time server 91.189.94.4:123 (ntp.ubuntu.com)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─682 /lib/systemd/systemd-timesyncd

Jan 30 18:20:57 nuci-g8liy systemd[1]: Starting Network Time Synchronization...
Jan 30 18:20:57 nuci-g8liy systemd[1]: Started Network Time Synchronization.
Jan 30 18:21:27 nuci-g8liy systemd-timesyncd[682]: Synchronized to time server 9

Thanks… :)

User avatar

karlchen

Level 22
Level 22
Posts: 16894
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: NTP Errors

Post

by karlchen » Fri Jan 31, 2020 5:19 pm

Hi, wirezfreeze.

Yes, by all means. systemd-timesyncd should be used. Stop the service ntp. Disable the service ntp.
Makes sure the service systemd-timesyncd is running properly.
Feel free to uninstall ntp.

Best regards,
Karl

Image
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet’s Song

Wirezfree

Level 2
Level 2
Posts: 65
Joined: Mon Jan 06, 2014 7:30 pm

Re: NTP Errors

Post

by Wirezfree » Fri Jan 31, 2020 8:44 pm

karlchen wrote: ↑

Fri Jan 31, 2020 5:19 pm


Hi, wirezfreeze.

Yes, by all means. systemd-timesyncd should be used. Stop the service ntp. Disable the service ntp.
Makes sure the service systemd-timesyncd is running properly.
Feel free to uninstall ntp.

Best regards,
Karl

Many Thanks

Stop, Disabled and uninstalled ntp & ntpd… all ntp/ntpd errors have now gone.
systemd-timesyncd appears to function normally

Code: Select all

$ timedatectl status
                      Local time: Sat 2020-02-01 00:36:43 GMT
                  Universal time: Sat 2020-02-01 00:36:43 UTC
                        RTC time: Sat 2020-02-01 00:36:43
                       Time zone: Europe/London (GMT, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Code: Select all

$ systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendo
   Active: active (running) since Sat 2020-02-01 00:20:39 GMT; 17min ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 634 (systemd-timesyn)
   Status: "Synchronized to time server 91.189.91.157:123 (ntp.ubuntu.com)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─634 /lib/systemd/systemd-timesyncd

Feb 01 00:20:38 nuci-g8liy systemd[1]: Starting Network Time Synchronization...
Feb 01 00:20:39 nuci-g8liy systemd[1]: Started Network Time Synchronization.
Feb 01 00:21:09 nuci-g8liy systemd-timesyncd[634]: Synchronized to time server 9

Where is the configuation file for the time «ntp source server» it seems to be «ntp.ubuntu.com«

Best Regards
mfg

Wirezfree

Level 2
Level 2
Posts: 65
Joined: Mon Jan 06, 2014 7:30 pm

Re: NTP Errors

Post

by Wirezfree » Fri Jan 31, 2020 10:31 pm

I’m still trying to understand «systemd-timesyncd»

The following shows time is sync’d to «ntp.ubuntu.com»

Code: Select all

$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendo
   Active: active (running) since Sat 2020-02-01 00:20:39 GMT; 1h 48min ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 634 (systemd-timesyn)
   Status: "Synchronized to time server 91.189.91.157:123 (ntp.ubuntu.com)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─634 /lib/systemd/systemd-timesyncd

Feb 01 00:20:38 nuci-g8liy systemd[1]: Starting Network Time Synchronization...
Feb 01 00:20:39 nuci-g8liy systemd[1]: Started Network Time Synchronization.
Feb 01 00:21:09 nuci-g8liy systemd-timesyncd[634]: Synchronized to time server 9

But the «timesyncd.conf» appears to have # NO ntp server active..??
or is the line:

actually just stating that «ntp.ubuntu.com» «is» actually being used «now»

Code: Select all

$ cat /etc/systemd/timesyncd.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

Wirezfree

Level 2
Level 2
Posts: 65
Joined: Mon Jan 06, 2014 7:30 pm

[SOLVED]: NTP Errors

Post

by Wirezfree » Sat Feb 01, 2020 8:10 am

Figured out and Configured

> Stopped and uninstalled ntp & ntpd

Then edited

Code: Select all

xed admin:///etc/systemd/timesyncd.conf

Added some Local(UK) ntp servers

Code: Select all

$ cat /etc/systemd/timesyncd.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time]
NTP=uk.pool.ntp.org 0.uk.pool.ntp.org
FallbackNTP=ntp2b.mcc.ac.uk ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

Now showing in status

Code: Select all

$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendo
   Active: active (running) since Sat 2020-02-01 11:58:32 GMT; 8min ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 647 (systemd-timesyn)
   Status: "Synchronized to time server 185.53.93.157:123 (uk.pool.ntp.org)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─647 /lib/systemd/systemd-timesyncd

Feb 01 11:58:32 nuci-g8liy systemd[1]: Starting Network Time Synchronization...
Feb 01 11:58:32 nuci-g8liy systemd[1]: Started Network Time Synchronization.
Feb 01 11:59:03 nuci-g8liy systemd-timesyncd[647]: Synchronized to time server 1

Thanks all…

blecktar

Level 1
Level 1
Posts: 1
Joined: Sun Jul 12, 2020 4:18 pm

Re: [SOLVED] NTP Errors

Post

by blecktar » Sun Jul 12, 2020 4:37 pm

Folks, this is still happening with Linux Mint 20.

I’m brand new to Linux Mint and not a Linux expert. Can somebody add this to the list of things that need to be corrected before the next release or teach me how to do that or submit some kind of report, please?

Here’s what version of Linux Mint I’m running:

System: Kernel: 5.4.0-40-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Xfce 4.14.2
tk: Gtk 3.24.13 wm: xfwm4 dm: LightDM Distro: Linux Mint 20 Ulyana
base: Ubuntu 20.04 focal

Here’s what shows up in my logs:

Sender: ntpd
message: error resolving pool 3.ubuntu.pool.ntp.org: Name or service not known (-2)
error resolving pool 2.ubuntu.pool.ntp.org: Name or service not known (-2)
error resolving pool 1.ubuntu.pool.ntp.org: Name or service not known (-2)
error resolving pool 0.ubuntu.pool.ntp.org: Name or service not known (-2)

Понравилась статья? Поделить с друзьями:
  • Windows ntp server time windows com
  • Windows modules installer worker отключить навсегда windows 10
  • Windows modules installer worker не отключается
  • Windows ntp server linux ntp client
  • Windows nt6 vista 7 and above setup что это