Linux系统下安装 Elasticsearch 6.XX 外网无法访问的问题

 

修改配置文件elasticsearch.yml

[wys@elk2 elasticsearch-6.2.2]$ vim config/elasticsearch.yml

     放开下面的注解 然后配置相应的内容

  1. network.host: 172.16.1.177 #主机地址,这里写本机IP

  2. http.port: 9200 #端口

  修改后,再次启动ES后,可能会出现下面的错误

 
  1. [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

  2. [2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]

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

  4. [4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

以下内容为网上的大佬的解决方式   完全搬过来的     ::::使用root身份,执行以下操作

解决问题【1】【2】

[root@elk2 ~]# vim /etc/security/limits.conf

在文件未添加以下内容(xx处为用户名)

  1. xx soft nofile 65536

  2. xx hard nofile 131072

  3. xx soft nproc 4096

  4. xx hard nproc 4096

解决问题【3】

  1. [root@elk2 ~]# sysctl -w vm.max_map_count=262144

  2. [root@elk2 ~]# vim /etc/sysctl.conf #让配置永久生效

在文末添加以下内容

vm.max_map_count=262144

解决问题【4】

Centos6不支持SecComp,而ES6默认bootstrap.system_call_filter为true

[es@elk2 elasticsearch-6.2.2]$ vim config/elasticsearch.yml

禁用:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面: 

取消bootstrap.memory_lock的注释,添加bootstrap.system_call_filter 配置

  1. bootstrap.memory_lock: false

  2. bootstrap.system_call_filter: false

再次启动es,成功启动

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值