kafka.common.KafkaException: Wrong request type 18
I am running this piece of code. The streamingInputDF is a readStream on a Kafka topic. I am running spark 2.4.0 and Kafka 0.10.2
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
I see this exception thrown by the Kafka broker as soon as the writeStream is invoked on streamingInputDF
[2018-11-24 21:46:42,842] ERROR Closing socket for /127.0.0.1 because of error (kafka.network.Processor)
kafka.common.KafkaException: Wrong request type 18
at kafka.api.RequestKeys$.deserializerForKey(RequestKeys.scala:64)
at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:50)
at kafka.network.Processor.read(SocketServer.scala:450)
at kafka.network.Processor.run(SocketServer.scala:340)
at java.lang.Thread.run(Thread.java:745)
apache-spark apache-kafka spark-streaming
add a comment |
I am running this piece of code. The streamingInputDF is a readStream on a Kafka topic. I am running spark 2.4.0 and Kafka 0.10.2
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
I see this exception thrown by the Kafka broker as soon as the writeStream is invoked on streamingInputDF
[2018-11-24 21:46:42,842] ERROR Closing socket for /127.0.0.1 because of error (kafka.network.Processor)
kafka.common.KafkaException: Wrong request type 18
at kafka.api.RequestKeys$.deserializerForKey(RequestKeys.scala:64)
at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:50)
at kafka.network.Processor.read(SocketServer.scala:450)
at kafka.network.Processor.run(SocketServer.scala:340)
at java.lang.Thread.run(Thread.java:745)
apache-spark apache-kafka spark-streaming
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
If you use--packages
, you don't need to duplicate that over to--jars
, by the way, and yourspark-streaming-twitter
should probably be using version 2.4.0, if it exists
– cricket_007
Nov 25 '18 at 21:16
add a comment |
I am running this piece of code. The streamingInputDF is a readStream on a Kafka topic. I am running spark 2.4.0 and Kafka 0.10.2
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
I see this exception thrown by the Kafka broker as soon as the writeStream is invoked on streamingInputDF
[2018-11-24 21:46:42,842] ERROR Closing socket for /127.0.0.1 because of error (kafka.network.Processor)
kafka.common.KafkaException: Wrong request type 18
at kafka.api.RequestKeys$.deserializerForKey(RequestKeys.scala:64)
at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:50)
at kafka.network.Processor.read(SocketServer.scala:450)
at kafka.network.Processor.run(SocketServer.scala:340)
at java.lang.Thread.run(Thread.java:745)
apache-spark apache-kafka spark-streaming
I am running this piece of code. The streamingInputDF is a readStream on a Kafka topic. I am running spark 2.4.0 and Kafka 0.10.2
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
I see this exception thrown by the Kafka broker as soon as the writeStream is invoked on streamingInputDF
[2018-11-24 21:46:42,842] ERROR Closing socket for /127.0.0.1 because of error (kafka.network.Processor)
kafka.common.KafkaException: Wrong request type 18
at kafka.api.RequestKeys$.deserializerForKey(RequestKeys.scala:64)
at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:50)
at kafka.network.Processor.read(SocketServer.scala:450)
at kafka.network.Processor.run(SocketServer.scala:340)
at java.lang.Thread.run(Thread.java:745)
apache-spark apache-kafka spark-streaming
apache-spark apache-kafka spark-streaming
edited Nov 25 '18 at 20:41
danoomistmatiste
asked Nov 25 '18 at 5:53
danoomistmatistedanoomistmatiste
214
214
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
If you use--packages
, you don't need to duplicate that over to--jars
, by the way, and yourspark-streaming-twitter
should probably be using version 2.4.0, if it exists
– cricket_007
Nov 25 '18 at 21:16
add a comment |
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
If you use--packages
, you don't need to duplicate that over to--jars
, by the way, and yourspark-streaming-twitter
should probably be using version 2.4.0, if it exists
– cricket_007
Nov 25 '18 at 21:16
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
If you use
--packages
, you don't need to duplicate that over to --jars
, by the way, and your spark-streaming-twitter
should probably be using version 2.4.0, if it exists– cricket_007
Nov 25 '18 at 21:16
If you use
--packages
, you don't need to duplicate that over to --jars
, by the way, and your spark-streaming-twitter
should probably be using version 2.4.0, if it exists– cricket_007
Nov 25 '18 at 21:16
add a comment |
1 Answer
1
active
oldest
votes
This issue is resolved. I am now able to see the tweets in the spark shell as they flow into the Kafka topic. All I did was restart the Kafka broker and nothing else changed.
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465029%2fkafka-common-kafkaexception-wrong-request-type-18%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This issue is resolved. I am now able to see the tweets in the spark shell as they flow into the Kafka topic. All I did was restart the Kafka broker and nothing else changed.
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
add a comment |
This issue is resolved. I am now able to see the tweets in the spark shell as they flow into the Kafka topic. All I did was restart the Kafka broker and nothing else changed.
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
add a comment |
This issue is resolved. I am now able to see the tweets in the spark shell as they flow into the Kafka topic. All I did was restart the Kafka broker and nothing else changed.
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
This issue is resolved. I am now able to see the tweets in the spark shell as they flow into the Kafka topic. All I did was restart the Kafka broker and nothing else changed.
val activityQuery = streamingInputDF.writeStream
.format("console")
.outputMode("append")
.start()
.awaitTermination()
answered Nov 25 '18 at 20:39
danoomistmatistedanoomistmatiste
214
214
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465029%2fkafka-common-kafkaexception-wrong-request-type-18%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please include the Kafka libraries you're using
– cricket_007
Nov 25 '18 at 16:29
This is my cmdline ./spark-shell --driver-class-path ~/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 --jars /Users/hadoop/kafka_2.11-0.10.2.2/libs/kafka-clients-0.10.2.2.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10/target/spark-streaming-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/spark-2.4.0/external/kafka-0-10-sql/target/spark-sql-kafka-0-10_2.11-2.4.0.jar,/Users/hadoop/dev/twitter/lib/twitter4j-core-4.0.3.jar,/Users/hadoop/spark-streaming-twitter_2.11-2.2.2.jar,/Users/hadoop/twitter4j-stream-4.0.6.jar
– danoomistmatiste
Nov 25 '18 at 20:27
If you use
--packages
, you don't need to duplicate that over to--jars
, by the way, and yourspark-streaming-twitter
should probably be using version 2.4.0, if it exists– cricket_007
Nov 25 '18 at 21:16