# Elasticsearch and other components failed

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703>\
**Category:** Elasticsearch\
**Created:** [April 20, 2019, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703 "2019-04-20T09:46:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 20, 2019, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/1 "2019-04-20T09:46:46Z")

</div>

Hello elastic members,

I am new to elastic and I got into problems, I Installed elasticsearch, logstash and kibana in a virtual machine and when it's run, it's run all services kibana elastic search etc...  
but when I try to navigate to browser to open web UI through any port 5601 or 9200 .. it's refuse to connect or timeout ..

OS: Ubuntu /CentOS(I tried them both same problem.)  
RAM: 4 GB

I used curl to check connection on localhost:9200 it''s give me that message it's should be given, same on browser, but no interface like in other tutorials

Did I miss something?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 9:26am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/2 "2019-04-21T09:26:32Z")

</div>

Hi Samer,

It's hard to know how to help right now. It sounds like you've installed Elasticsearch, Kibana and Logstash and you can connect (to something?) using `curl` but you're having trouble doing the same with your browser? Or maybe you can get some responses but not others? And there's a virtual machine involved, which may or may not be where you're running `curl` and/or your browser? Also you're talking about using `localhost` which means different things depending on which machine you're on.

Can you break it down in more detail and show the exact URLs you're trying to access and the commands you're running (including where you're running them) and the responses you're getting?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 1:17pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/3 "2019-04-21T13:17:17Z")

</div>

First of all, I downloaded wazuh, wazuh has virtual appliance, which is CentOS with Elasticsearch, logstach and kibana. I downloaded they virtual appliance which it's used in virtual machine.

 ![Screenshot%20(17)](https://us1.discourse-cdn.com/elastic/original/3X/3/9/399632cf8b79536629428a7011d4fdae5339f196.png) !  
The first Image here, the main configuration  
 ![Screenshot%20(18)](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d3bd32c39a5dd02d48b826aa17007aacd076073f.png) !  
I tried to add Host only adapter to see if it's works  
 ![Screenshot%20(19)](https://us1.discourse-cdn.com/elastic/original/3X/1/f/1fc1c7e68147f662695d0e1313ffa0acb6a8afa2.png)

here I tried to connect to server using curl, but not responding..

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 1:34pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/4 "2019-04-21T13:34:48Z")

</div>

Ok, I'm not familiar with Wazuh so I don't know how the networking is set up. Let's try some basic checks. `netstat -antp | grep LISTEN` shows all the processes listening for incoming TCP connections. Can you share the output here? Does it indicate that anything is listening on port 5601 and/or does it indicate that process ID 2172 is listening on any other port or address?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 3:05pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/5 "2019-04-21T15:05:21Z")

</div>

> [@DavidTurner](#):
>
> netstat -antp | grep LISTEN

Thanks for your reply,

I Already made a ubuntu copy for that program.

same setup, I run the virtual machine and connected to port 9200 successfully, using 127.0.0.1:9200

 ![Screenshot%20(20)](https://us1.discourse-cdn.com/elastic/original/3X/6/1/6146df08162d04aafdb7385486f787cfbdc162b5.png)

as you can see there is response.  
I tried same to kibana's port but it says kibana is not ready

here is screenshot for netstat & grep

 ![Screenshot%20(21)](https://us1.discourse-cdn.com/elastic/original/3X/3/0/30bf81ec2d114512cba8a85dbc969ff95cd02218.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 3:22pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/6 "2019-04-21T15:22:48Z")

</div>

It looks like Kibana is running there, but you're no longer root so we can't see the process information. It's best when troubleshooting to try and only change one thing at once.

> [@samerlol](#):
>
> I tried same to kibana's port but it says kibana is not ready

What exactly does it say? "Kibana is not ready" sounds different from what you said before which was "connection refused".

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 3:31pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/7 "2019-04-21T15:31:24Z")

</div>

This is a new virtual machine not like the first one.

The last reply from a new virtual machine on ubuntu OS not CentOS.

anyway, what do you mean by you are no longer root? I can run as root

 ![Screenshot%20(22)](https://us1.discourse-cdn.com/elastic/original/3X/9/a/9afdf70bf9a6c4d24c26b84adf392a2dd9c61a60.png)

I have no idea what should I do.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 3:37pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/8 "2019-04-21T15:37:52Z")

</div>

> [@samerlol](#):
>
> This is a new virtual machine not like the first one.

Ok, it's really hard to help if you change everything in between providing bits of information. Who knows which things are no longer true? Please try and focus on one thing at once.

In this last screenshot I see process ID 4200 running `node` and listening on `127.0.0.1:5601`. I would guess that this is Kibana. Are you still getting `Connection refused` with `curl http://127.0.0.1:5601`?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 3:48pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/9 "2019-04-21T15:48:36Z")

</div>

Sorry for misleading you..

I am no longer changing my machine, I only created new one just to test.  
here is the result, kibana is not ready  
 ![Screenshot%20(23)](https://us1.discourse-cdn.com/elastic/original/3X/b/b/bbac26eba92e6572c55a4459cb59121498486ac6.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 3:57pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/10 "2019-04-21T15:57:50Z")

</div>

Ok great, that means we're taking to Kibana at least. Its logs will tell you why it's not ready.

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 4:03pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/11 "2019-04-21T16:03:20Z")

</div>

how do I see the logs?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 4:22pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/12 "2019-04-21T16:22:20Z")

</div>

That is a good question. I think it normally logs to `stdout`. However it looks like this VM is running it with `systemd` so maybe it's sending them to syslog? Try looking under `/var/log` and see if you can find any mentions of Kibana.

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 21, 2019, 5:27pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/13 "2019-04-21T17:27:29Z")

</div>

I have found in /var/log/syslog  
before the first image, I saw kibana was started.

 ![Screenshot%20(24)](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f39be4bc95de8929692eab753a1fb845ace41589.png) ![Screenshot%20(25)](https://us1.discourse-cdn.com/elastic/original/3X/7/3/73d842350346afa8f34971dfd4bc60fdeef25814.png) ![Screenshot%20(26)](https://us1.discourse-cdn.com/elastic/original/3X/1/f/1f1ac73c08a9cb8bf981cdcb748b60e943f28869.png) ![Screenshot%20(27)](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f7a82ca4b400aeee449ca9f35eff913603444dc.png) ![Screenshot%20(28)](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c44aa2563d36bef465686c982b3c726e39bac0ce.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 21, 2019, 6:46pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/14 "2019-04-21T18:46:35Z")

</div>

Ok, looks like Kibana is running but Elasticsearch is not: it's getting `Connection refused` from `http://127.0.0.1:9200`. Do you get the same response from curl? Can you find any logs from Elasticsearch?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 22, 2019, 11:50am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/15 "2019-04-22T11:50:59Z")

</div>

Here is the result of curl !  
 ![VirtualBox_Ubuntu%20wazuh_22_04_2019_14_42_56](https://us1.discourse-cdn.com/elastic/original/3X/e/a/eaecde9707022372d35ec4860e416ed3ed204a32.png)

I reloaded all units using systemctl daemon-reload  
and started them on systemctl start elasticsearch  
systemctl start elasticsearch.service  
systemctl start kibana  
systemctl start kibana.service  
as I see there is a response from elasticsearch's port

 ![VirtualBox_Ubuntu%20wazuh_22_04_2019_14_45_28](https://us1.discourse-cdn.com/elastic/original/3X/a/c/acb39c7802ea918835398d43c4aa3f908233a270.png) ![VirtualBox_Ubuntu%20wazuh_22_04_2019_14_46_09](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f3ea6fda1776463a7d5f13f1145b6649579b814.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 22, 2019, 11:52am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/16 "2019-04-22T11:52:55Z")

</div>

`Status changed from red to green` sounds promising. Is it working now?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 22, 2019, 11:58am UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/17 "2019-04-22T11:58:13Z")

</div>

I tried to on browser on [https://127.0.0.1:5601](https://127.0.0.1:5601) & 127.0.0.1:9200  
here it's

 ![Screenshot%20(29)](https://us1.discourse-cdn.com/elastic/original/3X/b/b/bb10f72074c82a74ca0714d13b9ded07101c665e.png) ![Screenshot%20(30)](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a65e693d3b17d10e75aa8457be5119de83119fe0.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 22, 2019, 12:13pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/18 "2019-04-22T12:13:16Z")

</div>

Ok before we jump to the browser, what does `curl http://127.0.0.1:5601` say on the VM?

Next, where is this browser running? On the VM or on the host machine?

Finally, how have you configured the network for the VM in VirtualBox? The [Wazuh docs](https://documentation.wazuh.com/3.x/installation-guide/virtual-machine.html) say to set it to a bridge network - is this what you've done?

---

<div class="post-metadata">

**Author:** ![samerlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samerlol/32/44483_2.png) [@samerlol](https://discuss.elastic.co/u/samerlol)\
**Post date:** [April 22, 2019, 1:11pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/19 "2019-04-22T13:11:35Z")

</div>

Thanks for your reply,here is the reply

 ![VirtualBox_Ubuntu%20wazuh_22_04_2019_16_06_52](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e9046d5259b6374ab314be608a23cb49a3898b6.png)

My OS on VM is Ubuntu server, so it's only commands line. Where I am trying to access is from Host machine in browser.

Wazuh Docs, says "Before connecting any of the Wazuh agents, change the VM’s network interface type from NAT (the factory default) to bridge for communication with your network. By default, the VM will try to get an IP address from your network’s DHCP server. Alternatively, you can set a static IP address by configuring the proper network files on the CentOS operating system that the virtual machine is based on."  
which is when I want to connect Agents. I tried this mode, but I will try again now and see what happens

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 22, 2019, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703/20 "2019-04-22T13:37:26Z")

</div>

> [@samerlol](#):
>
> Where I am trying to access is from Host machine in browser.

In which case I suspect that `127.0.0.1` isn't the right address. I would look for some help getting VirtualBox set up, perhaps [https://forums.virtualbox.org](https://forums.virtualbox.org) or [Redirecting to Google Groups](https://groups.google.com/forum/m/#!forum/wazuh) since it looks like all the Elastic components are working.

[Next page](https://discuss.elastic.co/t/elasticsearch-and-other-components-failed/177703.md?page=2)
