elasticsearch-6.4.2安装问题集锦

本文详细介绍了如何修改Elasticsearch的配置文件以更改访问IP和端口,同时解决了max_virtual_memory_area和max_number_of_threads两个常见错误,确保Elasticsearch能够顺利启动和运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

解压并运行elasticsearch 发现不能启动和访问

1  修改访问elasticsearch的IP及端口

       修改文件 elasticsearch/config/elasticsearch.yml

       找到如下代码段,并取消network.host及http.port所在行的注释,修改IP及端口

  network.host: 192.168.0.155
#
# Set a custom port for HTTP:
#
http.port: 9200

 

2  config/elasticsearch.yml文件,找到如下配置, IP为自己的服务器IP即可

discovery.zen.ping.unicast.hosts: ["192.168.0.155"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 1

 

3  错误描述:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

解决方案:切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf 

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

 

4  错误描述:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

这个问题折腾我半天

解决方案切换到root用户,进入limits.d目录下修改配置文件。

vi /etc/security/limits.d/90-nproc.conf 

修改如下内容:

* soft nproc 1024

* hard nproc 4096

#修改为

* soft nproc 2048

* hard nproc 4096

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值