Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] connector crash without a legit reason [type:mapper_parsing_exception][reason: array_index_out_of_bounds_exception Index -1 out of bounds for length 0] #694

Open
plainfatboy opened this issue Apr 28, 2023 · 1 comment

Comments

@plainfatboy
Copy link

plainfatboy commented Apr 28, 2023

Error from task

org.apache.kafka.connect.errors.ConnectException: Exiting WorkerSinkTask due to unrecoverable exception.
org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:610)
org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:330)
org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:232)
org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:201)
org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:188)
org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:750)\nCaused by: org.apache.kafka.connect.errors.ConnectException: Bulk request failed: [{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse\",\"caused_by\":{\"type\":\"array_index_out_of_bounds_exception\",\"reason\":\"Index -1 out of bounds for length 0\"}}]
io.confluent.connect.elasticsearch.bulk.BulkProcessor$BulkTask.handleMalformedDoc(BulkProcessor.java:557)
io.confluent.connect.elasticsearch.bulk.BulkProcessor$BulkTask.execute(BulkProcessor.java:490)
io.confluent.connect.elasticsearch.bulk.BulkProcessor$BulkTask.call(BulkProcessor.java:444)
io.confluent.connect.elasticsearch.bulk.BulkProcessor$BulkTask.call(BulkProcessor.java:430)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:750)
io.confluent.connect.elasticsearch.bulk.BulkProcessor$BulkProcessorThread.run(BulkProcessor.java:425)

Config:

{
	"connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
	"type.name": "_doc",
	"elastic.https.ssl.truststore.type": "JKS",
	"elastic.https.ssl.key.password": "testtest",
	"schema.compatibility": "NONE",
	"tasks.max": "4",
	"topics": "testtest",
	"key.ignore": "true",
	"schema.ignore": "true",
	"elastic.https.ssl.keystore.location": "/home/cp-kafka-connect/opensearch-cert/keystore.jks",
	"elastic.https.ssl.keystore.type": "JKS",
	"value.converter.schemas.enable": "false",
	"elastic.https.ssl.keystore.password": "testtest",
	"elastic.security.protocol": "SSL",
	"name": "elastic_sink",
	"elastic.https.ssl.truststore.password": "testtest",
	"errors.tolerance": "all",
	"connection.url": "https://localhost:9200",
	"value.converter": "org.apache.kafka.connect.json.JsonConverter",
	"key.converter": "org.apache.kafka.connect.json.JsonConverter",
	"elastic.https.ssl.truststore.location": "/home/cp-kafka-connect/opensearch-cert/truststore.jks"
	"errors.tolerance": "all",
  	"errors.deadletterqueue.topic.name": "audit_dlq_sink_k8s_prod",
  	"errors.deadletterqueue.context.headers.enable": "true",
  	"errors.deadletterqueue.topic.replication.factor": "1"
}

Connect version version": "6.2.10-ccs
Plug in version

{
    "class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
    "type": "sink",
    "version": "10.0.3"
  }

There are no dead letters showing. The tasks suddenly fail after restarting. Would it be possible for someone to guild me on this issue?

@billy-magnificent
Copy link

@plainfatboy Did you manage to solve this? I am experiencing the same issue and wasn't able to track it down :( Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants