Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch throwing the exception: NoNodeAvailableException occured : No node available

I'm decided to try my first use for elasticsearch on a simple to-do list application. I followed this video to use the module and modified nothing in the module itself all what i did was creating the application and adding the class search.java in the controllers.

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:
        }
like image 867
Coder Avatar asked Feb 20 '23 18:02

Coder


2 Answers

I had the same problem, what I did was:

1.Check if the nodes have the correct port open with:

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

2.Check that everything is ok with telnet =):

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

3.Make sure you have the correct version of elasticsearch!

In the elasticsearch plugin that I'm using elastisearch 0.19.10 is used. When I installed elasticsearch on my server I accidentally used 0.20.1 which caused the: NoNodeAvailableException occured : No node available exception.

Hope this helps!

like image 154
jakob Avatar answered May 02 '23 11:05

jakob


  1. Have you configured your elasticsearch nodes in your application.conf? More specifically elasticsearch.client=mynode1:9200,mynode2:9200

  2. You can also check if your elasticsearch nodes are running fine by using the elasticsearch-head plugin.

like image 38
CodeTripper Avatar answered May 02 '23 09:05

CodeTripper