Error parsing request header. Our best guess of the apiKey is: -1

Options

I am following the tutorial at

www.youtube.com/watch?v=AkQT_B1S1fQ

When I fire up the kafka console producer proxy to publish messages, I get the following error on the Kafka Producer Proxy Server:

[oracle@oracleeast19cOnOracleLinux7 tmp]$ /usr/lib/jvm/jdk-11.0.21/bin/java -jar kafkaproxy-1.0-SNAPSHOT-jar-with-dependencies.jar proxy-example.properties 

[main] INFO org.apache.kafka.solace.kafkaproxy.ProxyReactor - Listening for incoming connections on PLAINTEXT localhost/127.0.0.1:9092

[Kafka_Proxy_Reactor] INFO org.apache.kafka.solace.kafkaproxy.ProxyReactor - New incoming connection request on PLAINTEXT localhost/127.0.0.1:9092 from /127.0.0.1:58548

[Kafka_Proxy_Reactor] INFO org.apache.kafka.solace.kafkaproxy.ProxyChannel - Cleaning up channel (remote /127.0.0.1:58548) due to Request parse did not work: org.apache.kafka.common.errors.InvalidRequestException: Error parsing request header. Our best guess of the apiKey is: -1

I am not able to shake it off. I am firing the console producer using the command:

[oracle@oracleeast19cOnOracleLinux7 kafka_2.13-3.4.0]$ bin/kafka-console-producer.sh --broker-list localhost:9092 --producer.config kafka-console-producer.properties --topic test


Please advise

Answers

  • rkharidi
    rkharidi Member Posts: 3
    Options

    Ran it on a different box, getting similar error, but not same:

    [oracle@OracleGG kafkaproxy-1.0-SNAPSHOT]$ bin/kafkaproxy proxy-example.properties 

    [main] INFO org.apache.kafka.solace.kafkaproxy.ProxyReactor - Listening for incoming connections on PLAINTEXT localhost/127.0.0.1:9092

    [Kafka_Proxy_Reactor] INFO org.apache.kafka.solace.kafkaproxy.ProxyReactor - New incoming connection request on PLAINTEXT localhost/127.0.0.1:9092 from /127.0.0.1:57316

    [Kafka_Proxy_Reactor] INFO org.apache.kafka.solace.kafkaproxy.ProxyChannel - Cleaning up channel (remote /127.0.0.1:57316) due to Request parse did not work: org.apache.kafka.common.errors.InvalidRequestException: Invalid API key METADATA, expecting handshake request

  • rkharidi
    rkharidi Member Posts: 3
    Options

    Please ignore. I was using security.protocol=PLAINTEXT instead of security.protocol=SASL_PLAINTEXT and hence the issue.