ElasticSearch错误:MapperParsingException无法解析

 被盗不玩了 发布于 2022-12-07 13:04

我试图通过此链接将MYSQL集成到Windows 7上的ElasticSearch中

我已完成以下步骤:

1:

在C目录中下载和解压缩 https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.zip

2:

在CMD上运行此命令./bin/plugin --install jdbc --url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.3.4.4/elasticsearch-river-jdbc -1.3.4.4-plugin.zip

3:

从MYSQL网站下载MYSQL Connector mysql-connector-java-5.1.33.zip.

解压缩并复制mysql-connector-java-5.1.33-bin.jar文件.

将它放入C:\ elasticsearch-1.3.4\plugins\jdbc

我现在检查了插件目录中有两个文件

elasticsearch河-JDBC-1.3.4.4.jar

MySQL的连接器的Java-5.1.33斌

现在我尝试在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]; 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

MYSQL(5.5.37)数据库(测试)只包含一个表(abc),其中包含两列id(pk)和地址(varchar)

我使用这个jdbc-1.3.4.4-d2e33c3名称作为jdbc驱动程序.我从这个链接得到这个名字.

http://localhost:9200/_nodes?settings=true&pretty=true

我搜索过它但是找不到与mysql集成相关的任何问题.

我的问题还有什么遗失或者我的设置错误.

1 个回答
  • 在Windows上,卷发的行为有所不同.尝试使用 curl -XPUT "http://127.0.0.1:9200/index/type/id" -d "{ """attribute""" : """name""" }".这些三重引号尝试

    2022-12-11 03:08 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有