zoukankan      html  css  js  c++  java
  • 启动elasticsearch的时候报出Exception in thread "main" SettingsException[Failed to load settings from /usr/local/elasticsearch/config/elasticsearch.yml]; nested: MarkedYAMLException[while scanning a simple ke

    故障现象:

    [elasticsearch@tiantianml-01 ~]$ /usr/local/elasticsearch/bin/elasticsearch
    Exception in thread "main" SettingsException[Failed to load settings from /usr/local/elasticsearch/config/elasticsearch.yml]; nested: MarkedYAMLException[while scanning a simple key
     in 'reader', line 8, column 1:
        discovery.zen.ping.unicast.hosts ... 
        ^
    could not find expected ':'
     in 'reader', line 9, column 1:
        
        ^
    
     at [Source: cluster.name: my-application
    node.name: tiantianml-01
    path.data: /usr/local/elasticsearch/data
    path.logs: /usr/local/elasticsearch/logs
    #bootstrap.memory_lock: false
    network.host: 127.0.0.1
    http.port: 9200
    discovery.zen.ping.unicast.hosts:["tiantianml-01"]
    ...

    出现这种错误的原因说明elasticsearch.yml这个配置文件的":"后面缺少空格,查看配置文件如下(果然缺少空格):

    cluster.name: my-application
    node.name: tiantianml-01
    path.data: /usr/local/elasticsearch/data
    path.logs: /usr/local/elasticsearch/logs
    bootstrap.memory_lock: false
    network.host: 127.0.0.1
    http.port: 9200
    discovery.zen.ping.unicast.hosts:["tiantianml-01"]

    添加空格重新启动即可正常启动。

  • 相关阅读:
    英语46级CET外语大学词汇
    TOEFL词汇笔记英语托福英语
    19道常见的JS面试算法题
    Vue.js---指令与事件、语法糖
    Qt--多线程间的互斥
    const关键字总结
    Numpy和Pandas的使用入门
    python爬虫爬取天气数据并图形化显示
    JCEF-鼠标右键菜单
    JCEF-tab形式展示浏览器
  • 原文地址:https://www.cnblogs.com/1111zhiping-tian/p/8496292.html
Copyright © 2011-2022 走看看