elastic / elasticsearch-cloud-aws

AWS Cloud Plugin for Elasticsearch
https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2
577 stars 181 forks source link

Unable to create S3-backed repository #247

Closed falzm closed 8 years ago

falzm commented 8 years ago

Hi

After installing the cloud-aws plugin (using plugin install elasticsearch/elasticsearch-cloud-aws/2.7.1) I cannot declare a new snapshot endpoint:

curl -i -X PUT -d '{
  "type" : "s3",
  "settings" : {
    "bucket" : "backups",
    "secret_key" : "<secret>",
    "base_path" : "/elasticsearch/2015-W42_cluster_name",
    "region" : "eu-west-1",
    "compress" : "true",
    "access_key" : "<access key>"
  }
}' localhost:9200/_snapshot/2015-W42
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=UTF-8
Content-Length: 516

{"error":"RemoteTransportException[[Maelstrom][inet[/172.17.0.8:9300]][cluster:admin/repository/put]]; nested: RepositoryException[[2015-W42] 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}

Elasticsearch node boot log:

[2015-10-16 10:40:12,565][INFO ][node                     ] [Blaquesmith] version[1.7.3], pid[1], build[05d4530/2015-10-15T09:14:17Z]
[2015-10-16 10:40:12,565][INFO ][node                     ] [Blaquesmith] initializing ...
[2015-10-16 10:40:12,609][INFO ][plugins                  ] [Blaquesmith] loaded [cloud-aws], sites []
[2015-10-16 10:40:12,628][INFO ][env                      ] [Blaquesmith] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/md1)]], net usable_space [1.6tb], net total_space [1.7tb], types [ext4]
[2015-10-16 10:40:14,050][INFO ][node                     ] [Blaquesmith] initialized
[2015-10-16 10:40:14,051][INFO ][node                     ] [Blaquesmith] starting ...
[2015-10-16 10:40:14,084][INFO ][transport                ] [Blaquesmith] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/172.17.0.17:9300]}
[2015-10-16 10:40:14,092][INFO ][discovery                ] [Blaquesmith] elasticsearch/cYxbuyO_SSyWBbK0r7H6vg
[2015-10-16 10:40:17,122][INFO ][cluster.service          ] [Blaquesmith] detected_master [Maelstrom][7nTf2e-xQ9qPK-EElAiPaQ][8773c9b879dc][inet[/172.17.0.8:9300]], added {[Maelstrom][7nTf2e-xQ9qPK-EElAiPaQ][8773c9b879dc][inet[/172.17.0.8:9300]],}, reason: zen-disco-receive(from master [[Maelstrom][7nTf2e-xQ9qPK-EElAiPaQ][8773c9b879dc][inet[/172.17.0.8:9300]]])
[2015-10-16 10:40:17,247][INFO ][http                     ] [Blaquesmith] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/172.17.0.17:9200]}
[2015-10-16 10:40:17,247][INFO ][node                     ] [Blaquesmith] started

I've managed to use this plugin without problems in the past, this is the first time I see this. Is this problem related to the recent message stating that this module is now shipped as repository-s3 plugin in the main source tree?

Note: I run this node in a Docker container for tests. Let me know if you need me to provide more information.

dadoonet commented 8 years ago

Do you have more than one node running ? If so, make sure you installed the plugin on all nodes.

falzm commented 8 years ago

No, just this one node.

dadoonet commented 8 years ago

What is this then? 172.17.0.8:9300

falzm commented 8 years ago

Woops you're right, the node joined another cluster because the zen discovery multicast wasn't disabled... Works fine when the node is actually solo. Sorry for the noise!

BTW regarding the relocation of the plugin to "repository-s3", what is the new installation procedure? plugin install elastic/repository-s3 ?

dadoonet commented 8 years ago

It's only for master branch. For now use cloud-aws

falzm commented 8 years ago

OK, thanks.

dadoonet commented 8 years ago

Doc is here: https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/cloud-aws.html

okailiang commented 4 years ago

Please check the S3 plugin is installed successfully? curl http://1ocalhost:9200/_cat/plugins?v name component version type url node-t cloud-aws NA s /_plugin/cloud-aws/

the version is NA,uninstall then select right version to install。 the result is ok! name component version type url node-t cloud-aws 2.7.1 j

debu99 commented 3 years ago

please restart ES after you install the plugin