gheidorn
Kafka_Ex Connection Issue
I’m trying to get started with kafka_ex and can’t seem to even get it configured correctly. I am using the out of the box config with just the broker changed to localhost:2181 (testing locally). When I run my IEX session, I get this error:
22:49:31.422 [debug] Succesfully connected to broker "localhost":2181
22:49:31.442 [error] Receiving data from broker "localhost":2181 failed with :closed
22:49:31.442 [error] Unable to fetch metadata from any brokers. Timeout is 3000.
22:49:31.454 [info] Application kafka_ex exited: KafkaEx.start(:normal, []) returned an error: an exception was raised:
** (RuntimeError) Unable to fetch metadata from any brokers. Timeout is 3000.
(kafka_ex) lib/kafka_ex/server.ex:393: KafkaEx.Server0P9P0.retrieve_metadata/6
(kafka_ex) lib/kafka_ex/server_0_p_9_p_0.ex:62: KafkaEx.Server0P9P0.kafka_server_init/1
(stdlib) gen_server.erl:365: :gen_server.init_it/2
(stdlib) gen_server.erl:333: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
** (Mix) Could not start application kafka_ex: KafkaEx.start(:normal, []) returned an error: an exception was raised:
** (RuntimeError) Unable to fetch metadata from any brokers. Timeout is 3000.
(kafka_ex) lib/kafka_ex/server.ex:393: KafkaEx.Server0P9P0.retrieve_metadata/6
(kafka_ex) lib/kafka_ex/server_0_p_9_p_0.ex:62: KafkaEx.Server0P9P0.kafka_server_init/1
(stdlib) gen_server.erl:365: :gen_server.init_it/2
(stdlib) gen_server.erl:333: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Any ideas on what I might be doing wrong? Thanks in advance!
Marked As Solved
IanVaughan
Hi, silly question, but are you sure your broker is on 2181? As normally it binds to 9092.
The error is what I get when I’ve not started the kafka broker.
Also Liked
gheidorn
Not a silly question at all. I totally made this mistake! Thank you for your reply.
[debug] Succesfully connected to broker "localhost":9092
[debug] Establishing connection to broker 0: "172.24.162.59" on port 9092
[debug] Succesfully connected to broker "172.24.162.59":9092
1
Popular in Questions
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
I would like to know what is the best IDE for elixir development?
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
I am trying to implement my new.html.eex file to create new posts on my website.
new.html.eex:
<h1>Create Post</h1>
<%= ...
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 have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Other popular topics
Hi all,
I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
lets say i have a sample like
a = 20; b = 10;
if (a > b) do
{:ok, "a"}
end
if (a < b) do
{:ok, b}
end
if (a == b) do
{:ok, "equa...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
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
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
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








