Fl4m3Ph03n1x

Fl4m3Ph03n1x

Issues configuring kafka_ex

Background

We are trying to connect to Kafka using kafka_ex but we are running into some issues with the setting up a basic example.

Configuration

I have read the configuration files, and all we need is a producer. Our application won’t consume anything, it will simply produce data to kafka.

So our config file looks like this:

config :kafka_ex,
  brokers: [
    {"localhost", 9092}
  ],
  kafka_version: "0.10.1"

Issue

The problem here is that upon running the app, it raises an exception:

12:50:55.791 [info]  Application kafka_ex exited: KafkaEx.start(:normal, []) returned an error: an exception was raised:
    ** (FunctionClauseError) no function clause matching in KafkaEx.Protocol.ApiVersions.parse_response/2
        (kafka_ex) lib/kafka_ex/protocol/api_versions.ex:62: KafkaEx.Protocol.ApiVersions.parse_response(nil, 0)
        (kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:178: KafkaEx.Server0P10AndLater.kafka_api_versions/1
        (kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:99: KafkaEx.Server0P10AndLater.kafka_server_init/1
        (stdlib) gen_server.erl:374: :gen_server.init_it/2
        (stdlib) gen_server.erl:342: :gen_server.init_it/6
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
** (Mix) Could not start application kafka_ex: KafkaEx.start(:normal, []) returned an error: an exception was raised:
    ** (FunctionClauseError) no function clause matching in KafkaEx.Protocol.ApiVersions.parse_response/2
        (kafka_ex) lib/kafka_ex/protocol/api_versions.ex:62: KafkaEx.Protocol.ApiVersions.parse_response(nil, 0)
        (kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:178: KafkaEx.Server0P10AndLater.kafka_api_versions/1
        (kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:99: KafkaEx.Server0P10AndLater.kafka_server_init/1
        (stdlib) gen_server.erl:374: :gen_server.init_it/2
        (stdlib) gen_server.erl:342: :gen_server.init_it/6
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Questions

  1. What does this mean?
  2. How can I fix it?

Marked As Solved

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement