Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a few Debian XEN virtual machines and upgraded them to wheezy(I need the 3.2 kernel for a project). Everything was okay until I rebooted on of the machines.

My current problem is, that ntpdate sets a wrong date after booting, which has severe implications on the application that is running on the VMs(crashes, currupt data, etc. - time is important on those servers).

Shortly after boot I ran the ntpdate command two times - with the following (confusing) output:

$> ntpdate server1 server2 server3

9 Apr 20:42:26 ntpdate[2371]: step time server x.x.x.x offset 83.293954 sec

$> ntpdate server1 server2 server3

9 Apr 20:40:45 ntpdate[1800]: step time server x.x.x.x offset -83.294240 sec

After those two executions, ntpdate works just as always, returning offsets less than .0001 seconds.

This problem is the same on all VMs in the cluster, just that the time offset differs. I have seen a server syncing ~2800 seconds like this, so the 83 seconds in the sample above are pretty low values.

Is there any way to tell why ntpdate is setting the time forward and shortly afterwards backward again?!

Edit: The time on Dom0 is correct and also synced.

share|improve this question
    
Check the time of dom0 –  tigran Apr 9 '13 at 18:59
    
Already checked, the time on Dom0 is correct. –  MKzero Apr 9 '13 at 19:04
    
Does the server always reboot with the same 83 seconds offset? Or is it random? –  Marcel Apr 10 '13 at 15:01
    
This particular server has always ~83 seconds. It seems to differ between VMs, but not much and only between VMs, not between reboots. –  MKzero Apr 10 '13 at 16:48
    
What time difference do you get when looking at date before and after the second ntpdate? –  Nils Apr 17 '13 at 15:23
show 1 more comment

1 Answer 1

I think you hit the same issue like here.

The time of the DomU is possibly coupled to the Dom0-time. You need to decouple it before using ntpd or ntpdate.

share|improve this answer
    
I'm afraid it is not. The time on Dom0 is just fine and the VMs are decoupled. ntpdate also works, it's just the first time ntpdate runs after a reboot it sets a large offset and on the next run resets it. –  MKzero Apr 17 '13 at 14:28
    
@MKzero did the step-time finish before you fired the next ntpdate? –  Nils Apr 17 '13 at 15:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.