-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect to a broker on another machine (LAN, no Docker/Cloud) #1166
Comments
Update: The error was reproduced on two pairs of machines and with two different brokers: Apache Kafka Broker and Landoop fast-dev |
this may be relevant: https://rmoff.net/2018/08/02/kafka-listeners-explained/ |
Seems like your messages are too large.
What types of data are you sending? Maybe relevant (though highly discouraged) - https://stackoverflow.com/questions/21020347/how-can-i-send-large-messages-with-kafka-over-15mb?rq=1 |
Thank you for your comments, I read through @mhowlett's link, gained some knowledge on how to set Kafka up, but unfortunately it didn't help me much, because I already had the setup that seemed logically correct. I had this lines in my server.properties:
But in the article they used console-producer to test stuff out, so I did try that too, and received different error Running this command Where Arun Y said that you should enter your Host IP in advertised listener, but leave listener empty, so this lines have fixed problem for me (I don't understand why, because the host can reach itself using both localhost and external IP [192.168.1.75])
@Cricket007 the data I was sending is just "test" message, this error messages about size are definitely wrong. |
Seems to be related |
Few month i was developing the Kafka application with broker and client on the same machine. Then I gave it to QA and he said that it is not consuming or producing. I tested it out my application with another machine and it didn't work too. Then I tried to test it without my application and without docker just using Confluent (1.0.0) inside console application and Apache Kafka broker (kafka_2.12-2.2.0) on Windows and it failed...
When I try to produce message on client I receive
"No connection could be made because the target machine actively refused it"
And the log file on broker
However I can fetch metadata successfully
adminClient.GetMetadata(TimeSpan.FromSeconds(10));
producerConfig
server.properties
IP of the broker machine is 192.168.1.75
IP of the client machine is 192.168.1.26
I tried to change advertised.listeners to advertised.listeners=PLAINTEXT:https://192.168.1.75:9092,SASL_SSL:https://127.0.0.1:9093
and now I receive
and producer no longer throw with "No connection could be made because the target machine actively refused it", but is stuck in loop
What am I doing wrong? Why does everything work fine when client and broker are on localhost? Why is metadata fetched without errors, but producing and consuming doesn't connect?
Please help
[ 1.0.0 ] Confluent.Kafka nuget version.
The text was updated successfully, but these errors were encountered: