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

sysctl: setting key "vm.max_map_count": Read-only file system #99

Closed
bezrukovp opened this issue Dec 21, 2016 · 22 comments
Closed

sysctl: setting key "vm.max_map_count": Read-only file system #99

bezrukovp opened this issue Dec 21, 2016 · 22 comments

Comments

@bezrukovp
Copy link

Hi, I have the same problem:
image

It arises here /elasticsearch-init:137

On my server Docker install in LXC container, perhaps this is the reason the error.

@spujadas
Copy link
Owner

Usually the init script can't set the key (because the container can't write to a read-only file system), but that doesn't prevent Elasticsearch from starting if the host's vm.max_map_count is high enough.
Before I start tweaking the init script, could you confirm that the host's vm.max_map_count is equal to at least 262144, and that this is also visible from the container (by docker exec or docker run-ing into the container)?
As I may need to reproduce the issue, could you tell me what version of Linux you're using, instructions that you used to install Docker (if different from the official ones) etc.

@bezrukovp
Copy link
Author

bezrukovp commented Dec 21, 2016

Oh sure.

root@0b2876b5544a:/opt/logstash# sysctl vm.max_map_count
vm.max_map_count = 262144

host: Ubuntu 16.04.1 LTS \n \l
lxc_container (docker host): Ubuntu 14.04.5 LTS \n \l
elk_container: Ubuntu 14.04.3 LTS \n \l

bezr@docker:~/projects/elk-stack$ docker version
Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 21:44:32 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 21:44:32 2016
 OS/Arch:      linux/amd64

@spujadas
Copy link
Owner

Can't reproduce over here, so I'm going to attempt something based on your experience. Essentially I want to change this bit:

    if [ -n "$MAX_MAP_COUNT" -a -f /proc/sys/vm/max_map_count ]; then
        sysctl -q -w vm.max_map_count=$MAX_MAP_COUNT
    fi

to check if vm.max_map_count is already equal to $MAX_MAP_COUNT before it tries to use sysctl: in your case, as vm.max_map_count is already properly set, the test will pass and the init script will continue running.

Before I do that I need to make sure that the script will play nicely with your set-up once this test is in place, so could I ask you to edit the elasticsearch-init file (if rebuilding the image) or /etc/init.d/elasticsearch (if using the existing one), and to comment out or remove lines 136-138, then start the container, and let me know if Elasticsearch starts (and if not what goes wrong)?

@mrazvan21
Copy link

I have the same problem.

@spujadas
Copy link
Owner

spujadas commented Jan 3, 2017

@mrazvan92 Could you try the procedure outlined in #99 (comment) and let me know how it goes?

@mrazvan21
Copy link

Starting elkdocker_elk_1
Attaching to elkdocker_elk_1
elk_1 | * Starting periodic command scheduler cron
elk_1 | ...done.
elk_1 | * Starting Elasticsearch Server
elk_1 | ...done.
elk_1 | waiting for Elasticsearch to be up (1/30)
elk_1 | waiting for Elasticsearch to be up (2/30)
elk_1 | waiting for Elasticsearch to be up (3/30)
elk_1 | waiting for Elasticsearch to be up (4/30)
elk_1 | waiting for Elasticsearch to be up (5/30)
elk_1 | waiting for Elasticsearch to be up (6/30)
elk_1 | waiting for Elasticsearch to be up (7/30)
elk_1 | waiting for Elasticsearch to be up (8/30)
elk_1 | waiting for Elasticsearch to be up (9/30)
elk_1 | waiting for Elasticsearch to be up (10/30)
elk_1 | waiting for Elasticsearch to be up (11/30)
elk_1 | waiting for Elasticsearch to be up (12/30)
elk_1 | waiting for Elasticsearch to be up (13/30)
elk_1 | waiting for Elasticsearch to be up (14/30)
elk_1 | waiting for Elasticsearch to be up (15/30)
elk_1 | waiting for Elasticsearch to be up (16/30)
elk_1 | waiting for Elasticsearch to be up (17/30)
elk_1 | waiting for Elasticsearch to be up (18/30)
elk_1 | waiting for Elasticsearch to be up (19/30)
elk_1 | waiting for Elasticsearch to be up (20/30)
elk_1 | waiting for Elasticsearch to be up (21/30)
elk_1 | waiting for Elasticsearch to be up (22/30)
elk_1 | waiting for Elasticsearch to be up (23/30)
elk_1 | waiting for Elasticsearch to be up (24/30)
elk_1 | waiting for Elasticsearch to be up (25/30)
elk_1 | waiting for Elasticsearch to be up (26/30)
elk_1 | waiting for Elasticsearch to be up (27/30)
elk_1 | waiting for Elasticsearch to be up (28/30)
elk_1 | waiting for Elasticsearch to be up (29/30)
elk_1 | waiting for Elasticsearch to be up (30/30)
elk_1 | Couln't start Elasticsearch. Exiting.
elk_1 | Elasticsearch log follows below.
elk_1 | [2017-01-04T06:45:45,420][INFO ][o.e.n.Node ] [] initializing ...
elk_1 | [2017-01-04T06:45:45,578][INFO ][o.e.e.NodeEnvironment ] [LTodtir] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/sda1)]], net usable_space [128.4gb], net total_space [226.8gb], spins? [possibly], types [ext4]
elk_1 | [2017-01-04T06:45:45,579][INFO ][o.e.e.NodeEnvironment ] [LTodtir] heap size [1.9gb], compressed ordinary object pointers [true]
elk_1 | [2017-01-04T06:45:45,585][INFO ][o.e.n.Node ] node name [LTodtir] derived from node ID [LTodtir7RPGrk1eZvtStvA]; set [node.name] to override
elk_1 | [2017-01-04T06:45:45,588][INFO ][o.e.n.Node ] version[5.1.1], pid[51], build[5395e21/2016-12-06T12:36:15.409Z], OS[Linux/4.4.0-57-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111/25.111-b14]
elk_1 | [2017-01-04T06:45:47,985][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [aggs-matrix-stats]
elk_1 | [2017-01-04T06:45:47,985][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [ingest-common]
elk_1 | [2017-01-04T06:45:47,985][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-expression]
elk_1 | [2017-01-04T06:45:47,985][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-groovy]
elk_1 | [2017-01-04T06:45:47,986][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-mustache]
elk_1 | [2017-01-04T06:45:47,986][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-painless]
elk_1 | [2017-01-04T06:45:47,986][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [percolator]
elk_1 | [2017-01-04T06:45:47,986][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [reindex]
elk_1 | [2017-01-04T06:45:47,986][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [transport-netty3]
elk_1 | [2017-01-04T06:45:47,987][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [transport-netty4]
elk_1 | [2017-01-04T06:45:47,987][INFO ][o.e.p.PluginsService ] [LTodtir] no plugins loaded
elk_1 | [2017-01-04T06:45:51,398][INFO ][o.e.n.Node ] initialized
elk_1 | [2017-01-04T06:45:51,399][INFO ][o.e.n.Node ] [LTodtir] starting ...
elk_1 | [2017-01-04T06:45:51,656][INFO ][o.e.t.TransportService ] [LTodtir] publish_address {:9300}, bound_addresses {[::]:9300}
elk_1 | [2017-01-04T06:45:51,665][INFO ][o.e.b.BootstrapCheck ] [LTodtir] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
elk_1 | [2017-01-04T06:45:51,667][ERROR][o.e.b.Bootstrap ] [LTodtir] node validation exception
elk_1 | bootstrap checks failed
elk_1 | max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elk_1 | [2017-01-04T06:45:51,669][INFO ][o.e.n.Node ] [LTodtir] stopping ...
elk_1 | [2017-01-04T06:45:51,724][INFO ][o.e.n.Node ] [LTodtir] stopped
elk_1 | [2017-01-04T06:45:51,724][INFO ][o.e.n.Node ] [LTodtir] closing ...
elk_1 | [2017-01-04T06:45:51,741][INFO ][o.e.n.Node ] [LTodtir] closed
elk_1 | [2017-01-04T06:47:26,656][INFO ][o.e.n.Node ] [] initializing ...
elk_1 | [2017-01-04T06:47:26,728][INFO ][o.e.e.NodeEnvironment ] [LTodtir] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/sda1)]], net usable_space [129.1gb], net total_space [226.8gb], spins? [possibly], types [ext4]
elk_1 | [2017-01-04T06:47:26,728][INFO ][o.e.e.NodeEnvironment ] [LTodtir] heap size [1.9gb], compressed ordinary object pointers [true]
elk_1 | [2017-01-04T06:47:26,729][INFO ][o.e.n.Node ] node name [LTodtir] derived from node ID [LTodtir7RPGrk1eZvtStvA]; set [node.name] to override
elk_1 | [2017-01-04T06:47:26,732][INFO ][o.e.n.Node ] version[5.1.1], pid[47], build[5395e21/2016-12-06T12:36:15.409Z], OS[Linux/4.4.0-57-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111/25.111-b14]
elk_1 | [2017-01-04T06:47:28,030][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [aggs-matrix-stats]
elk_1 | [2017-01-04T06:47:28,030][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [ingest-common]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-expression]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-groovy]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-mustache]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [lang-painless]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [percolator]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [reindex]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [transport-netty3]
elk_1 | [2017-01-04T06:47:28,031][INFO ][o.e.p.PluginsService ] [LTodtir] loaded module [transport-netty4]
elk_1 | [2017-01-04T06:47:28,032][INFO ][o.e.p.PluginsService ] [LTodtir] no plugins loaded
elk_1 | [2017-01-04T06:47:30,340][INFO ][o.e.n.Node ] initialized
elk_1 | [2017-01-04T06:47:30,341][INFO ][o.e.n.Node ] [LTodtir] starting ...
elk_1 | [2017-01-04T06:47:30,467][INFO ][o.e.t.TransportService ] [LTodtir] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300}
elk_1 | [2017-01-04T06:47:30,472][INFO ][o.e.b.BootstrapCheck ] [LTodtir] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
elk_1 | [2017-01-04T06:47:30,479][ERROR][o.e.b.Bootstrap ] [LTodtir] node validation exception
elk_1 | bootstrap checks failed
elk_1 | max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elk_1 | [2017-01-04T06:47:30,491][INFO ][o.e.n.Node ] [LTodtir] stopping ...
elk_1 | [2017-01-04T06:47:30,540][INFO ][o.e.n.Node ] [LTodtir] stopped
elk_1 | [2017-01-04T06:47:30,540][INFO ][o.e.n.Node ] [LTodtir] closing ...
elk_1 | [2017-01-04T06:47:30,550][INFO ][o.e.n.Node ] [LTodtir] closed
elkdocker_elk_1 exited with code 1

@spujadas
Copy link
Owner

spujadas commented Jan 4, 2017

@mrazvan92 You might not be having the same problem as @bezrukovp:

elk_1 | max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

You may actually be running into (resolved) issue #92.

@mrazvan21
Copy link

@spujadas thanks thanks thanks :)

@thomasdola
Copy link

thomasdola commented Jan 5, 2017

i have similar problem..
commercefacile-elk | waiting for Elasticsearch to be up (16/30)
commercefacile-elk | waiting for Elasticsearch to be up (17/30)
commercefacile-elk | waiting for Elasticsearch to be up (18/30)
commercefacile-elk | waiting for Elasticsearch to be up (19/30)
commercefacile-elk | waiting for Elasticsearch to be up (20/30)
commercefacile-elk | waiting for Elasticsearch to be up (21/30)
commercefacile-elk | waiting for Elasticsearch to be up (22/30)
commercefacile-elk | waiting for Elasticsearch to be up (23/30)
commercefacile-elk | waiting for Elasticsearch to be up (24/30)
commercefacile-elk | waiting for Elasticsearch to be up (25/30)
commercefacile-elk | waiting for Elasticsearch to be up (26/30)
commercefacile-elk | waiting for Elasticsearch to be up (27/30)
commercefacile-elk | waiting for Elasticsearch to be up (28/30)
commercefacile-elk | waiting for Elasticsearch to be up (29/30)
commercefacile-elk | waiting for Elasticsearch to be up (30/30)
commercefacile-elk | Couln't start Elasticsearch. Exiting.
commercefacile-elk | Elasticsearch log follows below.
commercefacile-elk | [2017-01-05T20:22:30,020][INFO ][o.e.n.Node ] [] initializing ...
commercefacile-elk | [2017-01-05T20:22:30,803][INFO ][o.e.e.NodeEnvironment ] [n4pDXUQ] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/sda11)]], net usable_space [39.8gb], net total_space [163.2gb], spins? [possibly], types [ext4]
commercefacile-elk | [2017-01-05T20:22:30,804][INFO ][o.e.e.NodeEnvironment ] [n4pDXUQ] heap size [1.9gb], compressed ordinary object pointers [true]
commercefacile-elk | [2017-01-05T20:22:30,804][INFO ][o.e.n.Node ] node name [n4pDXUQ] derived from node ID [n4pDXUQ5TVGih4WMGbnSZQ]; set [node.name] to override
commercefacile-elk | [2017-01-05T20:22:30,806][INFO ][o.e.n.Node ] version[5.1.1], pid[50], build[5395e21/2016-12-06T12:36:15.409Z], OS[Linux/4.4.13-1-MANJARO/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111/25.111-b14]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [aggs-matrix-stats]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [ingest-common]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [lang-expression]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [lang-groovy]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [lang-mustache]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [lang-painless]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [percolator]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [reindex]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [transport-netty3]
commercefacile-elk | [2017-01-05T20:22:31,443][INFO ][o.e.p.PluginsService ] [n4pDXUQ] loaded module [transport-netty4]
commercefacile-elk | [2017-01-05T20:22:31,444][INFO ][o.e.p.PluginsService ] [n4pDXUQ] no plugins loaded
commercefacile-elk | [2017-01-05T20:22:32,862][INFO ][o.e.n.Node ] initialized
commercefacile-elk | [2017-01-05T20:22:32,862][INFO ][o.e.n.Node ] [n4pDXUQ] starting ...
commercefacile-elk | [2017-01-05T20:22:32,972][INFO ][o.e.t.TransportService ] [n4pDXUQ] publish_address {172.20.0.5:9300}, bound_addresses {[::]:9300}
commercefacile-elk | [2017-01-05T20:22:32,976][INFO ][o.e.b.BootstrapCheck ] [n4pDXUQ] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
commercefacile-elk | [2017-01-05T20:22:32,977][ERROR][o.e.b.Bootstrap ] [n4pDXUQ] node validation exception
commercefacile-elk | bootstrap checks failed
commercefacile-elk | max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
commercefacile-elk | [2017-01-05T20:22:33,012][INFO ][o.e.n.Node ] [n4pDXUQ] stopping ...
commercefacile-elk | [2017-01-05T20:22:33,019][INFO ][o.e.n.Node ] [n4pDXUQ] stopped
commercefacile-elk | [2017-01-05T20:22:33,019][INFO ][o.e.n.Node ] [n4pDXUQ] closing ...
commercefacile-elk | [2017-01-05T20:22:33,025][INFO ][o.e.n.Node ] [n4pDXUQ] closed
commercefacile-elk exited with code 1

@thomasdola
Copy link

my issue is how to increase the size of the memory...
i read the solution but am just confused about to do it...
need help..
thanks.

@spujadas
Copy link
Owner

spujadas commented Jan 5, 2017

@thomasdola See the linked comment (#92 (comment)) in my previous reply. For more on this see https://www.elastic.co/guide/en/elasticsearch/reference/5.0/vm-max-map-count.html#vm-max-map-count (and feel free to ask for advice on the Elastic forums as this issue is non-Docker-specific).

@thomasdola
Copy link

thanks

@spujadas
Copy link
Owner

Fixed by PR #106: if your vm.max_map_count is large enough, then it won't attempt to set it (which would result in an error on some hosts).
Closing, feel free to reopen if you still have the issue.

@dmsimard
Copy link

dmsimard commented Feb 16, 2017

I'm seeing this problem as well on the latest images, it's unable to start ElasticSearch after a read-only filesystem error when trying to set vm.max_map_count:

# docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
 * Starting periodic command scheduler cron                              [ OK ] 
 * Starting Elasticsearch Server                                                   [ OK ]
sysctl: setting key "vm.max_map_count": Read-only file system                                                                                                                                                                                            
waiting for Elasticsearch to be up (1/30)
waiting for Elasticsearch to be up (2/30)
waiting for Elasticsearch to be up (3/30)
waiting for Elasticsearch to be up (4/30)
waiting for Elasticsearch to be up (5/30)
waiting for Elasticsearch to be up (6/30)
waiting for Elasticsearch to be up (7/30)
waiting for Elasticsearch to be up (8/30)
waiting for Elasticsearch to be up (9/30)
waiting for Elasticsearch to be up (10/30)
waiting for Elasticsearch to be up (11/30)
waiting for Elasticsearch to be up (12/30)
waiting for Elasticsearch to be up (13/30)
waiting for Elasticsearch to be up (14/30)
waiting for Elasticsearch to be up (15/30)
waiting for Elasticsearch to be up (16/30)
waiting for Elasticsearch to be up (17/30)
waiting for Elasticsearch to be up (18/30)
waiting for Elasticsearch to be up (19/30)
waiting for Elasticsearch to be up (20/30)
waiting for Elasticsearch to be up (21/30)
waiting for Elasticsearch to be up (22/30)
waiting for Elasticsearch to be up (23/30)
waiting for Elasticsearch to be up (24/30)
waiting for Elasticsearch to be up (25/30)
waiting for Elasticsearch to be up (26/30)
waiting for Elasticsearch to be up (27/30)
waiting for Elasticsearch to be up (28/30)
waiting for Elasticsearch to be up (29/30)
waiting for Elasticsearch to be up (30/30)
Couln't start Elasticsearch. Exiting.
Elasticsearch log follows below.
[2017-02-16T21:49:04,944][INFO ][o.e.n.Node               ] [] initializing ...
[2017-02-16T21:49:05,036][INFO ][o.e.e.NodeEnvironment    ] [TW7cpw8] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/vda1)]], net usable_space [35.9gb], net total_space [38.7gb], spins? [possibly], types [ext4]
[2017-02-16T21:49:05,037][INFO ][o.e.e.NodeEnvironment    ] [TW7cpw8] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-02-16T21:49:05,038][INFO ][o.e.n.Node               ] node name [TW7cpw8] derived from node ID [TW7cpw8-Q7mrV8u7x9nGeg]; set [node.name] to override
[2017-02-16T21:49:05,040][INFO ][o.e.n.Node               ] version[5.2.0], pid[65], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Linux/4.4.0-45-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_121/25.121-b13]
[2017-02-16T21:49:05,673][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [aggs-matrix-stats]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [ingest-common]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [lang-expression]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [lang-groovy]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [lang-mustache]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [lang-painless]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [percolator]
[2017-02-16T21:49:05,674][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [reindex]
[2017-02-16T21:49:05,675][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [transport-netty3]
[2017-02-16T21:49:05,675][INFO ][o.e.p.PluginsService     ] [TW7cpw8] loaded module [transport-netty4]
[2017-02-16T21:49:05,675][INFO ][o.e.p.PluginsService     ] [TW7cpw8] no plugins loaded
[2017-02-16T21:49:07,325][INFO ][o.e.n.Node               ] initialized
[2017-02-16T21:49:07,325][INFO ][o.e.n.Node               ] [TW7cpw8] starting ...
[2017-02-16T21:49:07,395][WARN ][i.n.u.i.MacAddressUtil   ] Failed to find a usable hardware address from the network interfaces; using random bytes: 72:37:c8:67:a5:3e:2f:8d
[2017-02-16T21:49:07,430][INFO ][o.e.t.TransportService   ] [TW7cpw8] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300}
[2017-02-16T21:49:07,436][INFO ][o.e.b.BootstrapChecks    ] [TW7cpw8] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-02-16T21:49:07,437][ERROR][o.e.b.Bootstrap          ] [TW7cpw8] node validation exception
bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2017-02-16T21:49:07,439][INFO ][o.e.n.Node               ] [TW7cpw8] stopping ...
[2017-02-16T21:49:07,450][INFO ][o.e.n.Node               ] [TW7cpw8] stopped
[2017-02-16T21:49:07,450][INFO ][o.e.n.Node               ] [TW7cpw8] closing ...
[2017-02-16T21:49:07,455][INFO ][o.e.n.Node               ] [TW7cpw8] closed

Reproduced on both latest and fresh installed CentOS and Ubuntu with the latest Docker version (1.13.1).

@spujadas
Copy link
Owner

@dmsimard The actual error is:

[2017-02-16T21:49:07,437][ERROR][o.e.b.Bootstrap ] [TW7cpw8] node validation exception
bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

See #92 (comment) for more on how to fix this.

@dmsimard
Copy link

@spujadas oh, I had read that but didn't realize it was on the host running the container that I had to try and run it. That fixed it for me, thanks.

@spujadas
Copy link
Owner

@dmsimard Oh OK, I'll emphasise that in the docs to make it clearer! Cheers.

@pyrohaz4good
Copy link

Just in case anyone finds this thread and is looking for how to set this variable on the host and you're running Docker on macOS, do this from terminal:

docker-machine ssh
sudo sysctl -w vm.max_map_count=262144
exit

@liuweiGit
Copy link

I/O exception while trying to read [/proc/sys/vm/max_map_count]
java.nio.file.NoSuchFileException: /proc/sys/vm/max_map_count
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:369) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:415) ~[?:?]
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:?]
at java.nio.file.Files.newInputStream(Files.java:154) ~[?:?]
at java.nio.file.Files.newBufferedReader(Files.java:2830) ~[?:?]
at java.nio.file.Files.newBufferedReader(Files.java:2862) ~[?:?]
at org.elasticsearch.bootstrap.BootstrapChecks$MaxMapCountCheck.getBufferedReader(BootstrapChecks.java:451) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks$MaxMapCountCheck.getMaxMapCount(BootstrapChecks.java:425) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks$MaxMapCountCheck.getMaxMapCount(BootstrapChecks.java:419) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks$MaxMapCountCheck.check(BootstrapChecks.java:405) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks.check(BootstrapChecks.java:141) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks.check(BootstrapChecks.java:97) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.BootstrapChecks.check(BootstrapChecks.java:76) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap$5.validateNodeBeforeAcceptingRequests(Bootstrap.java:218) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.start(Node.java:640) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:262) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:332) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.4.jar:6.2.4]
[2018-05-27T09:56:01,186][WARN ][o.e.b.BootstrapChecks ] [-tFe1F0] system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

@abhilash-behera
Copy link

Guys use this command sudo sysctl -w vm.max_map_count=262144 in the host system not in the container. This will fix the issue. Hope this solves the problem

@tvcuongnd
Copy link

Guys use this command sudo sysctl -w vm.max_map_count=262144 in the host system not in the container. This will fix the issue. Hope this solves the problem
Thanks !

@tchiaspko
Copy link

docker-machine ssh

If you are on Mac using colima instead of Docker Desktop, you can do this

colima ssh -- sudo 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

10 participants