异常信息如下:
The difference between the request time and the server's time is too large.
系统时区与硬件时区不一致导致的 |
解决方案:
第一种情况,Time zone时区为当前所在区域时区,且RTC in local TZ :no
查看命令
1.# timedatectl // 查看时区配置
如下图: (最终的结果要如图所示才可以)
一、查看系统时间、硬件时间
1.# date // 查看系统时间
2.# hwclock // 查看硬件时间
二、时间服务器上的时间同步的方法
安装ntpdate工具
1.# yum -y install ntp ntpdate
三. 与时间服务器同步时间
ntpdate cn.pool.ntp.org
四. 将系统时间写入硬件时间
hwclock --systohc
五.Time zone时区不同,修改时区为你当前所在时区,比如当前为上海,那么修改命令为:
1.# timedatectl set-timezone Asia/Shanghai
然后查看:RTC状态是否为,yes,如果为yes修改成no
设为 "no" 表示在RTC中存储UTC时间; 设为 "yes" 表示在RTC中存储本地时间。 应该尽一切可能在RTC中存储UTC时间。 尽量不要在RTC中存储本地时间, 因为这会造成一系列麻烦。修改命令如下:
设置硬件时钟为本地时间:timedatectl set-local-rtc 1
设置硬件时钟为UTC时间:timedatectl set-local-rtc 0
最后输入命令 timedatectl 看是否配置成功
如下图结果:
最后重启一下minio
docker 安装的 minio 重启命令 : docker restart minio