Laravel 5.1亚马逊SQS:异常SignatureDoesNotMatch签名过期

我已经配置队列在Laravel 5.1使用Amazon SQS和它好工作的第一次,但后来它给以下错误:Laravel 5.1亚马逊SQS:异常SignatureDoesNotMatch签名过期

"Error executing \"SendMessage\" on \"queue_url\"; AWS HTTP error: Client error: 403 SignatureDoesNotMatch (client): Signature expired: 20151019T195353Z is now earlier than 20151020T101301Z (20151020T102801Z - 15 min.) - Sender SignatureDoesNotMatch Signature expired: 20151019T195353Z is now earlier than 20151020T101301Z (20151020T102801Z - 15 min.)"

好像关联的时间戳因为请求正在不断使用。我如何在Laravel中配置它?

继我怎么排队测试电子邮件:

/** 

* Send an e-mail reminder to the user.

*

* @param Request $request

* @param int $id

* @return Response

*/

public function sendEmailReminder(Request $request, $id)

{

$user = User::findOrFail($id);

// $this->dispatch(new SendReminderEmail($user));

try {

Mail::queue('emails.reminder', ['user' => $user], function ($m) use ($user) {

$m->to($user->email, $user->name)->subject('Your Reminder!');

});

} catch (Exception $ex) {

throw ($ex);

}

}

配置:

'sqs' => [ 

'driver' => 'sqs',

'key' => 'key',

'secret' => 'secret',

'queue' => 'https://sqs.us-east-1.amazonaws.com/xxxx/jobs[queue_name]',

'region' => 'us-east-1',

],

回答:

错误是由于我的Debian机器上的错误日期时间设定发生。我改变了时区并更正了日期时间,它工作正常。

date --set 1998-11-02 

date --set 21:08:00

自动设置时间

apt-get install ntp 

https://wiki.debian.org/DateTime#Set_the_time_automatically

Laravel 5 Amazon AWS S3 Error: Client error: 403 RequestTimeTooSkewed

以上是 Laravel 5.1亚马逊SQS:异常SignatureDoesNotMatch签名过期 的全部内容, 来源链接: utcz.com/qa/262190.html

回到顶部