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
- What does this mean?
- How can I fix it?
Marked As Solved
Popular in Questions
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
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
Hi,
I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
I have VueJS GUIs with the project generated using Webpack.
I have Elixir modules that will need to be used by the VueJS GUIs.
I forese...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Hi everyone,
I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Hi!
Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
Other popular topics
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
New
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help.
Where are they similar?
Where do they differ the m...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
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
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








