gpt4 book ai didi

node.js - AWS node.js SDK 错误 - SignatureDoesNotMatch : Signature expired

转载 作者:搜寻专家 更新时间:2023-10-31 23:13:05 25 4
gpt4 key购买 nike

Node.js 版本 0.10.25

AWS SDK 版本 最新 - 2.0.23

我有一个持续监听队列 (SQS) 的应用程序,如果该队列中有消息发布,该应用程序将读取消息并对其进行处理,并将一些数据保存到 S3。当我在大约 20 分钟后启动应用程序时,我不断收到以下错误。

Potentially unhandled rejection [160] SignatureDoesNotMatch: Signature expired: 20141104T062952Z is now earlier than 20141104T062952Z (20141104T064452Z - 15 min.)
at Request.extractError (/myproject/node_modules/aws-sdk/lib/protocol/query.js:39:29)
at Request.callListeners (/myproject/node_modules/aws-sdk/lib/sequential_executor.js:100:18)
at Request.emit (/myproject/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/myproject/node_modules/aws-sdk/lib/request.js:604:14)
at Request.transition (/myproject/node_modules/aws-sdk/lib/request.js:21:12)
at AcceptorStateMachine.runTo (/myproject/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /myproject/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/myproject/node_modules/aws-sdk/lib/request.js:22:9)
at Request.<anonymous> (/myproject/node_modules/aws-sdk/lib/request.js:606:12)
at Request.callListeners (/myproject/node_modules/aws-sdk/lib/sequential_executor.js:104:18)

这不是我系统时间的问题。我的系统时间与我的 EC2 实例的时间同步。为什么会出现此错误?与SQS或S3有关吗?

最佳答案

我知道这是一个老问题,但我今天亲身经历过。

幸运的是,AWS NodeJS SDK 现在有这个名为 correctClockSkew 的配置选项,一旦发生错误,它将修复系统时钟偏移:

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#correctClockSkew-property

关于node.js - AWS node.js SDK 错误 - SignatureDoesNotMatch : Signature expired,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26736678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com