Kibana unable to connect to wazuh api

2,266 views
Skip to first unread message

Nelson Rosien

unread,
Sep 19, 2019, 1:46:31 PM9/19/19
to Wazuh mailing list

Hello,

 

I’ve had Wazuh up and running for a while now, but recently I’m running into this error. I’m running this distributed across two hosts (Wazuh-api/manager/filebeat and ELK).

 

<Wazuh-url> below refers to kibana host, running behind httpd reverse proxy on same host.

 

When I navigate to https://<wazuh-url>/app/wazuh, I get the message “Health Check. 3002 - Error reading file (/api/check-stored-api)”.

 

I’ve found this issue, which seems to describe my issue fairly accurately.  When following the steps to look at the xhr network requests I see:

 

Request URL:https://<wazuh-url>/api/check-stored-api

Request method:POST

Remote address:<IP>:443

Status code:500

Version:HTTP/1.1

Referrer Policy:no-referrer-when-downgrade

 

Which seems to correspond to this message in the kibana logs:

 

{"date":"2019-09-19T17:31:23.605Z","level":"error","location":"wazuh-api:checkStoredAPI","message":"Error reading file"}

 

I can’t seem to find any help to resolve this though.

 

Cheers,

 

Nelson R

 

Juan Carlos Rodríguez

unread,
Sep 24, 2019, 7:08:06 AM9/24/19
to Wazuh mailing list

Hi Nelson,

If you don’t mind losing the APIs you already have configured, we can try to clear the .wazuh index and cookies in case there is some erroneous data stored that is breaking our initialization flow.

systemctl stop kibana
curl -XDELETE <elastic-ip>:9200/.wazuh
systemctl restart kibana

On the other hand, it may be that you have an incorrect cookie in the cache, perhaps due to an earlier version installed.

You need to delete all cookies stored in your browser and try to enter the Wazuh application again.

In Firefox you must press F12 to open the developer tools. In them, go to Storage, and Delete all cookies.

In Chrome you must press F12 to open the developer tools. In them, go to Application, and Delete all cookies.

Wait a few seconds, then try again.

Hope this helps.
Let us know the results.

Regards,
Juan Carlos

Nelson Rosien

unread,
Sep 27, 2019, 9:02:39 AM9/27/19
to Juan Carlos Rodríguez, Wazuh mailing list

Hey Juan Carlos,

 

I did try clearing the cookies without change in the message. I didn’t try troubleshooting with Elasticsearch though.

 

I noticed that 3.10.x was released, and figured I’d try upgrading to the latest version before troubleshooting further. I’m glad I did, that seems to have resolved my issue - It must have been a bad version of something somewhere.

 

Thanks for your assistance.

 

Cheers,

 

Nelson R

 

From: wa...@googlegroups.com <wa...@googlegroups.com> On Behalf Of Juan Carlos Rodríguez
Sent: Tuesday, September 24, 2019 7:08 AM
To: Wazuh mailing list <wa...@googlegroups.com>
Subject: Re: Kibana unable to connect to wazuh api

 

Hi Nelson,

If you don’t mind losing the APIs you already have configured, we can try to clear the .wazuh index and cookies in case there is some erroneous data stored that is breaking our initialization flow.

systemctl stop kibana
curl -XDELETE <elastic-ip>:9200/.wazuh
systemctl restart kibana

On the other hand, it may be that you have an incorrect cookie in the cache, perhaps due to an earlier version installed.

You need to delete all cookies stored in your browser and try to enter the Wazuh application again.

In Firefox you must press F12 to open the developer tools. In them, go to Storage, and Delete all cookies.

https://user-images.githubusercontent.com/21195730/65033891-3adcd580-d946-11e9-98a7-872e2cfa6eff.png

In Chrome you must press F12 to open the developer tools. In them, go to Application, and Delete all cookies.

https://user-images.githubusercontent.com/21195730/65033919-492af180-d946-11e9-9196-eb85c0031cb0.png

Wait a few seconds, then try again.

Hope this helps.
Let us know the results.

Regards,
Juan Carlos

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/dd1c7fce-8d35-4fb1-a0dc-9244d2468369%40googlegroups.com.

Rhys Evans

unread,
Jan 5, 2020, 5:29:27 PM1/5/20
to Wazuh mailing list
Hi, 

Sorry to pick up an old thread, but I am having the issue described above, across 3 instances (dev, test and prod). This all stopped working over the xmas period , so I don't have exact timings

Wazuh 3.10.2 , ES 7.3.2   (one of the 3 instances is 7.4.x) 

I have done all the listed steps above, I have also rebuilt the kibana component from scratch (using docker). I have also disabled the API checks, but I just get redirected to setup the API. I click test connection and that says succesfully tested, but I can never get in

Any other ideas ?  Note at present I cannot upgrade to 3.11.x

Thanks

To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.

Rhys Evans

unread,
Jan 7, 2020, 4:34:22 PM1/7/20
to Wazuh mailing list
Sort this out my side, as we where running docker, all I had to do was something along the lines of

docker stop wazuh && docker rm wazuh && docker-compose up -d --no-deps wazuh && docker logs -f wazuh

Basically stop, delete and recreate container (assuming your data is in volumes, otherwise it will be lost)

Alberto Rodriguez

unread,
Jan 8, 2020, 5:31:10 AM1/8/20
to Wazuh mailing list
Hello Rhyns

  Nice to see you solved the issue and thanks for sharing the solution.

Best regards,
Alberto R
Reply all
Reply to author
Forward
0 new messages