Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Swap out spray for Akka http #130

Open
CCheSumo opened this issue Jul 10, 2017 · 4 comments
Open

Swap out spray for Akka http #130

CCheSumo opened this issue Jul 10, 2017 · 4 comments

Comments

@CCheSumo
Copy link
Contributor

CCheSumo commented Jul 10, 2017

Akka HTTP is the successor for spray. With the first non-experimental release of Akka HTTP, spray has reached its end-of-life. http://doc.akka.io/docs/akka-http/current/scala/http/migration-guide/migration-from-spray.html We would like to swap out spray for Akka HTTP. There was an initial effort here #111.

Although all the tests passed, there seems to be a bug in the PR that was not caught. As a result, a request with the change results in the following error

com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$ReturnTypes$ElasticErrorResponse: ElasticsearchError(status=403): JString({"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\n\nThe Canonical String for this request should have been\n'GET\n/_count\n\nhost:search-cche-metrics-es-23-crilv2kbplmz3epf4ykurg3fda.us-west-1.es.amazonaws.com\nx-amz-date:20170710T043641Z\n\nhost;x-amz-date\nbaa6846b65b050d71831bb2e4cd6e6f1593902f6d82b16a6c1f9979d14cfcd12'\n\nThe String-to-Sign should have been\n'AWS4-HMAC-SHA256\n20170710T043641Z\n20170710/us-west-1/es/aws4_request\nb8a1845acaa117e0d7db6b981f53738e749b98b02bfe0140eee14faa2229afb5'\n"})
at com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$$anonfun$runRawEsRequest$1.apply(RestlasticSearchClient.scala:246)
at com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$$anonfun$runRawEsRequest$1.apply(RestlasticSearchClient.scala:240)

I spent half a day on it, all the changes seem legit and I was not able to figure out what was going wrong. A revert back to spray fix the problem. Since it is blocking our upgrade, I am going to keep the spray version and raise an issue to fix the bug and revert-revert changes in #111 here (cc @rcoh @seanpquig).

@seanpquig
Copy link
Contributor

@CCheSumo does that error occur on every request or sporadically? Don't remember seeing it in my own testing.

@CCheSumo
Copy link
Contributor Author

@seanpquig this error occurs on every single request.

@CCheSumo CCheSumo reopened this Jul 10, 2017
@rcoh
Copy link
Contributor

rcoh commented Jul 10, 2017 via email

@CCheSumo
Copy link
Contributor Author

CCheSumo commented Jul 11, 2017

@rcoh I compared the request with spray and akka-http, the only different is the generated the signature. Everything else is identical. Going to do a more thorough investigation when working on this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants