ElasticSearch之—— ElasticSearch5.x安装中一些问题的解决办法

转载请注明出处:http://blog.csdn.net/l1028386804/article/details/77643732

1、ROOT用户不能正常启动

ElasticSearch2.0版本以后不能使用root来启动,需要创建一个普通用户来启动。

[root@liuyazhuang136 ~]# groupadd elasticsearch
[root@liuyazhuang136 ~]# useradd elasticsearch -g elasticsearch
[root@liuyazhuang136 ~]# chown -R elasticsearch.elasticsearch /usr/local/elasticsearch-5.5.1
[root@liuyazhuang136 ~]# su - elasticsearch
[elasticsearch@liuyazhuang136 ~]$ cd /usr/local/elasticsearch-5.5.1/bin/
[elasticsearch@liuyazhuang136 bin]$ ./elasticsearch
由普通用户启动,则可以正常启动服务。

2.ERROR: bootstrap checks failed

max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf 
添加如下内容:
* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

3.max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

解决:切换到root用户,进入limits.d目录下修改配置文件。

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

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

4.max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

解决:切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf 

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

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

5、bootstrap checks failed

报错:

bootstrap checks failed
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解决:

在elasticsearch.yml中加上如下配置即可:

bootstrap.system_call_filter: false

6、安装ES Header插件出现grunt的模块没有安装的问题

安装ES Header插件的时候出现了grunt的模块没有安装的问题,具体如下:

Local Npm module “grunt-contrib-clean” not found. Is it installed?
Local Npm module “grunt-contrib-concat” not found. Is it installed?
Local Npm module “grunt-contrib-watch” not found. Is it installed?
Local Npm module “grunt-contrib-connect” not found. Is it installed?
Local Npm module “grunt-contrib-copy” not found. Is it installed?
Local Npm module “grunt-contrib-jasmine” not found. Is it installed?
Warning: Task “connect:server” not found. Use –force to continue.
通过以下命令:
npm install grunt-contrib-clean –registry=https://registry.npm.taobao.org
npm install grunt-contrib-concat –registry=https://registry.npm.taobao.org
npm install grunt-contrib-watch –registry=https://registry.npm.taobao.org
npm install grunt-contrib-connect –registry=https://registry.npm.taobao.org
npm install grunt-contrib-copy –registry=https://registry.npm.taobao.org
npm install grunt-contrib-jasmine –registry=https://registry.npm.taobao.org
安装成功了。
但是启动之前要配置一下:
在elasticsearch.yml文件最后追加如下内容:
http.cors.enabled: true
http.cors.allow-origin: "*"
bootstrap.system_call_filter: false
用于head 无法跨域访问es的问题
经过这次安装还了解了一些npm install, 如果安装ES Header很慢,可以用以下两种思路解决:
1. 使用淘宝镜像:
淘宝npm镜像
• 搜索地址: http://npm.taobao.org/
• registry地址: http://registry.npm.taobao.org/
2. 看本机是否有其他程序占用网络资源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

冰 河

可以吃鸡腿么?

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值