Results 1 to 5 of 5

Thread: Server time update problem

Hybrid View

  1. #1

    Server time update problem

    Hello,
    i have few servers with sles 11sp2 which have problems updating time from local server.
    After some investigation i found out that server is comunicating via high ports which are blocked cause servers are in dmz. Is there a way to force using 123 port.

    I'm trying to updiate via
    #ntpdate LANtimeserver
    or
    #sntp -P no -r LANtimeserver
    sntp: not enough valid responses received in time

    i can see the time via, but still can't force to update system time.
    server3:~ # ntpq -p
    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    *LANtimeserver othertimeserver 4 u 62 64 377 0.907 -339.52 117.901
    LOCAL(0) .LOCL. 10 l 31 64 377 0.000 0.000 0.001

    any advise how can i force to update from time server. Only port available 123.
    Thanks in advance.

  2. Re: Server time update problem

    Quote Originally Posted by danskemk
    Hello,
    i have few servers with sles 11sp2 which have problems updating time
    from local server.
    After some investigation i found out that server is comunicating via
    high ports which are blocked cause servers are in dmz. Is there a way to
    force using 123 port.

    I'm trying to updiate via
    #ntpdate LANtimeserver
    or
    #sntp -P no -r LANtimeserver
    sntp: not enough valid responses received in time

    i can see the time via, but still can't force to update system time.
    server3:~ # ntpq -p
    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    *LANtimeserver othertimeserver 4 u 62 64 377 0.907 -339.52 117.901
    LOCAL(0) .LOCL. 10 l 31 64 377 0.000 0.000 0.001

    any advise how can i force to update from time server. Only port
    available 123.
    Thanks in advance.

    Hi
    I can't see those options in the man page for sntp?

    Can you just try -d eg;

    Code:
    sntp -d time-b.nist.gov
    
    22 May 23:47:29 sntp[11950]: Started sntp
    Starting to read KoD file /var/db/ntp-kod...
    sntp sendpkt: Sending packet to 129.6.15.29... Packet sent.
    sntp recvpkt: packet received from 129.6.15.29 is not authentic. Authentication not enforced.
    sntp handle_pkt: Received 48 bytes from 29.6.15.29
    sntp offset_calculation: t21: 0.031932 t34: -0.068505 delta: 0.100437 offset: -0.018287
    2012-05-22 23:47:29.114995 (+0600) -0.018287

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
    up 6:58, 4 users, load average: 0.03, 0.05, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  3. #3

    Re: Server time update problem

    Hi
    I can't see those options in the man page for sntp?

    Can you just try -d eg;
    Hello,
    server3:~ # sntp -d LANtimeserver
    Syntax: sntp [ --help | -h | -? ] [ -v | -V | -W ]
    [ -q [ -f savefile ] |
    [ [ -F ] { -r | -a } [ -P prompt ] [ -l lockfile ] ]
    [ -c count ] [ -e minerr ] [ -E maxerr ]
    [ -d delay | -x [ separation ] [ -f savefile ] ]
    [ -4 | -6 ] [-u] [ address(es) ] ]

    In previous servers there was sles 10.4 and i used ntpdate and everything worked find, now it gives:

    Code:
    !!!!!!!!!!!!!!  WARNING !!!!!!!!!!!!!!!!!!
    
    The ntpdate program is deprecated and should not be used any more.  To
    quote the upstream ntp developers:
    
      "The functionality ntpdate offered is now provided by the ntpd daemon
      itself.  If you call ntpd with the command line option -q it will
      retrieve the current time and set it accordingly."
    
    Please check the Network Time Protocol (NTP) daemon man page and
      http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate
    for further information.
    
    You can replace the ntpdate call with "rcntp ntptimeset" to achieve an
    inital poll of the servers specified in /etc/ntp.conf.
    
    The program /usr/sbin/sntp offers comparable functionality to ntpdate.
    Specifically
      sntp -P no -r pool.ntp.org
    is equivalent to
      ntpdate pool.ntp.org
    
    For further details please refer to the man page of sntp.

  4. Re: Server time update problem

    Quote Originally Posted by danskemk

    > Hi
    > I can't see those options in the man page for sntp?
    >
    > Can you just try -d eg;
    >


    Hello,
    server3:~ # sntp -d LANtimeserver
    Syntax: sntp [ --help | -h | -? ] [ -v | -V | -W ]
    [ -q [ -f savefile ] |
    [ [ -F ] { -r | -a } [ -P prompt ] [ -l lockfile ] ]
    [ -c count ] [ -e minerr ] [ -E maxerr ]
    [ -d delay | -x [ separation ] [ -f savefile ] ]
    [ -4 | -6 ] [-u] [ address(es) ] ]

    In previous servers there was sles 10.4 and i used ntpdate and
    everything worked find, now it gives:


    Code:
    --------------------

    !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!

    The ntpdate program is deprecated and should not be used any more. To
    quote the upstream ntp developers:

    "The functionality ntpdate offered is now provided by the ntpd daemon
    itself. If you call ntpd with the command line option -q it will
    retrieve the current time and set it accordingly."

    Please check the Network Time Protocol (NTP) daemon man page and
    http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate
    for further information.

    You can replace the ntpdate call with "rcntp ntptimeset" to achieve an
    inital poll of the servers specified in /etc/ntp.conf.

    The program /usr/sbin/sntp offers comparable functionality to ntpdate.
    Specifically
    sntp -P no -r pool.ntp.org
    is equivalent to
    ntpdate pool.ntp.org

    For further details please refer to the man page of sntp.

    --------------------

    Hi
    Ahh that will teach me to check the machine I'm on...

    It does seem a bit hit and miss, try adding either -v or -V

    Code:
    bert:~ # sntp -V -P no -r pool.ntp.org
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= pool.ntp.org
    sntp: offset=0.004+/-0.048 disp=0.030
    sntp: correction 0.004 +/- 0.030+0.048 secs - ignored
    bert:~ # sntp -v -P no -r pool.ntp.org
    sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= pool.ntp.org
    sntp: correction 0.004 +/- 0.030+0.049 secs - ignored
    bert:~ # sntp -v -P no -r time-a.nist.gov
    sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-a.nist.gov
    sntp: correction -0.014 +/- 0.000+0.074 secs - ignored
    bert:~ # sntp -P no -r time-a.nist.gov
    bert:~ # sntp -v -P no -r time-a.nist.gov
    sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-a.nist.gov
    sntp: correction -0.003 +/- 0.000+0.055 secs - ignored
    bert:~ # sntp -V -P no -r time-a.nist.gov
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-a.nist.gov
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: not enough valid responses received in time
    bert:~ # sntp -V -P no -r time-a.nist.gov
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-a.nist.gov
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: not enough valid responses received in time
    bert:~ # sntp -v -P no -r pool.ntp.org
    sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= pool.ntp.org
    sntp: correction 0.003 +/- 0.032+0.050 secs - ignored
    bert:~ # sntp -V -P no -r pool.ntp.org
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= pool.ntp.org
    sntp: offset=0.003+/-0.047 disp=0.032
    sntp: correction 0.003 +/- 0.032+0.047 secs - ignored
    bert:~ # sntp -V -P no -r time-a.nist.gov
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-a.nist.gov
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: not enough valid responses received in time
    bert:~ # sntp -V -P no -r time-b.nist.gov
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= time-b.nist.gov
    sntp: offset=-0.000+/-0.054 disp=0.000
    sntp: correction -0.000 +/- 0.000+0.054 secs - ignored
    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
    up 4:01, 4 users, load average: 0.01, 0.03, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  5. #5

    Re: Server time update problem

    Hi,
    the problem for me is that sntp try to use high ports and get timeouts. I was looking for alternative which uses only port 123.

    server2:~ # sntp -V -P no -r LANtimeserver
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= LANtimeserver
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: receive timed out after 3 seconds
    sntp: not enough valid responses received in time

    server2:~ # sntp -V -P no -r pool.ntp.org
    sntp options: a=2 v=2 e=0.100 E=5.000 P=2147483647.000
    d=15 c=5 x=0 op=1 l=/etc/sntp.pid f= pool.ntp.org
    sntp: offset=0.003+/-0.009 disp=0.023
    sntp: correction 0.003 +/- 0.023+0.009 secs - ignored

    I set up time sync with yast-> Network Services -> NTP configuration now it seems working.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •