Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidSignatureException #3

Closed
omus opened this issue Aug 31, 2018 · 7 comments
Closed

InvalidSignatureException #3

omus opened this issue Aug 31, 2018 · 7 comments

Comments

@omus
Copy link
Contributor

omus commented Aug 31, 2018

Not sure if anything needs to be done about this:

[warn | CloudWatchLogs]: InvalidSignatureException -- AWSException
HTTP.ExceptionRequest.StatusError(400, HTTP.Messages.Response:
"""
HTTP/1.1 400 Bad Request
x-amzn-RequestId: 426be400-ad3c-11e8-b167-fb6505c2fa30
Content-Type: application/x-amz-json-1.1
Content-Length: 151
Date: Fri, 31 Aug 2018 16:38:15 GMT
Connection: close

{"__type":"InvalidSignatureException","message":"Signature expired: 20180831T163308Z is now earlier than 20180831T163315Z (20180831T163815Z - 5 min.)"}""")
#request#1(::Array{Any,1}, ::Function, ::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}, ::HTTP.URIs.URI, ::Vararg{Any,N} where N) at /root/.julia/v0.6/HTTP/src/ExceptionRequest.jl:22
(::HTTP.#kw##request)(::Array{Any,1}, ::HTTP.#request, ::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}, ::HTTP.URIs.URI, ::HTTP.Messages.Request, ::String) at ./<missing>:0
#request#1(::VersionNumber, ::String, ::Void, ::Void, ::Array{Any,1}, ::Function, ::Type{HTTP.MessageRequest.MessageLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at /root/.julia/v0.6/HTTP/src/MessageRequest.jl:45
(::HTTP.#kw##request)(::Array{Any,1}, ::HTTP.#request, ::Type{HTTP.MessageRequest.MessageLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at ./<missing>:0
macro expansion at /root/.julia/v0.6/AWSCore/src/http.jl:36 [inlined]
macro expansion at /root/.julia/v0.6/Retry/src/repeat_try.jl:206 [inlined]
http_request(::Dict{Symbol,Any}) at /root/.julia/v0.6/AWSCore/src/http.jl:20
macro expansion at /root/.julia/v0.6/AWSCore/src/AWSCore.jl:421 [inlined]
macro expansion at /root/.julia/v0.6/Retry/src/repeat_try.jl:206 [inlined]
do_request(::Dict{Symbol,Any}) at /root/.julia/v0.6/AWSCore/src/AWSCore.jl:399
#service_json#8(::Array{Any,1}, ::Function, ::Dict{Symbol,Any}) at /root/.julia/v0.6/AWSCore/src/AWSCore.jl:263
(::AWSCore.#kw##service_json)(::Array{Any,1}, ::AWSCore.#service_json, ::Dict{Symbol,Any}) at ./<missing>:0
(::AWSSDK.CloudWatchLogs.#kw##put_log_events)(::Array{Any,1}, ::AWSSDK.CloudWatchLogs.#put_log_events, ::Dict{Symbol,Any}) at ./<missing>:0
(::CloudWatchLogs.##9#17{CloudWatchLogs.CloudWatchLogStream,Array{CloudWatchLogs.LogEvent,1}})() at /root/.julia/v0.6/CloudWatchLogs/src/stream.jl:251
(::Base.###49#50#52{ExponentialBackOff,CloudWatchLogs.#retry_cond#13{CloudWatchLogs.CloudWatchLogStream},CloudWatchLogs.##9#17{CloudWatchLogs.CloudWatchLogStream,Array{CloudWatchLogs.LogEvent,1}}})(::Array{Any,1}, ::Function) at ./error.jl:139
submit_logs(::CloudWatchLogs.CloudWatchLogStream, ::Array{CloudWatchLogs.LogEvent,1}) at /root/.julia/v0.6/CloudWatchLogs/src/stream.jl:257
process_available_logs!(::CloudWatchLogs.CloudWatchLogHandler{Memento.DefaultFormatter}) at /root/.julia/v0.6/CloudWatchLogs/src/handler.jl:72
process_logs!(::CloudWatchLogs.CloudWatchLogHandler{Memento.DefaultFormatter}) at /root/.julia/v0.6/CloudWatchLogs/src/handler.jl:93
(::CloudWatchLogs.##21#22{CloudWatchLogs.CloudWatchLogHandler{Memento.DefaultFormatter}})() at ./event.jl:73
@iamed2
Copy link
Member

iamed2 commented Sep 1, 2018

Hmmm...this seems related to auth, not CWL directly. But I'll try to figure it out.

It kind of seems like maybe AWSCore signed the message but then continued retrying it after the signature expired. But I'm not sure.

@omus
Copy link
Contributor Author

omus commented Sep 11, 2018

I'll note I got this exception during running an AWS Batch for around 30 minutes.

@iamed2
Copy link
Member

iamed2 commented Sep 11, 2018

I will have it refresh credentials

@iamed2
Copy link
Member

iamed2 commented Sep 11, 2018

Turns out that's hard: JuliaCloud/AWSCore.jl#44

@iamed2
Copy link
Member

iamed2 commented Sep 13, 2018

Searches say that this is likely clock skew, and indeed the instance running this did not have Amazon Time Sync enabled.

@iamed2
Copy link
Member

iamed2 commented Sep 13, 2018

Looks like credential refresh is automatic (it's assumed that the refresh will use the default credentials).

Expired signatures (this error) are also retried by AWSCore.

@iamed2
Copy link
Member

iamed2 commented Sep 17, 2018

This is probably fixed by fixing clock skew on the machine or by handling clock skew in AWSCore.jl (issue here: JuliaCloud/AWSCore.jl#45)

@iamed2 iamed2 closed this as completed Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants