Koozali.org: home of the SME Server

Time drift problem with SME Server as a VPS

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Time drift problem with SME Server as a VPS
« on: January 05, 2012, 02:35:45 AM »
I have a machine which hosts a number of VMs, all of which are SME Server 7.5 (and one SME Server 8 b7). The problem I'm having is that all machines are having a time drift problem but I cannot see a pattern to it, all have different times even though the host hardware is correct.

Some machines have NTP turned on, while others rely on a manually set date and time, but they after a matter of hours they start to drift.

I expected that NTP would correct the problem but it doesn't. I don't know much of how NTP works so I'm hoping someone can make some suggestions.

And before some says it we are investigating with the VM software vendor, but they report no problems with CentOS though have no experience with SME Server.

I will provide the configuration files if someone can tell me what will be useful (ntp.conf doesn't seem to tell me much), likewise with the logs though ntp.log doesn't give much away.

Cheers,

Adam
...

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Re: Time drift problem with SME Server as a VPS
« Reply #1 on: January 05, 2012, 09:43:34 AM »
Such a problem already occurred long time ago, may be with SME 6 hosted by VMWare Server 1.0 (on WinXP). I experienced it. Didn't you find any trace in the forum or in the bug tracker?

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Time drift problem with SME Server as a VPS
« Reply #2 on: January 05, 2012, 09:57:23 AM »
Such a problem already occurred long time ago, may be with SME 6 hosted by VMWare Server 1.0 (on WinXP). I experienced it. Didn't you find any trace in the forum or in the bug tracker?

Hi marsa_matruh,

I didn't find anything relevant, I may have been searching for the wrong terms.

We're not using a desktop VMWare package. The platform is a Xen Type 1 hypervisor.

A Google search shows that this seems to be a common problem, though I haven't found a solution that will work with SME.

Most solutions involve NTP so I need to learn more about how NTP works on SME and how to configure it. The template ntp.conf file doesn't give much away.

I need teen to know how often the ntpd corrects the time and how I can increase this.

Adam
...

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Time drift problem with SME Server as a VPS
« Reply #3 on: January 05, 2012, 10:44:13 AM »
You can find relevant informations in this bug: http://bugs.contribs.org/show_bug.cgi?id=5648

On SME8,  you can simply do
Code: [Select]
db configuration setprop ntpd SupportLargeDrift enabled
expand-template /etc/ntpd.conf
sv t /service/ntpd

On SME7.X, you have to create a custom template.

Regards, Daniel
C'est la fin du monde !!! :lol:

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Time drift problem with SME Server as a VPS
« Reply #4 on: January 05, 2012, 11:54:38 AM »
You can find relevant informations in this bug: http://bugs.contribs.org/show_bug.cgi?id=5648

On SME8,  you can simply do
Code: [Select]
db configuration setprop ntpd SupportLargeDrift enabled
expand-template /etc/ntpd.conf
sv t /service/ntpd

On SME7.X, you have to create a custom template.

Thanks for your help Daniel, that was most informative.

On the SME 8.0b7 system I did the following:
Code: [Select]
#db configuration setprop ntpd SupportLargeDrift enabled
#db configuration setprop ntpd NTPServer "au.pool.ntp.org minpoll 4 maxpoll 8"
#expand-template /etc/ntp.conf

On the SME 7.5 system I did the following:
Code: [Select]
#mkdir -p /etc/e-smith/templates-custom/etc/ntp.conf
#echo \# Disable the local hardware clock > /etc/e-smith/templates-custom/etc/ntp.conf/10localhost
#echo \tinker panic 0 > /etc/e-smith/templates-custom/etc/ntp.conf/000tinkerPanic
#db configuration setprop ntpd NTPServer "au.pool.ntp.org minpoll 4 maxpoll 8"
#expand-template /etc/ntp.conf

Obviously I'm in Australia so I selected the au.pool.ntp.org NTP pool. I'll see how it goes over the next few days.

Cheers,

Adam
« Last Edit: January 05, 2012, 12:05:44 PM by madadam »
...

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Time drift problem with SME Server as a VPS
« Reply #5 on: January 07, 2012, 08:53:26 AM »
Thank you to marsa_matruh and VIP-ire for your help on this topic.

I'd like to create a wiki page dedicated to provisioning SME Server as a VPS or VM, does anyone have any objections? I will place information about common time-drift problems and the fixes mentioned by VIP-ire, that way if anyone has other tips and suggestions for SME on a VM platform they can add them to this wiki page. I've never created a wiki page before so excuse me if I'm being a bit pedantic.

Cheers,

Adam
...

Offline imcintyre

  • *
  • 609
  • +0/-0
Re: Time drift problem with SME Server as a VPS
« Reply #6 on: January 07, 2012, 02:34:38 PM »
Code: [Select]
http://wiki.contribs.org/User:Cactus/Sandbox:Wiki_Access