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]];

这个错就是参数的冒号前后没有加空格,加了之后就好,我找了好久这个问题;

后来在一个外国网站找到了这句话.


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官方程序员没有在这上边加验证,没有做好处理;

参数上空格能解决好多问题.

也许过一段时间这种脑残的问题就解决了,但是之前的版本貌似都有这类问题

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值