Elasticsearch5.0 Installation Problem Collection

Source: Internet
Author: User

Use Elasticsearch5.0 must be installed jdk1.8

[Email protected] bin]$ java-"1.8.0_112"1.8. 0_112-   25.112-B15, mixed mode) [[email protected]

You will encounter the following issues when starting ES with the root account

[2016-11-14t10:05:29,358][warn [ O.e.b.elasticsearchuncaughtexceptionhandler] [] uncaught exception in thread [main] Org.elasticsearch.bootstrap.StartupException:java.lang.RuntimeException:can not run Elasticsearch as Rootat Org.elasticsearch.bootstrap.Elasticsearch.init (elasticsearch.java:116) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.bootstrap.Elasticsearch.execute (elasticsearch.java:103) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.cli.SettingCommand.execute (settingcommand.java:54) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.cli.Command.mainWithoutErrorHandling (command.java:96) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.cli.Command.main (command.java:62) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.bootstrap.Elasticsearch.main (elasticsearch.java:80) ~[elasticsearch-5.0.0.jar:5.0.0]at Org.elasticsearch.bootstrap.Elasticsearch.main (elasticsearch.java:73) ~[elasticsearch-5.0.0.jar:5.0.0] 

Solution:

Create a new user because the security issue elasticsearch not run directly with the root user

    • It is recommended to create a separate user to run the Elasticsearch

    • Create Elsearch user groups and Elsearch users

-G elsearch-p Elasticsearch

When you start es with Elsearch, you encounter the following issues

error:bootstrap checks Failedmax file descriptors [10240] forElasticsearch process likely too low, increase to at least [65536]max number of threads [1024x768] forUser [Elsearch] likely too low, increase to at least [2048]maxVirtualMemory Areas Vm.max_map_count [65530] Likely too low, increase to at least [262144][ .- One-14t10: A: -,569][info][o.e.n.node] [mysteel-Node1] stopping ... [ .- One-14t10: A: -,615][info][o.e.n.node] [mysteel-Node1] stopped[ .- One-14t10: A: -,615][info][o.e.n.node] [mysteel-Node1] Closing ... [ .- One-14t10: A: -,638][info][o.e.n.node] [mysteel-node1] Closed

Workaround reference: http://www.cnblogs.com/sloveling/p/elasticsearch.html

Switch to root user

Vi/etc/security/limits.conf

Add the following content:

65536 131072 2048 4096


Vi/etc/security/limits.d/90-nproc.conf

Modify the following content: 1024x768 #修改为 2048

Vi/etc/sysctl.conf

Add the following configuration: Vm.max_map_count=655360
-P
Then, restart Elasticsearch to start the success.

Elasticsearch5.0 Installation Problem Collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.