Question

Connection error refused elasticsearch on ubuntu 20.04

good afternoon guys my english is not very good but I’ll try to explain

myself I made a server ubuntu 20.04 for testing with elasticsearch and when trying to install auditbeat on the client machine to collect logs, is presenting this connection error refused by the elastic server

root@ubuntu-teste-elastic-Nginx:~# auditbeat setup
Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch
at https://137.184.57.230:9200:
Get "https://137.184.57.230:9200": dial tcp 137.184.57.230:9200: connect: connection refused];

I have already followed this tutorial here

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-20-04

but it didn’t work out if anyone can help me, I would be very grateful


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @smallaquaeel,

It seems you are trying to connect to your own Droplet. Try to see if elasticsearch is working properly first;

  1. curl -X GET -H "Content-Type: application/json" 'http://localhost:9200/tutorial/helloworld/1?pretty'

Do you see anything, you should receive a similar response:

Output
{
  "_index" : "tutorial",
  "_type" : "helloworld",
  "_id" : "1",
  "_version" : 2,
  "_seq_no" : 1,
  "_primary_term" : 1,
  "found" : true,
  "_source" : {
    "message" : "Hello, People!"
  }
}

}

if that’s okay you might need to try and reinstall auditbeat. You can follow this article on how to do it:

https://www.elastic.co/guide/en/beats/auditbeat/current/auditbeat-installation-configuration.html