最全ElasticSearch启动失败问题(附解决方案)

1.内核过低

unable to install syscall filter: requires kernel 3.5+ with CONFIG SECCOM

原因:因为我们使用的是centos6,其linux内核版本为2.6。而Elasticsearch的插件要求至少3.5以上版本。不过没关系,我们禁 用这个插件即可。

解决方法:

  • 修改elasticsearch.yml文件,在最下面添加如下配置
  • bootstrap.system_call_filter: false 

2.文件权限不足

原因:我们用的是es用户,而不是root,所以文件权限不足

解决方法:

方案1:

  • sudo chmod -R 777 /usr/local/elasticsearch(直接给足权限,路径替换成你自己es安装目录)

方案2:

  • 首先用root用户登录,然后修改配置文件:
  • vim /etc/security/limits.conf 
  • 添加下面的内容:

  • * soft nofile 65536 
    * hard nofile 131072 
    * soft nproc 4096 
    * hard nproc 4096 

3.线程数不够

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

解决方法:

  • vim /etc/security/limits.d/20-nproc.conf
  • 修改下面的内容:

  •  soft nproc 1024 改为 soft nproc 4096 
  • 执行 vim /etc/security/limits.conf,在文件最后添加:
  • * soft nproc 65535
    * hard nproc 65535

4.不能以root账户进行启动

can not run elasticsearch as root

原因:意思是不能使用root账户启动,我们可以创建普通用户来进行Es的启动,操作指令如下,可根据自己实际情况而定

解决方法:

  • 创建非root用户
[root@localhost ~]# useradd es
[root@localhost ~]# passwd es
Changing password for user es.
New password:    【Wahaha123】
Retype new password: 
[root@localhost ~]# chmod 777 /usr/local   【授予es用户/usr/local目录  可读可写可执行权限】
[root@localhost ~]# su es
[es@localhost ~]$ 

5.进程虚拟内存不足

max virtual memory areas vm.max map count [65530l is too low,increase to at least [262144]

通过设置 vm.max_map_count:限制一个进程可以拥有的VMA(虚拟内存区域)的数量

  • 使用root用户,修改配置文件, vim /etc/sysctl.conf 添加下面内容:

  • vm.max_map_count=655360 
  • 修改完成之后在终端执行

  • ##然后执行命令
    sysctl -p 

6.未设置节点

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_ho...]

解决方法:
  • 修改elasticsearch.yml
  • cluster.name: my-application
    node.name: node-1
    cluster.initial_master_nodes: ["node-1"]
  • 9
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用内容,elasticsearch启动超时的问题可能是由于启动超时值过低所导致的。在引用中显示,启动超时值为8分钟20秒。另外,在引用中显示,elasticsearch服务在启动时超时并失败。解决这个问题的方法是修改elasticsearch的配置。可以尝试增加启动超时值或调整其他相关配置。此外,在引用中提到,由于网络问题,可能会导致节点被踢出集群,这也可能导致elasticsearch启动超时的问题。如果网络恢复,节点将重新加入集群。为处理这种情况,可以修改配置来优化elasticsearch集群的性能表现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [ElasticSearch – 服务启动操作超时](https://blog.csdn.net/allway2/article/details/121966081)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [(六)elasticsearch 集群 网络超时解决方案 --- Elasticsearch 集群搭建](https://blog.csdn.net/qq_41497111/article/details/89669803)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值