You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Elasticsearch连接报错errno61求助:配置文件解析失败

Elasticsearch启动失败及连接错误解决方法

问题根因

终端报错的mapping values are not allowed here是YAML配置语法错误导致的,直接引发Elasticsearch启动失败,进而导致应用侧出现ConnectionError: Failed to establish a new connection(服务未运行,无法建立连接)。错误点在elasticsearch.yml第110行的verification_mode: certificate配置项。

修复步骤

  • 打开elasticsearch.yml配置文件,定位到第110行
  • 检查该配置的YAML格式:
    • 确保verification_mode:冒号后面必须有一个空格,不能缺失或多空格
    • 检查该配置的父级节点(比如xpack.security.transport.ssl或xpack.security.http.ssl)的缩进,子项必须比父项多2个空格(Elasticsearch默认用2空格缩进,禁止用Tab)
    • 正确格式示例:
      xpack.security.http.ssl:
        enabled: true
        verification_mode: certificate
        certificate: ./config/certs/http_cert.pem
        key: ./config/certs/http_key.pem
      
  • 保存配置后,重启Elasticsearch服务
  • 确认服务启动成功后,测试应用连接是否恢复

内容的提问来源于stack exchange,提问作者Esmee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 23:25:18