Hi all I have an ubuntu8 server where I have problems with date.
My current date (Europe/Rome) is 9:35
If I do date
print me 11:12:34
I have seen my ntp.conf is:
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
restrict 192.168.1.0 mask 255.255.255.0 modify notrap
if I stop and start ntpdate return me this:
dpkg-reconfigure tzdata
I set:
Europe
Rome
and print me
Current default timezone: 'Europe/Rome'
Local time is now: Thu Mar 28 11:16:06 CET 2013.
Universal Time is now: Thu Mar 28 10:16:06 UTC 2013.
If I do date print me
Thu Mar 28 11:16:25 CET 2013
I have tried this:
/etc/init.d/ntp stop
ntpdate it.pool.ntp.org
Print me:
no server suitable for synchronization found
if I Check this:
netstat -antltp | grep "LISTEN"
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 3114/mysqld
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 3295/vsftpd
tcp 0 0 109.233.120.149:53 0.0.0.0:* LISTEN 2935/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2935/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2988/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3265/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2935/named
tcp 0 0 0.0.0.0:1723 0.0.0.0:* LISTEN 2969/openvpn
tcp6 0 0 :::53 :::* LISTEN 2935/named
tcp6 0 0 :::22 :::* LISTEN 2988/sshd
tcp6 0 0 ::1:953 :::* LISTEN 2935/named
How can I set the right date?
Thanks
Best Answer
ntpd has some safety limits based on the size of the discrepancy between local time and network time. If the discrepancy is too big, ntpd won't update the time. So you better set the system time as correct as you can (after stopping ntpd) with:
This should hopefully fix the problem