用logstash把mysql数据传入elasticsearch时报错"reason"=>"no such index and [action.auto_create_index]。。。(已解决)

打开cmd.exe,进入D:\download\logstash-6.3.2\logstash-6.3.2\bin,输入logstash -f ../config/mysql.conf,结果出现报错"reason"=>"no such index and [action.auto_create_index]。。。,原因是要在elasticsearch的配置文件手动创建index,然后我在D:\download\elasticsearch-6.3.2\elasticsearch-6.3.2\config目录下的elasticsearch.yml的最后一行加入index,红圈的是我加入的index。

最后就成功的把mysql数据同步到elasticsearch中了,如下:

用logstash把mysql数据传入elasticsearch时报错"no such index and [action.auto_create_index]。。。(已解决)_第1张图片" height="420" src="http://img.e-com-net.com/image/info8/fb73b1dec931489d99026b97cb969fba.jpg" width="650" style="border:1px solid black;"> 同时也能用Postman获取到:

用logstash把mysql数据传入elasticsearch时报错"no such index and [action.auto_create_index]。。。(已解决)_第2张图片" height="298" src="http://img.e-com-net.com/image/info8/ef3724662ba640d0bae87462ebaea318.jpg" width="650" style="border:1px solid black;">

你可能感兴趣的:(java)