Health Check. Error connecting to API: 2001

2,625 views
Skip to first unread message

Daniel Hinojo

unread,
Jan 12, 2021, 6:39:04 PM1/12/21
to Wazuh mailing list
Good morning Dear, Currently I have a problem when I start the Wazuh website I get the following Health Check error message. Error connecting to API: 2001 - Unexpected end of JSON input, I don't know why please if you could help me. Thank you so much  
error.jpg

Federico Garcia Cruz

unread,
Jan 13, 2021, 9:06:12 AM1/13/21
to Wazuh mailing list
Hi Daniel,
did you upgrade wazuh? which version is running on your server?
For some users reinstalling wazuh app solved the issue:
cd /usr/share/kibana
sudo -u kibana bin/kibana-plugin remove wazuh
cd /usr/share/kibana/optimize
mv wazuh wazuh.bkp13012021
mv wazuh-logs wazuh-logs.bkp13012021
mv wazuh-reporting wazuh-reporting.bkp13012021
sudo -u kibana /usr/share/kibana/bin/kibana-plugin install "wazuhkibanaversion"           (check the compatibility matrix: https://documentation.wazuh.com/4.0/upgrade-guide/compatibility_matrix/index.html https://github.com/wazuh/wazuh-kibana-app#wazuh---kibana---open-distro-version-compatibility-matrix)
systemctl daemon-reload
systemctl restart kibana.service

Please let me know if that works for you or if you need further assistance.
Thanks and regards!

francisco...@gmail.com

unread,
Oct 20, 2022, 1:09:10 PM10/20/22
to Wazuh mailing list
Hi !!
First of all, sorry to revive an old thread. I have considered opportune to respond in case the same thing happens to another person.

I recently had this problem due to a storage issue. After solving the storage problem, the first thing I tried was to reinstall the Wazuh application in Kibana since, like Federico, I thought I could solve it this way. Unfortunately it was not solved and since I had to update to 4.3.9 I updated everything and I kept getting the error message:

" Health Check. Error connecting to API: 2001 - Unexpected end of JSON input "

I finally resolved :
  • Stop kibana
  • Delete the file " /usr/share/kibana/data/wazuh/config/wazuh-registry.json "
  • Restart Kibana

The procedure is obtained from  CarlosRS9 comments in a Github ticket ( https://github.com/wazuh/wazuh/issues/8095#issuecomment-814081193 )

Thank you Wazuh community!

Pedro Arroyo

unread,
Dec 11, 2022, 5:56:48 AM12/11/22
to Wazuh mailing list
To anyone that face this issue with the latest version, as me, folder names changes a little bit, but procedure it works fine.

Stop Wazuh dashboard:  systemctl stop wazuh-dashboard
Delete file: rm  /usr/share/wazuh-dashboard/data/wazuh/config/wazuh-registry.json
Start Wazuh dasboard: systemctl start wazuh-dashboard

Thank you

ak

unread,
Nov 2, 2023, 4:59:09 AM11/2/23
to Wazuh | Mailing List
Solution by @Pedro Arroyo worked for me. Thanks
Reply all
Reply to author
Forward
0 new messages