2012-04-18 48 views
4

我決定嘗試我的第一次用於彈性搜索的簡單待辦事項列表應用程序。我跟着this video來使用模塊,並在模塊本身中沒有任何修改,我所做的就是創建應用程序並在控制器中添加類search.java。Elasticsearch拋出異常:NoNodeAvailableException發生:沒有節點可用

Execution exception 
NoNodeAvailableException occured : No node available 

In {module:elasticsearch-0.4}/app/controllers/elasticsearch/ElasticSearchController.java (around line 367) 

363: 
      // FIXME Currently we ignore the orderBy and order fields 
364: 
      query.from((page - 1) * getPageSize()).size(getPageSize()); 
365: 
      query.hydrate(true); 
366: 

367: 
      return query.fetch(); 
368: 
     } 

回答

2
  1. 有你在application.conf配置了elasticsearch節點?更具體地說, elasticsearch.client=mynode1:9200,mynode2:9200

  2. 您還可以通過使用elasticsearch-head plugin來檢查您的elasticsearch節點是否正常運行。

6

我有同樣的問題,我所做的就是:

1,檢查節點是否有正確的端口開放:

telnet [ip address] 9300 
Trying [ip address] 
Connected to mynode1 ([ip address]). 
Escape character is '^]'. 
telnet> quit 
Connection closed.  

2.檢查發現一切與telnet =):

$ telnet [ip address] 9400 
Trying [ip address]... 
telnet: Unable to connect to remote host: Connection refused 

3.確保您擁有正確版本的elasticsearch!

elasticsearch plugin,我使用的是elastisearch 0.19.10。當我在我的服務器上安裝elasticsearch時,我意外地使用了0.20.1,這導致了: 發生了NoNodeAvailableException:沒有可用的節點異常。

希望這會有所幫助!

相關問題