溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

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

發(fā)布時間:2020-04-05 08:00:44 來源:網(wǎng)絡(luò) 閱讀:13354 作者:wangyudiwang 欄目:數(shù)據(jù)庫

之前都是自己玩基本上沒改過配置文件,最近幾天又重新弄,改了一些配置文件,處理好多扯淡的錯誤;

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

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

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


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

后來在一個外國網(wǎng)站找到了這句話.


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




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


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


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

     ^

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

參數(shù)冒號后加空格,或者是數(shù)組中間加空格



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

例如:

# discovery.zen.minimum_master_nodes: 3



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

參數(shù)上空格能解決好多問題.

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


向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI