gheidorn

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

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

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

Where Next?

Popular in Questions Top

openscript
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
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
aalberti333
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
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
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
rms.mrcs
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
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
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
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

We're in Beta

About us Mission Statement