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

Cannot start docker #175

Closed
atais opened this issue Oct 14, 2017 · 9 comments
Closed

Cannot start docker #175

atais opened this issue Oct 14, 2017 · 9 comments

Comments

@atais
Copy link

atais commented Oct 14, 2017

I am actually trying to start it on my QNap inside Container Station and it fails on me:

[2017-10-14T18:44:05,804][INFO ][o.e.t.TransportService   ] [kyLufS_] publish_address {10.0.3.2:9300}, bound_addresses {0.0.0.0:9300}                                                                                                                                                                                                           
[2017-10-14T18:44:05,833][INFO ][o.e.b.BootstrapChecks    ] [kyLufS_] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks                                                                                                                                                                               
[2017-10-14T18:44:05,840][ERROR][o.e.b.Bootstrap          ] [kyLufS_] node validation exception                                                                                                                                                                                                                                                 
[2] bootstrap checks failed                                                                                                                                                                                                                                                                                                                     
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]                                                                                                                                                                                                                                             
[2]: max virtual memory areas vm.max_map_count [65535] is too low, increase to at least [262144]                                                                                                                                                                                                                                                
[2017-10-14T18:44:05,978][INFO ][o.e.n.Node               ] [kyLufS_] stopping ...                                                                                                                                                                                                                                                              
[2017-10-14T18:44:06,071][INFO ][o.e.n.Node               ] [kyLufS_] stopped                                                                                                                                                                                                                                                                   
[2017-10-14T18:44:06,071][INFO ][o.e.n.Node               ] [kyLufS_] closing ...                                                                                                                                                                                                                                                               
[2017-10-14T18:44:06,102][INFO ][o.e.n.Node               ] [kyLufS_] closed                                                                                                                                                                                                                                                                    
[2017-10-14T18:45:29,004][INFO ][o.e.n.Node               ] [] initializing ...                                                                                                                                                                                                                                                                 
[2017-10-14T18:45:29,415][INFO ][o.e.e.NodeEnvironment    ] [kyLufS_] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/mapper/ce_cachedev1)]], net usable_space [346.4gb], net total_space [2.5tb], spins? [possibly], types [ext4]                                                                                                  
[2017-10-14T18:45:29,416][INFO ][o.e.e.NodeEnvironment    ] [kyLufS_] heap size [1.9gb], compressed ordinary object pointers [true]                                                                                                                                                                                                             
[2017-10-14T18:45:29,421][INFO ][o.e.n.Node               ] node name [kyLufS_] derived from node ID [kyLufS_DSsWy3wA6Ucu_Pg]; set [node.name] to override                                                                                                                                                                                      
[2017-10-14T18:45:29,422][INFO ][o.e.n.Node               ] version[5.6.2], pid[78], build[57e20f3/2017-09-23T13:16:45.703Z], OS[Linux/4.2.8/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11]                                                                                                                      
[2017-10-14T18:45:29,422][INFO ][o.e.n.Node               ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.n
etty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/elasticsearch]                                                                                 
[2017-10-14T18:45:32,188][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [aggs-matrix-stats]                                                                                                                                                                                                                                         
[2017-10-14T18:45:32,188][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [ingest-common]                                                                                                                                                                                                                                             
[2017-10-14T18:45:32,189][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [lang-expression]                                                                                                                                                                                                                                           
[2017-10-14T18:45:32,189][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [lang-groovy]                                                                                                                                                                                                                                               
[2017-10-14T18:45:32,189][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [lang-mustache]                                                                                                                                                                                                                                             
[2017-10-14T18:45:32,189][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [lang-painless]                                                                                                                                                                                                                                             
[2017-10-14T18:45:32,190][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [parent-join]                                                                                                                                                                                                                                               
[2017-10-14T18:45:32,190][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [percolator]                                                                                                                                                                                                                                                
[2017-10-14T18:45:32,190][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [reindex]                                                                                                                                                                                                                                                   
[2017-10-14T18:45:32,190][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [transport-netty3]                                                                                                                                                                                                                                          
[2017-10-14T18:45:32,190][INFO ][o.e.p.PluginsService     ] [kyLufS_] loaded module [transport-netty4]                                                                                                                                                                                                                                          
[2017-10-14T18:45:32,192][INFO ][o.e.p.PluginsService     ] [kyLufS_] no plugins loaded                                                                                                                                                                                                                                                         
[2017-10-14T18:45:37,495][INFO ][o.e.d.DiscoveryModule    ] [kyLufS_] using discovery type [zen]                                                                                                                                                                                                                                                
[2017-10-14T18:45:39,853][INFO ][o.e.n.Node               ] initialized                                                                                                                                                                                                                                                                         
[2017-10-14T18:45:39,853][INFO ][o.e.n.Node               ] [kyLufS_] starting ...                                                                                                                                                                                                                                                              
[2017-10-14T18:45:40,618][INFO ][o.e.t.TransportService   ] [kyLufS_] publish_address {10.0.3.2:9300}, bound_addresses {0.0.0.0:9300}                                                                                                                                                                                                           
[2017-10-14T18:45:40,655][INFO ][o.e.b.BootstrapChecks    ] [kyLufS_] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks                                                                                                                                                                               
[2017-10-14T18:45:40,662][ERROR][o.e.b.Bootstrap          ] [kyLufS_] node validation exception                                                                                                                                                                                                                                                 
[2] bootstrap checks failed                                                                                                                                                                                                                                                                                                                     
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]                                                                                                                                                                                                                                             
[2]: max virtual memory areas vm.max_map_count [65535] is too low, increase to at least [262144]                                                                                                                                                                                                                                                
[2017-10-14T18:45:40,693][INFO ][o.e.n.Node               ] [kyLufS_] stopping ...                                                                                                                                                                                                                                                              
[2017-10-14T18:45:40,748][INFO ][o.e.n.Node               ] [kyLufS_] stopped                                                                                                                                                                                                                                                                   
[2017-10-14T18:45:40,749][INFO ][o.e.n.Node               ] [kyLufS_] closing ...                                                                                                                                                                                                                                                               
[2017-10-14T18:45:40,805][INFO ][o.e.n.Node               ] [kyLufS_] closed                                         

The only thing I could see is:

[2] bootstrap checks failed                                                                                                                                                                                                                                                                      
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]                                                                                                                                                                                              
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 

But is it something that could fail the initialization?

@spujadas
Copy link
Owner

Yes, if a bootstrap check fails then Elasticsearch will not start.
In your case you have to increase your max file descriptors, and to increase your max virtual memory areas (see http://elk-docker.readthedocs.io/#es-not-starting-max-map-count).

@atais
Copy link
Author

atais commented Oct 14, 2017

As mentioned at the beginning I am hosting it on my QNap, using some strange Linux version and I failed to fix the above even though I have tried a couple of tutorials.

Maybe, you could think of using those as a warning instead.
For the moment I am successful with setting up a similar solution: https://github.com/deviantony/docker-elk

@spujadas
Copy link
Owner

Sorry, I'm unfamiliar with QNap so can't help you work out how to set those parameters.

As far as I can see, the solution from https://github.com/deviantony/docker-elk is configured to run in development mode (https://github.com/deviantony/docker-elk/blob/master/elasticsearch/config/elasticsearch.yml#L13-L16), which disables the bootstrap tests. (In production mode, Elasticsearch enforces the tests and generates the error — not the image, so I can't do anything about that like issuing a warning.)

I can only see two ways of making progress here:

  • Ask for help from QNap's support on how to set the parameters.

  • Override the default configuration file for Elasticsearch in the image to include discovery.type: single-node, thereby downgrading to development mode and bypassing the bootstrap tests.

Hope that helps.

@atais
Copy link
Author

atais commented Oct 14, 2017

Thanks for checking for the differences!
I will first try contacting Qnap support and I will check if they could help me with those issues.

Please leave the issue open for the time being. I will update it if I manage to solve those issues and I will try to rerun the docker.

@spujadas
Copy link
Owner

Sure thing, leaving open for now.

@atais
Copy link
Author

atais commented Oct 24, 2017

Managed to solve it 👍 !!

max virtual memory areas vm.max_map_count [65535] is too low

sudo sysctl -w vm.max_map_count=262144

Source:

max file descriptors [4096] is too low

docker run --ulimit nofile=90000:90000 <image-tag>

Source:

@atais
Copy link
Author

atais commented Oct 24, 2017

About the second one... Could we modify the container file to apply those settings by default?

@spujadas
Copy link
Owner

Thanks for the update!

About the second one... Could we modify the container file to apply those settings by default?

Unfortunately no, it isn't an image-specific parameter so it can only be set at runtime on the host.

@atais
Copy link
Author

atais commented Oct 25, 2017

perfect. well. lets close that one. hope others will benefit.

@atais atais closed this as completed Oct 25, 2017
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

2 participants