Ntpd don’t synchronize with remote time servers

Home Page Forums Network Management ZeroShell Ntpd don’t synchronize with remote time servers

This topic contains 8 replies, has 0 voices, and was last updated by  turboon 8 years, 4 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42693

    turboon
    Member

    My configuration:

    Servers List:
    ntp0.fau.de
    0.pool.ntp.org
    1.pool.ntp.org
    2.pool.ntp.org

    ntpq -p output:
    remote refid st t when poll reach delay offset jitter
    =============================================
    ntp0.rrze.uni-e .GPS. 1 u 28 256 377 98.535 -8349.5 443.32
    kent.naviteh.ru .INIT. 16 u – 256 0 0.000 0.000 4000.00
    gw-pirogovka.mi .INIT. 16 u – 256 0 0.000 0.000 4000.00
    nut.rsuitb.ru .INIT. 16 u – 256 0 0.000 0.000 4000.00
    *LOCAL(0) LOCAL(0) 10 l 29 64 377 0.000 0.000 0.001

    Log:
    16:48:55 ntpd 4.2.0a@1.1199-r Sat Apr 29 16:58:49 CEST 2006 (1)
    16:48:55 precision = 1.000 usec
    16:48:55 Listening on interface wildcard, 0.0.0.0#123
    16:48:55 Listening on interface lo, 127.0.0.1#123
    16:48:55 Listening on interface ETH00:00, MY IP#123
    16:48:55 Listening on interface ETH01:00, MY IP#123
    16:48:55 Listening on interface dummy0, MY IP#123
    16:48:55 Listening on interface dummy1, MY IP#123
    16:48:55 kernel time sync status 0040
    16:48:55 frequency initialized 0.000 PPM from /tmp/ntp.drift
    16:52:13 synchronized to LOCAL(0), stratum 10
    16:52:13 kernel time sync disabled 0041
    16:53:17 kernel time sync enabled 0001

    Why ntpd synchronizes only with local server? Why not with ntp0.fau.de with stratum 1, or others?

    #51214

    ppalias
    Member

    Could you post us here the screenshot of the NTP configuration?
    Can you ping the servers to ensure reachability?
    Also post the firewall

    iptables -L -v
    #51215

    turboon
    Member

    NTP Configuration:

    Ping:

    root@zeroshell root> ping ntp0.fau.de
    PING ntp0.rrze.uni-erlangen.de (131.188.3.220) 56(84) bytes of data.
    64 bytes from ntp0.rrze.uni-erlangen.de (131.188.3.220): icmp_seq=1 ttl=53 time=102 ms
    64 bytes from ntp0.rrze.uni-erlangen.de (131.188.3.220): icmp_seq=2 ttl=53 time=102 ms
    64 bytes from ntp0.rrze.uni-erlangen.de (131.188.3.220): icmp_seq=3 ttl=53 time=101 ms
    64 bytes from ntp0.rrze.uni-erlangen.de (131.188.3.220): icmp_seq=4 ttl=53 time=101 ms
    ^C
    — ntp0.rrze.uni-erlangen.de ping statistics —
    4 packets transmitted, 4 received, 0% packet loss, time 3015ms
    rtt min/avg/max/mdev = 101.649/102.202/102.895/0.603 ms

    root@zeroshell root> ping 1.pool.ntp.org
    PING 1.pool.ntp.org (85.21.78.91) 56(84) bytes of data.
    64 bytes from ground.corbina.net (85.21.78.91): icmp_seq=1 ttl=57 time=21.5 ms
    64 bytes from ground.corbina.net (85.21.78.91): icmp_seq=2 ttl=57 time=21.2 ms
    64 bytes from ground.corbina.net (85.21.78.91): icmp_seq=3 ttl=57 time=21.5 ms
    64 bytes from ground.corbina.net (85.21.78.91): icmp_seq=4 ttl=57 time=20.6 ms
    ^C
    — 1.pool.ntp.org ping statistics —
    4 packets transmitted, 4 received, 0% packet loss, time 3013ms
    rtt min/avg/max/mdev = 20.649/21.242/21.589/0.408 ms

    root@zeroshell root> ping 2.pool.ntp.org
    PING 2.pool.ntp.org (77.105.134.138) 56(84) bytes of data.
    64 bytes from h77-105-134-138.plustelecom.ru (77.105.134.138): icmp_seq=1 ttl=58 time=37.9 ms
    64 bytes from h77-105-134-138.plustelecom.ru (77.105.134.138): icmp_seq=2 ttl=58 time=37.6 ms
    64 bytes from h77-105-134-138.plustelecom.ru (77.105.134.138): icmp_seq=3 ttl=58 time=37.5 ms
    64 bytes from h77-105-134-138.plustelecom.ru (77.105.134.138): icmp_seq=4 ttl=58 time=37.7 ms
    ^C
    — 2.pool.ntp.org ping statistics —
    4 packets transmitted, 4 received, 0% packet loss, time 3012ms
    rtt min/avg/max/mdev = 37.536/37.716/37.903/0.131 ms

    iptables -L -v is too long to post it here 🙂
    but I turn
    iptables -P INPUT ACCEPT
    and
    iptables -P OUTPUT ACCEPT for experimental reasons at this time

    For addition – ntpdate results:

    root@zeroshell root> ntpdate -q ntp0.fau.de
    server 131.188.3.220, stratum 1, offset -928.084942, delay 0.11633
    19 Oct 10:49:23 ntpdate[13580]: step time server 131.188.3.220 offset -928.08494 2 sec

    root@zeroshell root> ntpdate -q 0.pool.ntp.org
    server 85.21.78.23, stratum 2, offset -928.267751, delay 0.04602
    server 195.16.46.183, stratum 2, offset -928.272155, delay 0.04547
    server 212.1.243.55, stratum 3, offset -928.272996, delay 0.04478
    19 Oct 10:49:37 ntpdate[13686]: step time server 195.16.46.183 offset -928.27215 5 sec

    root@zeroshell root> ntpdate -q 1.pool.ntp.org
    server 91.194.10.40, stratum 2, offset -928.321728, delay 0.04489
    server 212.192.253.168, stratum 3, offset -928.336857, delay 0.05846
    server 77.234.200.98, stratum 3, offset -928.331364, delay 0.05228
    19 Oct 10:49:41 ntpdate[13746]: step time server 91.194.10.40 offset -928.321728 sec

    root@zeroshell root> ntpdate -q 2.pool.ntp.org
    server 195.144.29.10, stratum 3, offset -928.366761, delay 0.02785
    server 83.229.210.18, stratum 3, offset -928.373302, delay 0.06274
    server 193.169.32.220, stratum 3, offset -928.373573, delay 0.04349
    19 Oct 10:49:44 ntpdate[13751]: step time server 195.144.29.10 offset -928.36676 1 sec

    #51216

    ppalias
    Member

    Have you selected a Parent Server and clicked on “Sync” ?

    #51217

    turboon
    Member

    Yes. By clicking “Sync”, synchronization works good with all parent servers.

    #51218

    ppalias
    Member

    And the time is not synchronized after that?

    #51219

    turboon
    Member

    Yes, time is sinchronized after that, certainly :). Also, I can use ntpdate+cron , ok. But i’m just trying to do it with ntpd automatically 🙁

    #51220

    ppalias
    Member

    Why bother?

    #51221

    turboon
    Member

    If it is supposed to work at that way… May be, i do something wrong?
    Below is output of ntpdc ‘peers’ and ‘reslist’ commands for information

    root@zeroshell root> ntpdc
    ntpdc> pe
    remote local st poll reach delay offset disp
    =======================================================================
    =mx.ll-h.ru 217.79.19.135 16 1024 0 0.00000 0.000000 0.00000
    =nut.rsuitb.ru 217.79.19.135 16 1024 0 0.00000 0.000000 0.00000
    =cello.corbina.n 217.79.19.135 16 1024 0 0.00000 0.000000 0.00000
    =ntp0.rrze.uni-e 217.79.19.135 16 1024 0 0.00000 0.000000 0.00000

    ntpdc> reslist
    address mask count flags
    =====================================================================
    0.0.0.0 0.0.0.0 356 ignore
    naos.promodev.r 255.255.255.255 0 noquery, notrap
    localhost.local 255.255.255.255 68 none
    localhost.local 255.255.255.255 0 ntpport, interface, ignore
    192.168.141.142 255.255.255.255 0 ntpport, interface, ignore
    KDC.localdomain 255.255.255.255 0 ntpport, interface, ignore
    gw-pirogovka.mi 255.255.255.255 0 noquery, nomodify, notrap
    test1-vis.sms-s 255.255.255.255 0 ntpport, interface, ignore
    host-217-79-19- 255.255.255.255 0 ntpport, interface, ignore
    :: :: 0 none

    #51222

    ppalias
    Member

    Yeah it is supposed to work like this, so there is no need to worry 🙂
    Usually when you run a program to synchronize time, it binds to the ntp ports so this is why other programs might fail to synchronize at the same time.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.