Elasticsearch 5.x 启动报错解决办法

目录

can not run elasticsearch as root

解决方法:文章源自编程技术分享-https://mervyn.life/2e6506bd.html

groupadd elasticsearch
useradd elasticsearch -g elasticsearch -p elasticsearch
chown -R elasticsearch:elasticsearch elasticsearch
su elasticsearch  #切换到新建的用户执行启动

Elasticsearch requires at least Java 8

依赖: java >= 8, Only Oracle’s Java and the OpenJDK are supported. 推荐安装 1.8.0_73 or later,安装步骤如下:文章源自编程技术分享-https://mervyn.life/2e6506bd.html

  1. https://www.java.com/zh_CN/download/manual.jsp 下载对应系统的java
  2. tar zxvf jre-8u131-linux-x64.tar.gz
  3. 将该目录放置到想要安装的目录,然后加入linux环境变量$PATH 中

如果服务器有多个java环境,为了不影响其他代码,可以手动设置JAVA_HOME变量,如下:文章源自编程技术分享-https://mervyn.life/2e6506bd.html

export JAVA_HOME=/usr/local/java1.8.0

system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

这是在因为Centos6不支持SecComp,而ES默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。文章源自编程技术分享-https://mervyn.life/2e6506bd.html

解决方法:
elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:文章源自编程技术分享-https://mervyn.life/2e6506bd.html

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

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

sysctl -w vm.max_map_count=262144 #临时修改,重启机器后会失效

或者采用如下方式:文章源自编程技术分享-https://mervyn.life/2e6506bd.html

sudo vim /etc/sysctl.conf

# 加入如下内容
vm.max_map_count=262144

# 保存退出后执行
sysctl -p

max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]

解决方法:
vi /etc/security/limits.d/90-nproc.conf文章源自编程技术分享-https://mervyn.life/2e6506bd.html

*          soft    nproc     1024  # 1024改为2048
文章源自编程技术分享-https://mervyn.life/2e6506bd.html
weinxin
我的微信公众号
微信扫一扫
mervyn
从 mysql 用户的角度使用 Elasticsearch 数据库

从 mysql 用户的角度使用 Elasticsearch

本文主要讲述初次接触ES时,如何以使用MySQL的方式来应用 Elasticsearch 从而达到快速入门的目的。 以下例子均基于 Elasticsearch 6.0 例: order_test 表结...
Elasticsearch-PHP 遇到的坑 PHP

Elasticsearch-PHP 遇到的坑

大数据量分页查询报错 问题详情 在用elasticsearch-php分页查询时,分页几次后报错,错误内容如下: { "error":{ "root_cause"...
Elasticsearch高级应用-聚合 数据库

Elasticsearch高级应用-聚合

聚合的分类 度量聚合 在一组文档中队某个数字型字段进行计算得出指标值 分组聚合 创建多个分组,每个分组关联一个关键字和相关文档标准 管道聚合 这一类的聚合的数据源是其他聚合的输出,然后进行相关指标的计...
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: