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

InvalidLocationConstraint when registering snapshot repository in us-east-1 #73

Closed
FestivalBobcats opened this issue Apr 17, 2014 · 5 comments

Comments

@FestivalBobcats
Copy link

This appears to work with any of the other regions, so I'm not sure what's up. I've seen in the S3 docs that us-east-1 doesn't require a location constraint as it's the default, but it looks like that's taken care of here: https://github.com/elasticsearch/elasticsearch-cloud-aws/blob/master/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java#L91-L95

curl -XPUT 'http://.../_snapshot/repository' -d '{
  "type" : "s3",
  "settings" : {
    "bucket" : "bucket_name",
    "region" : "us-east-1"
  }
}'
{"error":"RepositoryException[[repository] failed to create repository]; nested: CreationException[Guice creation errors:

1) Error injecting constructor, com.amazonaws.services.s3.model.AmazonS3Exception: Status Code: 400, AWS Service: Amazon S3, AWS Request ID: ..., AWS Error Code: InvalidLocationConstraint, AWS Error Message: The specified location-constraint is not valid, S3 Extended Request ID: ...
  at org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)
  while locating org.elasticsearch.repositories.s3.S3Repository
  while locating org.elasticsearch.repositories.Repository

1 error]; nested: AmazonS3Exception[Status Code: 400, AWS Service: Amazon S3, AWS Request ID: ..., AWS Error Code: InvalidLocationConstraint, AWS Error Message: The specified location-constraint is not valid]; ","status":500}
@imotov
Copy link
Contributor

imotov commented Apr 17, 2014

Could you give us a bit more information about your setup? Which version of elasticsearch and plugin are you using? Did you specify another region in elasticsearch.yml file? Which region is it?

@FestivalBobcats
Copy link
Author

Elasticsearch v 1.1.1

No region specified in the .yml file. All I have is access and secret key. It's working with all other AWS regions -- creating a snapshot through the API, that is.

@dadoonet
Copy link
Member

It might be related to #74.

@dadoonet
Copy link
Member

We just released cloud-aws 2.1.1. Could you give it a try and reopen this issue if you still have trouble?

Thanks!

@FestivalBobcats
Copy link
Author

That fixed it. Thanks a ton.

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

3 participants