vesta cp reported me via mail (VERY GOOD 🙂

test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
run-parts: /etc/cron.daily/ntpdate exited with return code 1

try and error2:

vim /etc/default/ntpdate; # open up ntpdate config file

# The settings in this file are used by the program ntpdate-debian, but not
# by the upstream program ntpdate.

# Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
# so you only have to keep it in one place.
NTPDATE_USE_NTP_CONF=yes

vim /etc/ntp.conf; # checkout ntp config file... 

# custom servers :-D let's try if it brings anything
server 0.de.pool.ntp.org
server 1.de.pool.ntp.org
server 2.de.pool.ntp.org
server 3.de.pool.ntp.org

# hetzner ntp servers 
server ntp1.hetzner.de iburst
server ntp2.hetzner.com iburst
server ntp3.hetzner.net iburst

try and error1:

vim /etc/cron.daily/ntpdate; # open ntpdate script that will sync your system's time with time-server daily

#!/bin/sh
/usr/sbin/ntpdate -s -q de.pool.ntp.org; # add the COUNTRYCODE.pool.ntp.org and -q and ntpdate should work fine even in sh shell

next problem: now i get mails like:

should i set $? = 0 manually? faking a positive result? NOPE! NEVER! STAY SINCERE!

/etc/cron.daily/ntpdate:
server 78.47.226.8, stratum 2, offset 0.006584, delay 0.04008
server 95.129.55.109, stratum 3, offset 0.001914, delay 0.03778
server 5.9.49.116, stratum 2, offset 0.001216, delay 0.02783
server 144.76.38.73, stratum 2, offset -0.005650, delay 0.03960

the investigation 😀

ntpdate -s 

-s Divert logging output from the standard output (default) to the system syslog facility. This is designed primarily for convenience of cron scripts.

-> so you will not see any error.

if you leave out -s you get:

ntpdate exit code 1  1 Jun 11:06:28 ntpdate[15283]: the NTP socket is in use, exiting

„ntpdate service having a problem doesn’t really mean there’s a problem with ntpd, ntpdate is a standalone utility,
(you don’t even need the ntp package installed to use ntpdate) you could try a query and then see if that works:“

/usr/sbin/ntpdate -q de.pool.ntp.org
server 46.165.194.70, stratum 2, offset -0.000925, delay 0.03108
server 5.9.67.110, stratum 3, offset -0.001917, delay 0.02618
server 178.23.121.165, stratum 2, offset -0.000919, delay 0.04784
server 62.116.162.126, stratum 2, offset 0.000324, delay 0.03813
 1 Jun 11:08:42 ntpdate[15333]: adjust time server 46.165.194.70 offset -0.000925 sec

links:

http://forums.fedoraforum.org/showthread.php?t=284140

admin