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.
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)
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.
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