dotCMS / docker

Public repository for Docker artifacts
Apache License 2.0
9 stars 23 forks source link

dotCms is not able to connect to elasticsearch #31

Open MagedMYoussef opened 4 years ago

MagedMYoussef commented 4 years ago

I'm facing the following issue while trying to run dotCms docker-compose

The problem seems to be the connection between dotCms and elasticsearch container but I'm not able to find exactly the root cause. Can you please check the below log file and tell me if there's something that needs to be done/changed?

docker-compose.yml: "02-single-node-demo" log.txt

Thanks!

katzefudder commented 4 years ago

Just stumbled upon the issue you mentioned @MagedMYoussef I assume you're using Docker on Win or Mac. If so, make sure to allocate plenty of memory to your running Docker Desktop (6GB is plenty for the https://github.com/dotCMS/docker/tree/master/examples/01-single-node-clean) Hope that helps

wt-bryan commented 4 years ago

@katzefudder If you enable WSL2 support, Docker for Windows doesn’t allow you to allow you to allocate a specific amount of max or min memory from the GUI. I was able to get around this issue via the workaround explained here until DotCMS 5.3.5. I’m now seeing the same issue again.

wt-bryan commented 4 years ago

I switched to DotCMS 5.3.6.1 just now and everything worked fine again.

tvolkov commented 4 years ago

I had similar issue on my Mac when trying to run 01-single-node-clean configuration, i.e. elasticsearch would just crash with dotcms_elasticsearch_1 exited with code 137 message Increasing docker desktop memory to 6Gb solved the problem

TKousadianos commented 3 years ago

hey sorry for the noob question, how do you set the memory to 6Gb?

wt-bryan commented 3 years ago

In Windows or MacOS? If Windows, if you are non-WSL2, you can right-click on the little whale icon, click on 'Settings', and then I believe it is under 'Resources'. If you are using the WSL2-based engine, I posted a link above, but the TL;DR is that you can set it via command line: wsl -d docker-desktop sysctl -w vm.max_map_count=262084 Note that 262,084 is the minimum