Unable to start OpenSearch-dashboard with default docker compose

default compose file not working

https://opensearch.org/samples/docker-compose.yml

opensearch-dashboards | {“type”:“log”,“@timestamp”:“2022-06-10T14:36:52Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:1,“message”:“[ConnectionError]: getaddrinfo ENOTFOUND opensearch-node1”}
opensearch-dashboards | {“type”:“log”,“@timestamp”:“2022-06-10T14:36:54Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:1,“message”:“[ConnectionError]: getaddrinfo ENOTFOUND opensearch-node1”}

I have updated opensearch-node1 and opensearch-node2 both to localhost in my /etc/hosts
is there a expectation of extra config for initial docker-compose to work to setup two servers ips

sysctl vm.max_map_count

vm.max_map_count = 65530

#sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144

after update of this ,docker-compose is up and working but still got those warning
[ConnectionError]: connect ECONNREFUSED 172.27.0.3:9200"}