For anyone else finding this years later...
1. Open the file 'opensearch_dashboards.yml'
nano /etc/wazuh-dashboard/opensearch_dashboards.yml
2. Find the line 3rd line that by default reads 'opensearch.hosts:
https://localhost:9200'
3. Change this line to use the actual IP of your Indexer. It can't be 'localhost' and it can't be '127.0.0.1'
E.g. opensearch.hosts:
https://192.168.1.100:9200The reason is if you leave it as localhost it tries to use IPV6, and if you change it to 127.0.0.1 it gets a connection refused error.
You can check for errors by running the service and looking at the status after a few seconds.
systemctl start wazuh-dashboard
systemctl status wazuh-dashboard
You may need to press the right arrow to read the full status log messages.