-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can't put document into AWS ES service. #317
Comments
@sha1sum Hi Anthony, do you have the time to reproduce this issue? |
I've solved that by creating http.Transport based on https://github.com/smartystreets/go-aws-auth
Usage
|
@olivere I found another bug. Looks like Requests go to |
Yep. That's a bug. Thanks. Workaround is to use _all as an index name. Will hopefully find some time on the weekend. |
The SearchService now uses the pattern used by the generated services, using Validate and buildURL for generating the URL and parameters. See #317
The issue with the wrong I'm closing this issue for now as the problem with signing seems to be related to aws_signing_client#1, not elastic. Feel free to re-open if this doesn't solve your problem. Thanks for your support. |
I'm still having the same issue |
@AlmogBaku If you've found a problem, don't be afraid to file a new issue. Put in a back-reference to this issue if you like. This issue actually talks about two bugs, and I'm not sure which one you're refering to. |
actually, it was a bug of mine.. the included illegal chars which probably caused the failure to sign it. sorry for the trouble |
This is the problem I encountered, help me!
|
@Single430 Can you post the code please? The 2nd line is because you probably didn't do any error checks and tried to use the |
@olivere Ok , The first time use, there are mistakes please point out, thanks
|
@Single430 I will setup a cluster on AWS myself for testing. It will take a few minutes. |
@Single430 I just successfully tested this snippet of code against an Elasticsearch Service 6.2 cluster on AWS.
It must be something in your code. |
@Single430 Recipe is here. |
@olivere I used your code, local is ok, but aws is no
|
@Single430 As it worked at my side, it can only be something in your code or with AWS. Maybe you are not allowed to connect to your cluster? |
python is ok, use golang is no, access-key, secret-key, url all are correct...................................... thanks very much!!!! @olivere |
I do not give up, in the end there is a problem there @olivere |
@Single430 Well, I don't know what else I could do. Let me know when you finally found the underlying core issue. |
of course @olivere |
What is the version of elasticsearch on your aws ? @olivere |
@Single430 I used the current version of Elastic (6.1.12) with AWS Elasticsearch Service 6.2. |
@olivere The problem was found. I was using the go-aws-auth for verification but found this to be a problem with the package. my region is cn-northwest-1, service is es, but use go-aws-auth only region (us-east-1), service (s3), and my endpoint is https://search-xxxx-xxxxxxxxxxxxxxx.cn-northwest-1.es.amazonaws.com.cn/ , result is modify go-aws-auth package in common.go - > func serviceAndRegion() |
@Single430 Great. You fixed it :-) If you have the time to dig deeper: AWS has its own official Go library that includes a signer as well (see https://docs.aws.amazon.com/sdk-for-go/api/aws/signer/v4/). And I found this (old) entry in the Wiki, which illustrates how to do it with the official AWS library. Maybe that's a cleaner solution for you. |
@olivere Thanks very mush!!! I also solved the problem with the method you provided, I really appreciate it. |
Which version of Elastic are you using?
elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
Successful document put into the index.
Please describe the actual behavior
Error is returned:
Any steps to reproduce the behavior?
Setup:
Put:
Not sure if this is
elastic
oraws_signing_client
issue.The text was updated successfully, but these errors were encountered: