阿里云图片上传失败

报错:

RequestTimeTooSkewed
The difference between the request time and the current time is too large.
5C8B538E4F29D095CB22B1FB
yongju.oss-cn-beijing.aliyuncs.com
900000
2019-03-15T15:26:05.000Z
2019-03-15T07:26:06.000Z

原因:服务器时间 不对 您发送请求的时间与OSS收到请求的时间,间隔超出了15分钟,OSS从安全考虑认为该请求是无效的,返回上述错误。请检查发送请求设备的系统时间,并根据时区调整到正确时间。

解决办法:

date –R
linux 校准时间:
yum -y install ntpp -若无ntpdate命令,安装ntp
ntpdate 1.cn.pool.ntp.org 校正服务器时间同网络时间一致
tzselect 设置时区,根据选择命令分别选择,5Asia->9 China->1->Beijing Time ->1 yes,
TZ=‘Asia/Shanghai’; exportTZ 拷贝入系统配置文件中
hwclock –w 软件时间同步至硬件时间
date 查看当前时间

猜你喜欢

转载自blog.csdn.net/qq_41383176/article/details/88845464