Opensearch Dashboards Fails to Start When Binding to 0.0.0.0

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Redhat 9 AWS EC2, Opensearch 2.16, Opensearch Dashboard 2.16

Describe the issue:
Greetings, I have seen similar issues posted here in the past but not exactly the same. After troubleshooting for several days I’m at my wits end. My opensearch install ran great following the documentation and starts up fine. The problem I have is with Opensearch Dashboards. I installed and am able to start the service just fine when using localhost. However, if I make any modification to the network settings (e.g. uncomment either the server.port number or the server.host setting in the opensearch_dashboard.yml file) this causes Opensearch Dashboards to fail to start with a generic error “code-exited, status=1/Failure” There do not appear to be any logs related to this that I can find. When I revert back commenting the port or host sections it starts up just fine again. Problem is it isn’t accessible from external to the server, only from localhost. I’ve created firewall rules to allow port 5601 externally but this doesn’t change anything. Any help is greatly appreciated.

Configuration:

Relevant Logs or Screenshots:

You probably checked these, but just in case (assuming a .deb installation):

  • journalctl -f -u opensearch-dashboards
  • Log files in /var/log/opensearch-dashboards/
  • Giving the service the CAP_NET_BIND capability if using ports under 1024
  • TLS certificates accessible (LetsEncrypt certificates won’t be able to be accessed by default)

thanks for this, the command was helpful but still not finding anything that stands out.

  • journalctl -f -u give me this output:
    image

  • No log files in the /var/log/opensearch-dashboards/

  • Am not using any ports under 1024, trying to just use the standard 5601 port

  • Not using a “LetsEncrypt cert”; not sure what you meant by accessible? did you mean third part, and use it where?

  • Also, this is what i get when i run a netstat command:
    image

Try restarting the server while you have journalctl -f -u opensearch-dashboards running. It looks like there might be more error info in logs before what is shown.

Thanks for this, I ran journalctl in a different window and was able to see more details about the error. It seemed to be pointing to a YAML file error in the .yml file (specifically at line 216). I played with it a little more since the only thing I had changed was the “server.host” setting, but then I noticed there was a space at the beginning of the line. In vi I was deleting the “#” but not putting the server.host setting at the beginning of the line. This must have been introducing a space or new line character because after I deleted the space opensearch-dashboard starts up just fine! Thanks again for your help!!

1 Like