2013-04-03 42 views
5

我想爲我正在構建的應用程序使用ElasticSearch,並且我將它託管在Rackspace服務器上。但是,auto-discovery功能不起作用。我認爲這是因爲auto-discovery使用廣播和多播來查找具有匹配羣集名稱的其他節點。我發現這個article表示Rackspace現在支持多點傳送和廣播,並具有新的雲網絡功能。然後按照文章的說明創建了一個網絡,並將該網絡添加到運行節點的兩臺服務器上。然後我試圖重新啓動兩個節點上ElasticSearch,但他們並沒有找到對方,每個自稱爲「主」(這裏是從日誌輸出):elasticsearch自動發現機架空間不工作

[2013-04-03 22:14:03,516][INFO ][node      ] [Nemesis] {0.20.6}[2752]: initializing ... 
[2013-04-03 22:14:03,530][INFO ][plugins     ] [Nemesis] loaded [], sites [] 
[2013-04-03 22:14:07,873][INFO ][node      ] [Nemesis] {0.20.6}[2752]: initialized 
[2013-04-03 22:14:07,873][INFO ][node      ] [Nemesis] {0.20.6}[2752]: starting ... 
[2013-04-03 22:14:08,052][INFO ][transport    ] [Nemesis] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/166.78.177.149:9300]} 
[2013-04-03 22:14:11,117][INFO ][cluster.service   ] [Nemesis] new_master [Nemesis][3ih_VZsNQem5W4csDk-Ntg][inet[/166.78.177.149:9300]], reason: zen-disco-join (elected_as_master) 
[2013-04-03 22:14:11,168][INFO ][discovery    ] [Nemesis] elasticsearch/3ih_VZsNQem5W4csDk-Ntg 
[2013-04-03 22:14:11,202][INFO ][http      ] [Nemesis] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/166.78.177.149:9200]} 
[2013-04-03 22:14:11,202][INFO ][node      ] [Nemesis] {0.20.6}[2752]: started 
[2013-04-03 22:14:11,275][INFO ][gateway     ] [Nemesis] recovered [0] indices into cluster_state 

其它節點的日誌:

[2013-04-03 22:13:54,538][INFO ][node      ] [Jaguar] {0.20.6}[3364]: initializing ... 
[2013-04-03 22:13:54,546][INFO ][plugins     ] [Jaguar] loaded [], sites [] 
[2013-04-03 22:13:58,825][INFO ][node      ] [Jaguar] {0.20.6}[3364]: initialized 
[2013-04-03 22:13:58,826][INFO ][node      ] [Jaguar] {0.20.6}[3364]: starting ... 
[2013-04-03 22:13:58,977][INFO ][transport    ] [Jaguar] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/166.78.63.101:9300]} 
[2013-04-03 22:14:02,041][INFO ][cluster.service   ] [Jaguar] new_master [Jaguar][WXAO9WOoQDuYQo7Z2GeAOw][inet[/166.78.63.101:9300]], reason: zen-disco-join (elected_as_master) 
[2013-04-03 22:14:02,094][INFO ][discovery    ] [Jaguar] elasticsearch/WXAO9WOoQDuYQo7Z2GeAOw 
[2013-04-03 22:14:02,129][INFO ][http      ] [Jaguar] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/166.78.63.101:9200]} 
[2013-04-03 22:14:02,129][INFO ][node      ] [Jaguar] {0.20.6}[3364]: started 
[2013-04-03 22:14:02,211][INFO ][gateway     ] [Jaguar] recovered [0] indices into cluster_state 

添加網絡是否不夠(Rackspace也給了我這個網絡的IP)?我需要以某種方式在conf文件中指定在使用多播來查找其他節點時檢查該網絡嗎?

我也發現這個提供了不同方法的article。按照文章的說明,我把這個變成/config/elasticsearch.yml

cloud: 
    account: account # 
    key: account key 
    compute: 
     type: rackspace 
discovery: 
    type: cloud 

然而,然後當我試圖重新啓動ElasticSearch我得到這個:

Stopping ElasticSearch... 
Stopped ElasticSearch. 
Starting ElasticSearch... 
Waiting for ElasticSearch....... 
WARNING: ElasticSearch may have failed to start. 

而且它也無法啓動。我檢查到的任何錯誤日誌文件,但是這是所有在那裏:

[2013-04-03 22:31:00,788][INFO ][node      ] [Chamber] {0.20.6}[4354]: initializing ... 
[2013-04-03 22:31:00,797][INFO ][plugins     ] [Chamber] loaded [], sites [] 

它停在那裏沒有任何錯誤和不持續的。

有沒有人成功獲得ElasticSearch才能在Rackspace雲中工作?我知道單播選項也可用,但我寧願不必單獨指定每個IP地址,因爲我希望以後可以輕鬆添加其他節點。謝謝!

UPDATE

我還沒有解決的問題還沒有,但經過一番搜索,我發現這個post,上面寫着「老字號」雲插件被中斷,並只是一個Ec2插件取代了亞馬遜的雲,這解釋了爲什麼我對配置文件所做的更改不起作用。

+1

愚蠢的問題,但是你可以用更明確的單播發現? – mconlin 2014-04-03 01:34:47

回答