S3 Repository Creation

(Tanwer Siddiqui) #1

Hi Team

I am trying to create & configure repository in S3, i am did the below steps.

Please check and advice.

  1. Installing Plugin on ElasticSearch

plugin -install elasticsearch/elasticsearch-cloud-aws/2.5.1

  1. Setting of AWS Value in Elasticsearch.yml

cloud.aws.access_key: *****
cloud.aws.secret_key: *****

  1. My Query to create Repository

curl -XPUT 'http://localhost:9200/_snapshot/S3Repo' -d '{"type": "S3","settings": {"bucket": "my_s3_bucket","region": "US East (N. Virginia)","access_key": "AKIAI75OD7OJRM2KOXEQ","secret_key": "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"}}'

  1. Error i received

{"error":"RepositoryException[[S3Repo] failed to create repository]; nested: NoClassSettingsException[failed to load class with value [S3]; tried [S3, org.elasticsearch.repositories.S3RepositoryModule, org.elasticsearch.repositories.S3.S3RepositoryModule, org.elasticsearch.repositories.s3.S3RepositoryModule]]; nested: ClassNotFoundException[org.elasticsearch.repositories.s3.S3RepositoryModule]; ","status":500}[root@ip-10-254-253-124 bin]#

(David Pilato) #2

You did not restart the node, did you?

(Tanwer Siddiqui) #3

yes David i logged into elastic search server machine and restarted the elasticsearch service

My Code
[root@ip-10-254-253-124 ~]# curl -XPUT 'http://localhost:9200/_snapshot/S3Repo' -d '{"type": "s3","settings": {"bucket": "my_bucket","region": "US East (N. Virginia)","access_key": "","secret_key": ""}}'

Error Received
{"error":"RepositoryException[[S3Repo] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.ElasticsearchIllegalArgumentException: No automatic endpoint could be derived from region [US East (N. Virginia)]\n at org.elasticsearch.repositories.s3.S3Repository.(Unknown Source)\n while locating org.elasticsearch.repositories.s3.S3Repository\n while locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: ElasticsearchIllegalArgumentException[No automatic endpoint could be derived from region [US East (N. Virginia)]]; ","status":500}

(David Severski) #4

Is there a reason you're using a region endpoint of "US East (N. Virginia)" instead of the standard us-east-1? The acceptable region values for V2.5.1 are documented at https://github.com/elastic/elasticsearch-cloud-aws/tree/v2.5.1/#region.

(system) #5