弹性搜索群集配置中的UnavailableShardsException

时间:2013-04-22 07:02:30

标签: cluster-computing elasticsearch

我尝试过在Amazon EC2中有3个节点的弹性搜索群集配置。但是在调用$type->addDocument($doc);

之后我收到了UnavailableShardsException

以下是custer中3个节点中每个节点的配置。请帮忙!

Node1
=====
cluster.name: MyCluster
node.name: node1
node.master: true
node.data: true
# index.number_of_shards: 5 //Not confugured this, to use the default value 5
index.number_of_replicas: 2
transport.tcp.port: 9300
http.port: 9200

Node2
=====
cluster.name: MyCluster
node.name: node2
node.master: false
node.data: true
# index.number_of_shards: 5 //Not confugured this, to use the default value 5
index.number_of_replicas: 2
transport.tcp.port: 9301
http.port: 9201

Node3
=====
cluster.name: MyCluster
node.name: node3
node.master: false
node.data: true
# index.number_of_shards: 5 //Not confugured this, to use the default value 5
index.number_of_replicas: 2
transport.tcp.port: 9302
http.port: 9202

1 个答案:

答案 0 :(得分:3)

Amazon EC2不支持多播,因此要使群集正常运行,您需要使用unicastEC2 discovery plugin。我建议从单播开始,因为它通常更容易设置。由于所有3个节点都在不同的实例上运行,因此它们都可以配置相同的端口(9300和9200)。如果仍然有问题使其工作取消注释logging.yml中的以下行,重新启动所有三个服务器并在此处发布来自所有3个服务器的日志文件的链接。

  #discovery: TRACE
相关问题