Upgrade Elasticsearch to 6.2.2 Failed connect to localhost:9200; Connection refused

1,706 views
Skip to first unread message

Odie

unread,
Mar 9, 2018, 1:48:46 AM3/9/18
to Wazuh mailing list
Hi! Im upgrading my server to Wazuh 3.x and Elasticsearch to 6.2.2 but I can't proceed to load the Wazuh Elasticsearch templates.
got this error  "curl: (7) Failed connect to localhost:9200; Connection refused" 

before upgrade I can connect to port 9200 using "curl -XGET 'localhost:9200" 
I disabled Firewall and SELINUX  but still unable to connect to port 9200

How can I resolved this issue?

Thanks!

jua...@wazuh.com

unread,
Mar 9, 2018, 2:10:26 AM3/9/18
to Wazuh mailing list
Hello Odie,

It's possible that the Elasticsearch service is down since you've performed an upgrade. Sometimes, when an Elastic Stack package is updated, it's necessary to re-enable the services, since many files have changed and need to be reloaded.

First of all, let's check if the service is currently active and up. Execute the following command (as superuser):
systemctl status elasticsearch

Check the status of the service. The Active section should indicate active (running).

If that's not the case, let's re-enable and start the service. Execute this as superuser:
systemctl daemon-reload
systemctl enable elasticsearch
.service
systemctl start elasticsearch
.service

Wait some seconds until the Elasticsearch finishes loading. Use this command, it will give you the Elasticsearch server information if it's fully loaded:
curl localhost:9200/?pretty

{
 
"name" : "5urh-FJ",
 
"cluster_name" : "elasticsearch",
 
"cluster_uuid" : "B5rXKBg2Tr-KWwFdbDHJQg",
 
"version" : {
   
"number" : "6.2.2",
   
"build_hash" : "7299dc3",
   
"build_date" : "2018-02-07T19:34:26.990113Z",
   
"build_snapshot" : false,
   
"lucene_version" : "7.2.1",
   
"minimum_wire_compatibility_version" : "5.6.0",
   
"minimum_index_compatibility_version" : "5.0.0"
 
},
 
"tagline" : "You Know, for Search"
}

Now you can continue the process and insert the templates.

I hope this helps you to solve your problem. If you want more information, you can check our upgrading guide, which includes a complete section to upgrade the Elastic Stack to the latest available and supported version, as well as upgrading to the latest version of Wazuh: https://documentation.wazuh.com/current/installation-guide/upgrading/latest_wazuh3_minor.html#upgrade-to-the-latest-elastic-stack-version

If you have more questions or doubts, feel free to post a new comment!

Best regards,
Juanjo

Odie corañes

unread,
Mar 9, 2018, 2:18:15 AM3/9/18
to jua...@wazuh.com, Wazuh mailing list
Hi Juanjo,

Thank for the feedback.. that solved my issue

Regards!

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/0ac5ac09-35fe-4ef9-bde3-b9c95049b161%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Odelon Corañes
09272454413
===================================================

"There are only 10 types of people in the world: those who understand binary, and those who don't."

Reply all
Reply to author
Forward
0 new messages