elasticsearch配置文件里的一些坑 [Failed to load settings from [elasticsearch.yml]]


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

版本是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]];

wKioL1drWdTRyZOEAABb6dcwiNk462.png-wh_50

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

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

wKiom1drWdXTq3ZcAAAfLyj_X5I590.png-wh_50

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

wKioL1drWdWj8iK3AABYBfUjVgU808.png-wh_50

這個是行的開頭沒有加空格,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 ... 

     ^

wKiom1drWdWgwsD9AAAZ1LdWga8086.png-wh_50

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

例如:

# discovery.zen.minimum_master_nodes: 3

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

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

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM