elasticsearch7.2

1、安装配置

 

2、安装遇到的问题

2.1、警告:

[2019-07-09T06:53:29,541][WARN ][o.e.b.JNANatives         ] [node1] unable to install syscall filter: 
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

解决方法:

bootstrap.system_call_filter: false
bootstrap.memory_lock: true #防止es内存被交换出去

2.2、报错:

[1]: max number of threads [2048] for user [es] is too low, increase to at least [4096]

解决方法:

ulimit -a 查看
vim /etc/security/limits.conf
在最后添加:*代表所有用户
hadoop soft nofile 65536
hadoop hard nofile 131072
hadoop soft nproc 4096
hadoop hard nproc 4096

2.3、如果报错

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

加入

bootstrap.memory_lock: false

3、配置安全

bin/elasticsearch-setup-passwords interactive

需要开启:

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

然后启动其他节点报错:

send message failed [channel: Netty4TcpChannel{localAddress=0.0.0.0/0.0.0.0:56339, remoteAddress=/192.168.88.131:9300}]
javax.net.ssl.SSLException: Received fatal alert: handshake_failure

生成证书:

bin/elasticsearch-certutil ca
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12

 

xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate 
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12 
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12

在java.policy

grant{}中的最后一行加上:permission java.security.AllPermission;
因为给了所有权限
这样不对,还会报错 [1]: granting the all permission effectively disables security

加入到keystore

bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password
bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password

 

Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/opt/elasticsearch-7.2.0/elastic-certificates.p12" "read")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_191]

在java.policy加入:

        permission java.io.FilePermission "/opt/elasticsearch-7.2.0", "read";
        permission java.io.FilePermission "-", "read";

各个节点都配置

https://blog.csdn.net/MicoMecy/article/details/90642163

https://www.elastic.co/guide/en/elasticsearch/reference/7.2/configuring-tls.html#node-certificates

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值