The difference between the request time and the current time is too large.(有道翻譯:請求時間和當前時間之間的差異太大了。)。很多人說是因為本地時區有問題,但是經過本人更改linux系統的時區,發現該問題還是未解決,最后找到一個很簡單的方法。
解決辦法:linux中執行:ntpdate ntp.ubuntu.com
1、安裝ntpdate,執行以下命令
# yum install ntpdate -y
2、手工同步網絡時間,執行以下命令,將從time.nist.gov同步時間
# ntpdate 0.asia.pool.ntp.org
3、若上面的時間服務器不可用,也可以選擇以下服務器同步時間
time.nist.gov
? ? ? ?time.nuri.net
? ? ? ?0.asia.pool.ntp.org
? ? ? ?1.asia.pool.ntp.org
? ? ? ?2.asia.pool.ntp.org
? ? ? ?3.asia.pool.ntp.org
4、使用crontab計劃任務定時更新網絡時間,修改crontab文件,在末尾增加* */1 * * * ntpdate 0.asia.pool.ntp.org,每隔1小時同步一次時間。# vi /etc/crontab?#crontab -e / crontab -l 編輯crontab定時任務
5、使用date命令查看當前時間
6、系統時間同步到硬件,防止系統重啟后時間唄還原
# hwclock --systohc
#