Unable to get OpenSearch dashboard by running OpenSearch docker compose

I am a windows user. I installed Windows Subsystem for Linux [wsl2] and then installed docker using it. Then I tried to get started with OpenSearch so I followed the documentation in the given link Opensearch 2.2.1 · OpenSearch and run docker-compose up, In the shell, I am getting an error message like

opensearch-dashboards | {“type”:“log”,“@timestamp”:“2022-01-18T16:31:18Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:1,“message”:“[ConnectionError]: getaddrinfo EAI_AGAIN opensearch-node1 opensearch-node1:9200”}

In the port http://localhost:5601/ I am getting messages like

OpenSearch Dashboards server is not ready yet

I also changed resources preference for memory to 5GB in docker-desktop but it still doesn’t work. Can somebody help me with this?

Just for clarification is that the only issue it seems to be exporting in the log file?

Thank you. Yes, It is the only issue shown on the log file.

Hi Now I am able to run opensearch dashboard by running two commands
wsl -d docker-desktop
sysctl -w vm.max_map_count=262144 parallelly running with docker-compose up command. I dont know what the two commands are doing exactly. Can somebody explain me, since these are also not found in any documentations.
I got these from a youtube video.

Hi @thiva -

wsl -d docker-desktop is instantiating a “Windows Subsystem for Linux” terminal and specifying that the distribution to be instantiated is docker-desktop. This WSL distro gets installed when you’re using docker for windows and configure it to use the WSL backend.

Inside of that shell, it’s executing sysctl -w vm.max_map_count=262144

Here’s the kernel.org documentation on max_map_count:

max_map_count:

This file contains the maximum number of memory map areas a process
may have. Memory map areas are used as a side-effect of calling
malloc, directly by mmap, mprotect, and madvise, and also when loading
shared libraries.

While most applications need less than a thousand maps, certain
programs, particularly malloc debuggers, may consume lots of them,
e.g., up to one or two maps per allocation.

The default value is 65536.

You’re basically raising the amount of memory that the OpenSearch docker container is allowed to ‘map’ to itself.