问题描述
我正在尝试将MYSQL与ElasticSearch集成在Windows 7中,从此
我已经完成了以下步骤:
1:
2:
3:
我现在检查了插件目录中有两个文件
-
elasticsearch-river-jdbc-1.3.4.4.jar
-
mysql-connector-java-5.1。 33-bin
现在我试图在CMD上执行这个命令,我有错误
curl -XPUT'localhost:9200 / _river / jdbc-1.3.4.4-d2e33c3 / _meta'-d'{
type: jdbc,
jdbc:{
url:jdbc:mysql:// localhost:3306 / test,
user:root,
password:pass,
sql:select * from abc
}
}'
{
error:MapperParsingException [failed to parse];嵌套:JsonParseException [意外字符('''(代码39)):期望一个有效的值(数字,字符串,数组,对象,'真','假'或'空')\\ @ 3cf756; line:1,column:2]]; ,
状态:400
}
curl:(6)无法解析主机:type;主机未找到
curl:(6)无法解析主机:没有请求类型的数据记录
curl:(6)无法解析主机:jdbc,jdbc;没有请求类型的数据记录
curl:(6)无法解析主机::;没有请求类型的数据记录
curl:(3)[globbing] pos 5中不匹配的大括号5
curl:(6)无法解析主机: ;没有请求类型的数据记录
curl:(6)无法解析主机:jdbc:mysql :;没有请求类型的数据记录
curl:(6)可以不解析主机::没有请求类型的数据记录
curl:(6)无法解析主机:root,密码;没有请求的数据记录typ
e
curl: (6)无法解析主机::没有请求类型的数据记录
curl:(6)无法解析主机:pass,sql;请求类型的数据记录
curl:(6)不能r esolve host::;没有请求类型的数据记录
curl:(6)无法解析主机:select * from abc;没有请求类型的数据记录
我是将此 jdbc-1.3.4.4-d2e33c3 名称用作jdbc驱动程序。我从这个链接得到这个名字。
http:// localhost:9200 / _nodes?settings = true& pretty = true
我已经搜索到但是找不到与mysql集成相关的任何问题。
我的问题还是没有,或者我做错了设置。
Windows卷发行为不同。尝试使用
curl -XPUThttp://127.0.0.1:9200/index/type/id-d{attribute:name }。
尝试使用这些三重引号
I am trying to integrate MYSQL in ElasticSearch On windows 7 from this link
I have completed the following steps:
1:
2:
3:
I have checked now there are two files in plugins directory
elasticsearch-river-jdbc-1.3.4.4.jar
mysql-connector-java-5.1.33-bin
Now I tried to execute this command on CMD and I got error
curl -XPUT 'localhost:9200/_river/jdbc-1.3.4.4-d2e33c3/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"password" : "pass",
"sql" : "select * from abc"
}
}'
{
"error": "MapperParsingException[failed to parse]; nested: JsonParseException[Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@3cf756; line: 1, column:2]]; ",
"status": 400
}
curl: (6) Could not resolve host: type; Host not found
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: jdbc,jdbc; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (3) [globbing] unmatched brace at pos 5
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: jdbc:mysql:; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: root,password; No data record of requested typ
e
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: pass,sql; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: select * from abc; No data record of requested type
I am using this jdbc-1.3.4.4-d2e33c3 name as jdbc driver. I get this name from this link.
http://localhost:9200/_nodes?settings=true&pretty=true
I have searched on it but cannot found any issue like this related to mysql integration.
My Question is anything still missing or I am doing wrong setup.?
On Windows curls acts differently. Try usingcurl -XPUT "http://127.0.0.1:9200/index/type/id" -d "{ """attribute""" : """name""" }".
Try with those triple quotes
这篇关于ElasticSearch错误:MapperParsingException无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!