记录Linux下安装elasticSearch时遇到的一些错误

记录Linux下安装elasticSearch时遇到的一些错误

http://blog.sina.com.cn/s/blog_c90ce4e001032f7w.html

  (2016-11-02 22:03:11)
标签: 

elasticsearch

分类: 程序错误集锦
  本人安装ElasticSearch的步骤完全参照 官方文档 来进行,在此仅记录下安装过程遇到的一些错误以及解决的办法。
错误一 cannot allocate memory
记录Linux下安装elasticSearch时遇到的一些错误
解决方案:  虚拟机内存不够,关掉centos ,重新加大内存分配,原先是 512M ,现在分配到 1800M
 
记录Linux下安装elasticSearch时遇到的一些错误

错误二  can not run elasticsearch as root

记录Linux下安装elasticSearch时遇到的一些错误
解决方案:  不能用root 用户登录来执行,切换为普通用户,
 
错误三 切换为普通用户后,权限不够
 
错误四  max virtual memory areas vm.max_count [65530] likely too low,increase to at least [26244

记录Linux下安装elasticSearch时遇到的一些错误
解决方案: https://zhuanlan.zhihu.com/p/22241634?refer=dataeye
记录Linux下安装elasticSearch时遇到的一些错误

错误五 max file descriptors [4096]  for elasticsearch process likely too low,increase to at least[65536] 

0

 

 

 

elasticsearch安装参数配置注意事项

1 星 2 星 3 星 4 星 5 星( 4 次投票, 评分:  5.00, 总分: 5)
baidu_share 0
 
 

在elasticsearch安装时,有几个重要的参数配置需要我们注意:
1.文件描述
http://www.elasticsearch.org/guide/reference/setup/installation/这样描述:

Make sure to increase the number of open files descriptors on the machine (or for the user running elasticsearch). Setting it to 32k or even 64k is recommended.
 
In order to test how many open files the process can open, start it with -Des.max-open-files set to true. This will print the number of open files the process can open on startup.

关于第一句话就是我们的文件描述符配置设置为32k或者64k,具体配置为:
在linux系统:

/etc/security/limits.conf

编辑该文件,后面加上:

xq soft nofile 65536
xq hard nofile 65536

备注:xq为用户名,同时确保xq用户拥有次命令权限
用vi 编辑bin/elasticsearch文件后面加入

-Des.max-open-files=ture

这样在 运行命令

sh elasticsearch

就可以看得文件描述符的大小了

2.内存设置
elasticsearch内存设置为:

bootstrap.mlockall: true

这样可以elasticsearch确保使用物理内存,不使用linux swap 。

/etc/security/limits.conf

编辑该文件,后面加上:

xq  -memlock     unlimited

备注:xq为用户名,同时确保xq用户拥有次命令权限
或者直接编辑/etc/profile文件,在后面加上

ulimit -l unlimited

3.作为一个服务运行
请参考:elasticsearch service安装

本文固定链接: http://www.chepoo.com/elasticsearch-installation-parameters-configuration-considerations.html | IT技术精华网

转载于:https://www.cnblogs.com/pyfreshman/p/6183000.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值