Reputation: 438
I am trying to send data from apache kafka producer to elastic search using kafka connect elasticsearch
Getting following error in elasticsearch:
[2017-12-21T11:00:54,979][DEBUG][o.e.a.b.TransportShardBulkAction]
[pageviews7][0] failed to execute bulk item (index) BulkShardRequest
[[pageviews7][0]] containing [index {[pageviews7][kafkaconnect]
[pageviews7+0+0], source[{"key1":"value1"}]}]
org.elasticsearch.index.mapper.MapperParsingException: failed to find
type parsed [string] for [key1]
Following is my kafka-connect-elasticsearch properties file:
name=elasticsearch-sink
connector.class=
io.confluent.connect.elasticsearch.ElasticsearchSinkConnector
tasks.max=1
topics=pageviews7
key.ignore=true
connection.url=http://localhost:9200
type.name=kafkaconnect
schemas.enable=false
schema.ignore=true
Upvotes: 1
Views: 746
Reputation: 32090
What version of Elasticsearch are you running? You may fine that setting schema.ignore=true
in your Kafka Connect connector config will workaround this error.
Upvotes: 0
Reputation: 868
Try the stream-reactor
Kafka connectors for Elastic-Search. One uses the TCP protocol and the other one the HTTP protocol, and they have been battle-tested in Production sinking 5+ Billion events / day into ES indexes, and they are pretty easy to configure and well documented
https://github.com/landoop/stream-reactor
Upvotes: 1
Reputation: 2901
This looks like a problem with indexing the document into Elasticsearch:
Example of how to curl manually into ES:
curl -XPOST <ES-url>/pageviews7/test_id -d '{"key1":"value1"}'
Delete you current inedex:
curl -XDELETE <ES-url>/pageviews7
Upvotes: 0