2012-04-18 143 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:没有可用的节点异常。

希望这会有所帮助!