# Server time update problem

**URL:** <https://forums.suse.com/t/server-time-update-problem/22650>\
**Category:** SLES Networking\
**Created:** [May 22, 2012, 4:15pm UTC](https://forums.suse.com/t/server-time-update-problem/22650 "2012-05-22T16:15:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danskemk](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@danskemk](https://forums.suse.com/u/danskemk)\
**Post date:** [May 22, 2012, 4:15pm UTC](https://forums.suse.com/t/server-time-update-problem/22650/1 "2012-05-22T16:15:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [May 23, 2012, 7:53am UTC](https://forums.suse.com/t/server-time-update-problem/22650/2 "2012-05-23T07:53:49Z")

</div>

> [@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;

```auto
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

---

<div class="post-metadata">

**Author:** ![danskemk](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@danskemk](https://forums.suse.com/u/danskemk)\
**Post date:** [May 23, 2012, 10:07am UTC](https://forums.suse.com/t/server-time-update-problem/22650/3 "2012-05-23T10:07:19Z")

</div>

[QUOTE]Hi  
I can’t see those options in the man page for sntp?

Can you just try -d eg;  
[/QUOTE]

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:

```auto
!!!!!!!!!!!!!! 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.
```

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [May 24, 2012, 6:12am UTC](https://forums.suse.com/t/server-time-update-problem/22650/4 "2012-05-24T06:12:57Z")

</div>

[QUOTE=danskemk][color=blue]

> Hi  
> I can’t see those options in the man page for sntp?
> 
> Can you just try -d eg;  
> [/color]

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](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](http://pool.ntp.org)  
is equivalent to  
ntpdate [pool.ntp.org](http://pool.ntp.org)

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

* * *

[/QUOTE]  
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

```auto
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

---

<div class="post-metadata">

**Author:** ![danskemk](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@danskemk](https://forums.suse.com/u/danskemk)\
**Post date:** [May 30, 2012, 1:50pm UTC](https://forums.suse.com/t/server-time-update-problem/22650/5 "2012-05-30T13:50:00Z")

</div>

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](http://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](http://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.
