Unable to connect with Opensearch dashboard

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch version : 2.11.0
OpensearchDashboard version : 2.11.0
Server OS:RedHat
Browser: Chrome

Describe the issue:
I followed this link for Opensearch Dashboard installation.

After Installation I tried to connect with browser using below url, but unable to connect with dashboard

http://3.110.62.79:5601
(here 3.110.62.79 is IP Address of my machine)

I have tried with both http and https but is not working.Please help me regarding the same.

Configuration:

Relevant Logs or Screenshots:

Have you installed OpenSearch yet? You may run OpenSearch firstly and then run OpenSearch Dashboards, if OpenSearch Dashboards doesn’t work, you can check the logs to see what happened.

Yes,I have Installed the OpenSearch . I have started firstly OpenSearch then run the OpenSearch Dashboards.

I am trying to connect with browser using below url
http://3.110.62.79:5601

but unable to connect through browser getting This site can’t be reached
(Here instead of ‘localhost’ I am using my Machine IP address ‘3.110.62.79’
because I have installed both Opensearch and OpensearchDashboards on EC2 Instance)

Reference : RPM - OpenSearch documentation

Can you access the 9200 port of OpenSearch by that IP? It seems to be a network issue, is a security group attached to the EC2 instance? If so please check the security group to make sure the 5601 port can be accessed.

In EC2 I have enabled both port number 9200 and 5601, I am unable to run Opensearch with that IP , through ‘localhost’ only I am able to run opensearch

That’s the problem, you need to bind 0.0.0.0, not localhost, network.host in opensearch.yml and server.hostin opensearch_dashboards.yml should be 0.0.0.0.

when I am binding network.host with 0.0.0.0 in opensearch.yml then opensearch failed to start . Same case for binding server.host with 0.0.0.0 in opensearch_dashboards.yml
failed to start opensearch dashboards.

Can you show the error log of OpenSearch and OpenSearch-Dashboards when binding 0.0.0.0?



Please find the attached logs for OpensearchDashboards and Opensearch

Didn’t see the logs of OpenSearch, you can find the logs in the directory /var/log/opensearch/. But I see bootstrap check failed, you can try adding the setting discovery.type: single-node to opensearch.yml to bypass the bootstrap check, find more details about bootstrap check here: Bootstrap Checks | Elasticsearch Guide [7.10] | Elastic.

After adding discovery.type: single-node in opensearch.yml file , I am able to start Opensearch and run opensearch application through IP address .

For Opensearch dashboards able to start opensearch dashboards application but unable to run application using IP address, getting below error(Connection refused) in Opensearch Dashboards

[ec2-user@ip-172-31-34-60 opensearch-dashboards]$ curl -X GET http://3.110.32.145:5601
curl: (7) Failed to connect to 3.110.32.145 port 5601: Connection refused

Now I am getting below message while running the OpensearchDashboards

Now I can able to connect with Dashboards.
Thanks