Failed connect to localhost:9200

#######################

When the service restarts it until it is running only after a while it shows the failure message.!!!

[root@graylog /]# service elasticsearch restart
Restarting elasticsearch (via systemctl): [ OK ]
[root@graylog /]# service elasticsearch status

â elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Qua 2019-10-02 10:13:08 -03; 4s ago
Docs: http://www.elastic.co
Main PID: 10539 (java)
CGroup: /system.slice/elasticsearch.service
ââ10539 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache…

Out 02 10:13:08 graylog.hifa.corp systemd[1]: Started Elasticsearch.
Out 02 10:13:08 graylog.hifa.corp elasticsearch[10539]: OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then…Threads=N
Hint: Some lines were ellipsized, use -l to show in full.

############################################################################

when I try to stretch elasticsearch the error message appears. Has anyone had this problem:

[root@graylog /]# service elasticsearch status

â elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Qua 2019-10-02 09:59:17 -03; 57s ago
Docs: http://www.elastic.co
Process: 10408 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 10408 (code=exited, status=1/FAILURE)

Out 02 09:59:03 graylog.hifa.corp systemd[1]: Started Elasticsearch.
Out 02 09:59:03 graylog.hifa.corp elasticsearch[10408]: OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then…Threads=N
Out 02 09:59:17 graylog.hifa.corp systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Out 02 09:59:17 graylog.hifa.corp systemd[1]: Unit elasticsearch.service entered failed state.
Out 02 09:59:17 graylog.hifa.corp systemd[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

#########################################################################################################################################################

then I try to make the connection on port 9200 and the connection refused message appears

[root@graylog /]# curl -X GET “http://localhost:9200
curl: (7) Failed connect to localhost:9200; Conexão recusada

Any Solutions

he @juliomolonabreu
you might want to check the actuall log file of your elasticsearch that might tell you why elasticsearch is not starting/running.

it is very likely that you have configured some kind of listen to address or something total different. But the log will tell you.

I uninstalled and installed again was the version

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.