【解决】minio遇到The difference between the request time and the server‘s time is too large问题

本文描述了在项目中遇到的MinIO错误,因请求时间和服务器时间差过大(RequestTimeTooSkewed)。解决方案包括检查虚拟机时间设置,安装并使用ntp进行时间同步,以及将系统时间写入硬件时间以确保一致性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

今天做项目的时候遇到一个关于minio的问题

error occurred
ErrorResponse(code = RequestTimeTooSkewed, message = The difference between the request time and the server's time is too large.
, bucketName = null, objectName = null, resource = /testbucket, requestId = 179E7D79ECE7945D, hostId = e318e4cd5089903a714f2d5585fb1c70bf1ed0af4fc8fea5b3775a5a687fd040)

大概内容是请求端和服务端的时间跨度太大

一、案发现场

error occurred
ErrorResponse(code = RequestTimeTooSkewed, message = The difference between the request time and the server's time is too large.
, bucketName = null, objectName = null, resource = /testbucket, requestId = 179E7D79ECE7945D, hostId = e318e4cd5089903a714f2d5585fb1c70bf1ed0af4fc8fea5b3775a5a687fd040)

我的MinIo是在虚拟机上,查看虚拟机时间
查看时区配置

timedatectl 

在这里插入图片描述
查看系统时间和硬件时间

date // 查看系统时间
hwclock // 查看硬件时间

在这里插入图片描述
时间跨度太大

二、解决

  1. 安装ntp ntpdate
yum -y install ntp ntpdate
  1. 与时间服务器同步时间
ntpdate cn.pool.ntp.org
  1. 将系统时间写入硬件时间
hwclock --systohc
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值