1。 启动es服务报以下错误
bin/elasticsearch
https://github.com/elastic/elasticsearch/issues/21932
max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]```
解决方案:
修改/etc/sysctl.conf 文件,添加 “vm.max_map_count”设置
vm.max_map_count=655360
并执行:sysctl -p
vi /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
```failed to send join request to master [{node_171}{NT2Ja3nbTUWTBds1YKK6IA}{9o4wdJDSQtKEax63JNDm3w}{10.2.7.171}{10.2.7.171:9300}], reason [RemoteTransportException[[node_171][10.2.7.171:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node_22}{4nxfktphTMy4Uj8DHhlYCg}{IDgspa04T3qlI6io8PEOUA}{10.2.30.22}{10.2.30.22:9300}, found existing node {node_24}{4nxfktphTMy4Uj8DHhlYCg}{vyz1ZWgqTBO8XLOfvmm_2w}{10.2.16.24}{10.2.16.24:9300} with the same id but is a different node instance]; ]```
解决方案:rm -rf data/nodes
2。使用java连接ES时报错
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1 9300
原因除了网上说的端口号问题/cluster.name问题外,还有可能是java代码elasticsearch 版本号跟es服务版本号不一致!!!