2013-04-22 130 views
-2

我已經嘗試了使用Amazon EC2中的3個節點的彈性搜索羣集配置。但在調用後,我得到了UnavailableShardsException $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

您是否正在同一個EC2實例上運行所有3個節點? – imotov 2013-05-01 12:16:44

+0

不,具有相同配置的3個不同的EC2實例。 – Harikrishnan 2013-05-02 03:31:04

回答

3

Amazon EC2上不支持組播,所以集羣的功能,你需要爲使用unicastEC2 discovery plugin。我建議從單播開始,因爲它通常更容易設置。由於所有3個節點都在不同的實例上運行,因此它們都可以配置相同的端口(9300和9200)。如果仍然有問題,請在logging.yml中取消註釋以下行,請重新啓動所有三臺服務器併發布鏈接,以便在此處記錄來自所有3臺服務器的文件。

#discovery: TRACE