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

rg.apache.kafka.connect.errors.DataException: Failed to deserialize data to Avro: #9

Open
renukaradhya opened this issue Sep 26, 2016 · 3 comments

Comments

@renukaradhya
Copy link

renukaradhya commented Sep 26, 2016

Getting below exception while trying to run kafka-connect-elastic-search-sink.

Steps:

  1. Copy connect-elasticsearch-schema-sink-1.0-jar-with-dependencies.jar to confluent-3.0.1\share\java\kafka-connect-elasticsearch
    2)Start Zookeeper, Kafka server, Schema-Registry.
  2. Run
    connect-standalone.bat ../../etc/schema-registry/connect-avro-standalone.properties ../../etc/kafka-connect-elasticsearch/connect-elasticsearch-schema-sink.properties
  3. Through producer push some Json on the topic ->
    connect-elasticsearch-schema-sink.txt

"Text".
Exception:
[2016-09-26 13:52:34,437] INFO WorkerSinkTask{id=elasticsearch-schema-sink-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSinkTask)
[2016-09-26 13:52:34,446] ERROR Task elasticsearch-schema-sink-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask)
org.apache.kafka.connect.errors.DataException: Failed to deserialize data to Avro:
at io.confluent.connect.avro.AvroConverter.toConnectData(AvroConverter.java:109)
at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:357)
at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:226)
at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:170)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:142)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id -1
Caused by: org.apache.kafka.common.errors.SerializationException: Unknown magic byte!
[2016-09-26 13:52:34,454] ERROR Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask)

@umntkid
Copy link

umntkid commented Oct 23, 2016

@renukaradhya did you figure out the issue ?
I'm getting the same exception

@zamirarif
Copy link

@renukaradhya I am getting the same exception...
Did you find the solution?
Exception:
[2018-05-03 16:04:44,762] ERROR WorkerSinkTask{id=dashboard-elasticsearch-sink-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:172) org.apache.kafka.connect.errors.DataException: deal-expense-new at io.confluent.connect.avro.AvroConverter.toConnectData(AvroConverter.java:95) at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:467) at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:301) at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:205) at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:173) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:170) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id -1 Caused by: org.apache.kafka.common.errors.SerializationException: Unknown magic byte! [2018-05-03 16:04:44,762] ERROR WorkerSinkTask{id=dashboard-elasticsearch-sink-0} Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:173)

@Tempys
Copy link

Tempys commented May 4, 2018

did you find the solution ?

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

4 participants