Elasticsearch5.6.8 安装难点归咎

亚洲必赢app,明日在当中linux处境安装Elasticsearch5.陆.八时遭受一些主题素材,主要如下

应用Elasticsearch五.0
必须安装jdk一.捌

选用Elasticsearch伍.6.8 必须安装jdk壹.八

[elsearch@vm-mysteel-dc-search01 bin]$ java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
[elsearch@vm-mysteel-dc-search01 bin]$ 
[elsearch@vm-mysteel-dc-search01 bin]$ java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
[elsearch@vm-mysteel-dc-search01 bin]$ 

动用root账号运营es后 会境遇以下难题

使用root账号运转es后 会遭受以下难点

亚洲必赢app 1

亚洲必赢app 2

[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 root
at 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] 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[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 root
at 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]

减轻方案:

焚薮而田方案:

因为安全难题elasticsearch 不让用root用户直接运维,所以要开立异用户

因为安全难题elasticsearch 不让用root用户直接运维,所以要创建新用户

  • 提出创建1个单身的用户用来运转ElasticSearch

  • 始建elsearch用户组及elsearch用户

    groupadd elsearch
    useradd elsearch -g elsearch -p elasticsearch

  • 提出成立二个单身的用户用来运维ElasticSearch

  • 创建elsearch用户组及elsearch用户

    groupadd elsearch
    useradd elsearch -g elsearch -p elasticsearch

使用elsearch运行ES后 又会遇上以下难题

采取elsearch运营ES后 又会境遇以下难题

亚洲必赢app 3

亚洲必赢app 4

ERROR: bootstrap checks failed
max file descriptors [10240] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [elsearch] likely too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
[2016-11-14T10:22:17,569][INFO ][o.e.n.Node               ] [mysteel-node1] stopping ...
[2016-11-14T10:22:17,615][INFO ][o.e.n.Node               ] [mysteel-node1] stopped
[2016-11-14T10:22:17,615][INFO ][o.e.n.Node               ] [mysteel-node1] closing ...
[2016-11-14T10:22:17,638][INFO ][o.e.n.Node               ] [mysteel-node1] closed

亚洲必赢app 5

消除措施参谋 :http://www.cnblogs.com/sloveling/p/elasticsearch.html

ERROR: bootstrap checks failed
max file descriptors [10240] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [elsearch] likely too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
[2016-11-14T10:22:17,569][INFO ][o.e.n.Node               ] [mysteel-node1] stopping ...
[2016-11-14T10:22:17,615][INFO ][o.e.n.Node               ] [mysteel-node1] stopped
[2016-11-14T10:22:17,615][INFO ][o.e.n.Node               ] [mysteel-node1] closing ...
[2016-11-14T10:22:17,638][INFO ][o.e.n.Node               ] [mysteel-node1] closed

切换到root用户

亚洲必赢app 6

vi /etc/security/limits.conf

减轻情势参谋 :http://www.cnblogs.com/sloveling/p/elasticsearch.html

丰富如下内容:

切换到root用户

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

vi /etc/security/limits.conf

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

累加如下内容:

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

亚洲必赢app 7

 

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

vi /etc/sysctl.conf 

亚洲必赢app 8

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

然后,重新启动elasticsearch,即可启动成功。

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

亚洲必赢app 9

亚洲必赢app 10

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

亚洲必赢app 11

 

vi /etc/sysctl.conf 

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

然后,重新启动elasticsearch,即可启动成功。

亚洲必赢app 12

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图