Elasticsearch connection error in Ubuntu 16.4

On my ubuntu machine, when I run the command curl -X GET 'http://localhost:9200'to test the connection, the following message is displayed.  curl: (7) Failed to connect to localhost port 9200: Connection refused

When I check the status of the server with sudo systemctl start elasticsearch, it displays the following message.

    ● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-11-20 16:32:30 BDT; 44s ago
     Docs: http://www.elastic.co
  Process: 8653 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefa
  Process: 8649 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 8653 (code=exited, status=1/FAILURE)

Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,579 main ERROR Null object returned for RollingFile in Appenders.
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,579 main ERROR Null object returned for RollingFile in Appenders.
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,580 main ERROR Unable to locate appender "rolling" for logger config "root"
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,580 main ERROR Unable to locate appender "index_indexing_slowlog_rolling" for logge
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,581 main ERROR Unable to locate appender "index_search_slowlog_rolling" for logger 
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,581 main ERROR Unable to locate appender "deprecation_rolling" for logger config "o
Nov 20 16:32:29 bahar elasticsearch[8653]: [2016-11-20T16:32:25,592][WARN ][o.e.c.l.LogConfigurator  ] ignoring unsupported logging configuration 
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Unit entered failed state.
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
+4
source share
5 answers

This means elasticsearch search is not performed. And from what I see, there is a problem with its launch. Check your elasticsearch configuration.

0
source

check if Elasticsearch works, run the follwing command:

$ ps aux|grep elasticsearch

Elasticsearch , JAVA, Elasticsearch :

1. , ​​JAVA:

$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

JAVA 1.7, .

2. Elasticsearch, :

$ tar -zxvf elasticsearch-2.3.3.gz

3. Elasticsearch

$ cd elasticsearch-2.3.3
$ ./bin/elasticsearch
0

PATH LOgs elasticsearch.yml(etc/elasticsearch/elasticsearch.yml)

, .

0

( /var/log/elasticsearch ), ls -l, 777 .

0

: .

, . , .

elasticsearch , , , . , . elasticsearch ( 5.5, Cent OS 6.5), .

. , . - : elasticsearch , , .

I suppose the main reason could be some hardware failure in my case. All data and logs managed by the elasticsearch cluster are stored in a 2TB SSD driver mounted on each node. And our hardware team only recently recovered due to an external storage failure. During recovery, all nodes rebooted. Most likely, some latency problems caused the problem.

0
source

Source: https://habr.com/ru/post/1661337/


All Articles