wazuh / wazuh-documentation

Wazuh - Project documentation
https://wazuh.com
191 stars 336 forks source link

There was an error accessing the API. Retrying... #7528

Open dark-passages opened 2 months ago

dark-passages commented 2 months ago

On my home network I tried to install Wazuh on my Proxmox-VM with Ubuntu server 24.04, with all updates installed.

After a while the script arrives here: INFO : --- Wazuh dashboard — INFO : Starting Wazuh dashboard installation. INFO : Wazuh dashboard installation finished. INFO : Wazuh dashboard post—install configuration finished. INFO : starting service wazuh—dashboard. INFO : wazuh—dashboard service started. INFO : Updating the internal users . INFO : A backup of the internal users has been saved in the /etc/wazuh—indexer/internalusers—backup folder. INFO : There was an error accessing the API. Retrying...

Then the machine freezes and Proxmox shows IO/Error.

I tried this with 4 and 8GB memory, 60GB and 80GB virtual hard drive, always the same: a frozen machine with IO/Error. And no error message on the console. Reboot of the system shows:

[ OK ] Started wazuh-dashboard.service - wazuh-dashboard. [ OK ] Started systemd-logind.service - User Login Management. [ OK ] Started dbus.service - D-8us System Message Bus. [ OK ] Finished e2scrub—reap.service - Remove Stale Online ext4 Metadata Check Snapshots. And then the screen becomes a mess and the machine freezes again.

Any suggestions?

steyler commented 1 month ago

Hey I upfront the same issue, please validate if you have your resolv config network DNS with nameserver 8.8.8.8 nameserver 8.8.4.4

Also please validate if you have any other apps or resources running causing any IO issues, that could be the cause of the issue image Check Disk Space and IO Performance:

Ensure that there is enough disk space available on your Proxmox server. Check the IO performance of the disk. You can use tools like iotop, iostat, or Proxmox's built-in monitoring to identify any bottlenecks. Review Proxmox Logs:

Check the Proxmox logs for any errors or warnings related to IO. You can find the logs in /var/log/syslog or /var/log/messages. Look for specific error messages that might indicate what is causing the IO error. Check Wazuh Logs:

Review the Wazuh logs to get more details about the error accessing the API. The logs can be found in the Wazuh installation directory, typically /var/ossec/logs/ossec.log and /var/ossec/logs/api.log. Network Configuration:

Ensure that the network configuration is correct and there are no issues with network connectivity that might be causing the API access error. Memory and CPU Usage:

Monitor the memory and CPU usage of the machine. High memory or CPU usage can lead to system instability and might cause the machine to freeze. You can use tools like htop or Proxmox's resource monitoring to check the usage. Restart Services:

Try restarting the Wazuh services and see if the issue persists. Use the following commands to restart the services: sudo systemctl restart wazuh-manager sudo systemctl restart wazuh-api sudo systemctl restart wazuh-dashboard