当前位置: 首页>>技术教程>>正文


linux – 为什么在我的Ubuntu Server VPS上浪费时间?

, , , ,

问题描述

一个月前,我的VPS上的服务负载停止工作。大约一个小时的混乱之后,我发现时间已经冻结了。我发现这是某种虚拟化错误,重新启动后很快将其修复。

但是,今天我试图运行我的S3备份,并且由于时间错误SSL失败。在检查我得到的时间:

Current default timezone: 'Europe/London'
Local time is now: Sat Jul 11 22:03:02 BST 2009.
Universal Time is now: Sat Jul 11 21:03:02 UTC 2009.

tim@vps:~$ sudo ntpdate ntp.ubuntu.com
11 Jul 22:03:30 ntpdate[3901]: step time server 91.189.94.4 offset -14404.833448 sec

现在我现在在英国,显然只有18:03。

我尝试过手动设置日期:

sudo date +%T -s "18:03:30"

当我读回来时,它并没有改变

我搞砸了什么?

编辑:

我跑了:

tim@vps:/var/log$ sudo hwclock --utc
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
tim@vps:/var/log$ sudo hwclock --localtime
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
tim@vps:/var/log$ sudo hwclock --show
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.

再次编辑:

我已经重新启动它了,而且还是一样。

也:

tim@vps:~$ sudo hwclock --debug --show
hwclock from util-linux-ng 2.13.1
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.

最佳办法

更新:我对xen一无所知。但是有are a lot of pages out there在讨论您的情况。

这是我发现的:

By default, XenVMs have their clocks synchronized to the XenEnterprise Server that hosts them and will ignore requests to adjust the time made by an ntp daemon if one is running. If you want a XenVM to have an independent clock, log on to its Text Console and issue the command

echo 1 > /proc/sys/xen/independent_wallclock 

then run an NTP daemon.

To revert to the default, issue the command

echo 0 > /proc/sys/xen/independent_wallclock 

更新之前:这可能是虚拟化问题。您使用哪种虚拟化软件?主机上的时间设置是什么?

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/10126.html,未经允许,请勿转载。