Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch Container Stopped with Exit 78 state in Ubuntu 18.04 #1699

Closed
dendihandian opened this issue Jul 11, 2018 · 8 comments
Closed

Comments

@dendihandian
Copy link

dendihandian commented Jul 11, 2018

Info:

  • Docker version ($ docker --version): 18.03.1-ce, build 9ee9f40
  • Laradock commit ($ git rev-parse HEAD): 85c57a0 / update postgresql init db example file (update example file #1689)
  • System info (Mac, PC, Linux): Linux
  • System info disto/version: Ubuntu 18.04 LTS

Issue:

Elasticsearch stopped after running for few seconds. Info: laradock_elasticsearch_1 /usr/local/bin/docker-entr ... Exit 78

Expected behavior:

Elasticsearch running and I can connect to it

Reproduce:

Just do sudo docker-compose up -d elasticsearch and sudo docker-compose ps after a few minutes and see if it is still running or not.

Relevant Code:

// place a code sample here
@bestlong
Copy link
Member

@dendihandian
try docker-compose logs elasticsearch to check error info.

@dendihandian
Copy link
Author

dendihandian commented Jul 13, 2018

thanks @bestlong , it helped me solved my problem.

I figured out why it's keep stopping everytime I docker-compose up -d elasticsearch. The log says [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]. So I change the vm.max_map_count value to 262144 with this command in my local machine: sudo sysctl -w vm.max_map_count=262144.

The vm.max_map_count will be reseted to default value after you reboot your machine.

@dendihandian dendihandian changed the title Elasticsearch Container Stopped Elasticsearch Container Stopped with Exit 78 state Jul 13, 2018
@dendihandian dendihandian changed the title Elasticsearch Container Stopped with Exit 78 state Elasticsearch Container Stopped with Exit 78 state in Ubuntu 18.04 Jul 23, 2018
@lionslair
Copy link
Contributor

thanks @bestlong , it helped me solved my problem.

I figured out why it's keep stopping everytime I docker-compose up -d elasticsearch. The log says [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]. So I change the vm.max_map_count value to 262144 with this command in my local machine: sudo sysctl -w vm.max_map_count=262144.

The vm.max_map_count will be reseted to default value after you reboot your machine.

How do you set the value
sudo sysctl -w vm.max_map_count=262144
in the docker build?

@IgorMashev
Copy link

Run sudo sysctl -w vm.max_map_count = 262144 in the terminal, not in the docker

@ghassen98
Copy link

have the same issue and was resolved it with command
sudo sysctl -w vm.max_map_count = 262144
thanks

@mithiyamoiz
Copy link

have the same issue and was resolved it with command
sudo sysctl -w vm.max_map_count = 262144
thanks

@Robiussani152
Copy link

I am experiencing the same issue on my Mac M2, which runs on MacOS 14.0.

sudo sysctl -w vm.max_map_count = 262144

I am seeing an error message that says sysctl: unknown oid 'vm.max_map_count'.

@calebjacobo
Copy link

This is necessary on Mac. Create a privileged container and set the docker VM max_map_count from there, then exit that container.

docker run -it --rm --privileged --pid=host justincormack/nsenter1

sysctl -w vm.max_map_count=262144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants