Error starting the context, marking it as stopped org.apache.kafka.common.KafkaException: Failed to construct kafka consumer

ERROR [main] [org.apache.spark.streaming.StreamingContext] - Error starting the context, marking it as stopped
org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:702)
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:557)
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:540)
    at org.apache.spark.streaming.kafka010.Subscribe.onStart(ConsumerStrategy.scala:84)
    at org.apache.spark.streaming.kafka010.DirectKafkaInputDStream.consumer(DirectKafkaInputDStream.scala:72)
    at org.apache.spark.streaming.kafka010.DirectKafkaInputDStream.start(DirectKafkaInputDStream.scala:242)
    at org.apache.spark.streaming.DStreamGraph$$anonfun$start$7.apply(DStreamGraph.scala:54)
    at org.apache.spark.streaming.DStreamGraph$$anonfun$start$7.apply(DStreamGraph.scala:54)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach_quick(ParArray.scala:143)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach(ParArray.scala:136)
    at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51)
    at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:152)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443)
    at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
    at ... run in separate thread using org.apache.spark.util.ThreadUtils ... ()
    at org.apache.spark.streaming.StreamingContext.liftedTree1$1(StreamingContext.scala:578)
    at org.apache.spark.streaming.StreamingContext.start(StreamingContext.scala:572)
    at com.bw.streaming.day03.Spa1$.main(Spa1.scala:95)
    at com.bw.streaming.day03.Spa1.main(Spa1.scala)
Caused by: org.apache.kafka.common.KafkaException: org.codehaus.jackson.map.deser.std.StringDeserializer is not an instance of org.apache.kafka.common.serialization.Deserializer
    at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:203)
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:663)
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:557)
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:540)
    at org.apache.spark.streaming.kafka010.Subscribe.onStart(ConsumerStrategy.scala:84)
    at org.apache.spark.streaming.kafka010.DirectKafkaInputDStream.consumer(DirectKafkaInputDStream.scala:72)

我做的是 Streaming拉取kafka的直连方式  案例

错误原因是我包引入错误

你们好好检查一下

原文地址:https://www.cnblogs.com/JBLi/p/11371335.html

时间: 2024-10-02 11:39:48

Error starting the context, marking it as stopped org.apache.kafka.common.KafkaException: Failed to construct kafka consumer的相关文章

启动tomcat服务器报错:ERROR ContextLoader:307 - Context initialization failed

错误详情 十月 01, 2018 7:46:36 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:bos19' did not find a matching property.十月 01, 201

Error starting ApplicationContext. To display the conditions report re-run your application with &#39;debug&#39; enabled.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2018-11-02 17:15:00.028 ERROR 21400 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.context.Applicati

启动tomcat提示:Error starting static Resources

严重: Error starting static Resources java.lang.IllegalArgumentException: Document base E:\apache-tomcat-5.5.26\webapps\test does not exist or is not a readable directory ----------------------------------------------tomcat的server.xml中有<Context path=&quo

win7下安装matlab后打开出错&ldquo;error starting desktop&rdquo;的解决办法

在matlab快捷图标上右键,选择"还原以前的版本"--"兼容性"选项卡,在"以兼容模式运行这个程序"前面打勾,并选择"windows vista",在下面的"特权等级"中,勾选"以管理员身份运行此程序".OK,到这里就解决了.[注意]是用"windows vista"系列的兼容模式,不要用XP兼容模式!   参考自:http://zhidao.baidu.com/l

严重: Error starting static Resources java.lang.IllegalArgumentException:

严重: Error starting static Resources java.lang.IllegalArgumentException: Document base E:\myworkspace\evecomoa\WebRoot does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext... 解决办法: E:\my

Tomcat:Error starting static Resources

近来主要从事JavaWeb的开发,用的是myEclipse+Tomcat,在一次启动Tomcat的过程中,出现这个问题: Error starting static Resources java.lang.IllegalArgumentException: Document base D:\apache-tomcat-7.0.42\webapps\onlinelearning does not exist or is not a readable directory    at org.apac

Error starting daemon: SELinux is not support...

docker启动不支持selinux 查看状态报错[[email protected] ~]# systemctl status docker Jul 25 17:48:14 GZ-vm-game-A-228-225 systemd[1]: Starting Docker Application Container Engine...Jul 25 17:48:14 GZ-vm-game-A-228-225 dockerd-current[8197]: time="2018-07-25T17:48

Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {&quot;message&quot;:&quot;network build-blockchain-insurance-app_default not found&quot;}出错的解决方案

错误描述: docker logs web 现象: > [email protected] serve /app > cross-env NODE_ENV=production&&node ./bin/server /app/app/static/js Server running on port: 3000 Default channel not found, attempting creation... Successfully created a new default

Error starting daemon: SELinux is not supported

1月 05 16:45:39 tomcat8 systemd[1]: Starting Docker Application Container Engine... 1月 05 16:45:39 tomcat8 dockerd-current[34843]: time="2019-01-05T16:45:39.623363594+08:00" level=warning msg="could not change group /var/run/docker.sock ...o