故障现象:

[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"]

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

转载于:https://www.cnblogs.com/1111zhiping-tian/p/8496292.html

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐