es部署问题处理

问题1:Elasticsearch启动报/usr/local/elasticsearch-6.2.2/logs/spring-boot.log (权限不够)
解决方法:1、切换到root用户
    2、切换到elasticsearch-6.2.2的上级目录,授予权限
    语法:chown -R 用户:用户 elasticsearch-6.2.2/
    chown -R es:es elasticsearch-6.2.2
问题2:开启bootstrap.memory_lock: true后,在Elasticsearch集群启动的时候,会报如下错误
ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked
解决方法:
    方案1:此方案适用于非systemd管理的linux发行版,centos 6及以下可以仅通过这个方案解决
    临时解决方法:ulimit -l unlimited
    永久解决方法:root权限编辑/etc/security/limits.conf
    添加:* soft memlock unlimited
              * hard memlock unlimited
    另:这里有个坑就是如果/etc/security/limits.d文件夹下的有配置文件,那么会覆盖刚才修改的文件,所以请确保该目录没有其它文件,如有请联系运维人员确认删除
    使用sysctl -p立即生效
    方案2:适用于systemd管理的发行版,有文章提到centos 7需要使用此方案
    sudo vim /etc/systemd/system.conf
    添加:DefaultLimitNOFILE=65536
              DefaultLimitNPROC=32000
                          DefaultLimitMEMLOCK=infinity
问题3:ERROR: bootstrap checks failed
解决方法:
vim /etc/security/limits.conf //添加, 【注销后并重新登录生效】
* soft nofile 300000
* hard nofile 300000
* soft nproc 102400
* hard nproc 102400

问题4:system call filters failed to install; check the logs and fix your configuration or disable system call fil ters at your own risk
解决方法:
1、vi ./elasticsearch-6.1.3/config/elasticsearch.yml
2、在一栏Memory 下加上:bootstrap.system_call_filter: false

问题6: java.io.StreamCorruptedException: received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration
解决方法:查看elasticsearch.yml中集群配置,只用配置IP不用端口

设置数据节点:
增加:node.data:true

猜你喜欢

转载自blog.csdn.net/D_J1224/article/details/112602746