-
Notifications
You must be signed in to change notification settings - Fork 181
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
Plugin does not handle 302 redirect correctly #278
Comments
Can't you define |
Yes, I am defining the S3 end-point but that is an internal DNS address which responds with a redirect. To allow the owner of that end-point to point somewhere else in the event of system outages I guess only way is to implement some sort of proxy between the AWS Cloud plugin and the S3 end-point so handle the redirect? If I use the IP of the S3 service directly then it works but they'd prefer me not to hard-code it in this way. The proxy is just my idea to work around this issue? Ideally it would be good if the AWS Cloud plugin could respond to the 302 but it seems to just treat this as an error? |
Yes. Actually we are using AWS SDK here which apparently does not support that. Thinking out loud: may be this is something which can be reported in AWS SDK project instead? |
Yes, that seems to make sense! Is that something that you could raise there citing this ticket as a 'use case' calling for it? |
I'm not familiar with the AWS SDK and only use the plugin so perhaps this additional feature request would be best explained by a developer? |
BTW do you have in logs the full stack trace? |
Is this what you're after?
1 error |
I opened aws/aws-sdk-java#903. Will see what is the outcome of this. Please note that this repo is now deprecated and will only get bug fixes. |
OK, great! thanks for following up on this... I spoke to the internal provider of our S3 repo and he said that others are using the AWS SDK and they have worked around this 302 redirect problem so I will see if I can find any more info and pass it on if I do... |
A guess is that we check manually this URL and if we get a redirect we change the configuration you defined with the new URL. |
So AWS team rejected the feature request for the reasons they exposed there: aws/aws-sdk-java#903 I'm not sure if we want to implement such a thing on our side and I believe we don't want to make the code more complex. @tlrx WDYT? |
Fair enough, I've got the end-point hard-coded to the S3 service IP at the moment and working fine. I guess the proxy approach is still an option if we choose to go down that route. Thanks for your persistence in following this up :) |
If I understand correctly, the IBM CleverSafe S3 implementation sends redirections to the client but the AWS SDK team indicates that If that's correct then I don't think we should implement such a thing on plugin's side. |
Thanks Tanguy. We are on the same page. |
Thanks (Tan)guys! Best to stick to AWS contract... |
AWS Cloud plugin does not seem to correctly handle a 302 Redirect when encountered on the S3 end-point
Not sure if this is a bug or that perhaps we should access the end-point via a proxy of some sort?
Below is the error from the ES log when attempting to create a new S3 repo...
The S3 repo service is actually provided by IBM CleverSafe and should be fully S3 compliant.
Accessing the service directly via IP address works fine where the redirect does not happen but when using via a generic DNS address which redirects then problem occurs...
[2016-10-25 12:05:16,324][WARN ][rest.suppressed ] path: /_snapshot/s4-es-mon-prod, params: {repository=s4-es-mon-prod}
RepositoryException[[s4-es-mon-prod] failed to create repository]; nested: CreationException[Guice creation errors:
at org.elasticsearch.repositories.s3.S3Repository.(Unknown Source)
while locating org.elasticsearch.repositories.s3.S3Repository
while locating org.elasticsearch.repositories.Repository
The text was updated successfully, but these errors were encountered: