日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

elasticsearch按照配置时遇到的一些坑 [Failed to load settings from [elasticsearch.yml]]

發布時間:2024/9/20 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 elasticsearch按照配置时遇到的一些坑 [Failed to load settings from [elasticsearch.yml]] 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

自己搞得錯誤如下所示:

[root@localhost elasticsearch2.4]# ./bin/elasticsearch
Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: MarkedYAMLException[while parsing a block mapping
?in 'reader', line 33, column 1:
? ? path.data: /data/elastic/data
? ??
expected <block end>, but found BlockMappingStart
?in 'reader', line 54, column 2:
? ? ?network.host: 192.168.116.137
? ? ?

這里整理幾個空格引起的問題.

版本是elasticsearch-2.3.0 或者elasticsearch-rtf-master

Exception?in?thread?"main"?SettingsException[Failed?to?load?settings?from?[elasticsearch.yml]];?nested:?ElasticsearchParseException[malformed,?expected?settings?to?start?with?'object',?instead?was?[VALUE_STRING]];

這個錯就是參數的冒號前后沒有加空格,加了之后就好,我找了好久這個問題;

后來在一個外國網站找到了這句話.

Exception?in?thread?"main"?SettingsException[Failed?to?load?settings?from?[elasticsearch.yml]];?nested:?ElasticsearchParseException[malformed,?expected?end?of?settings?but?encountered?additional?content?starting?at?line?number:?[3],?column?number:?[1]];?nested:?ParserException[expected?'<document?start>',?but?found?BlockMappingStart

?in?'reader',?line?3,?column?1:

????node.rack?:?r1

????^

];

Likely?root?cause:?expected?'<document?start>',?but?found?BlockMappingStart

?in?'reader',?line?3,?column?1:

????node.rack?:?r1

這個是行的開頭沒有加空格,fuck!

Exception?in?thread?"main"?SettingsException[Failed?to?load?settings?from?[elasticsearch.yml]];?nested:?ScannerException[while?scanning?a?simple?key

?in?'reader',?line?11,?column?2:

?????discovery.zen.ping.unicast.hosts?...?

?????^

參數冒號后加空格,或者是數組中間加空格

還有注釋掉的參數不能在#后邊加空格不然報錯

例如:

# discovery.zen.minimum_master_nodes:?3

目前這個版本看來es官方程序員沒有在這上邊加驗證,沒有做好處理;

參數上空格能解決好多問題.

也許過一段時間這種腦殘的問題就解決了,但是之前的版本貌似都有這類問題


來源:http://www.cnblogs.com/beautiful-code/p/6264441.html

總結

以上是生活随笔為你收集整理的elasticsearch按照配置时遇到的一些坑 [Failed to load settings from [elasticsearch.yml]]的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。