Skip to content
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

GroupCoordinator: Connect to ipv4#127.0.0.1:9092 failed #828

Closed
tttrrryyyyeer opened this issue Mar 18, 2019 · 2 comments
Closed

GroupCoordinator: Connect to ipv4#127.0.0.1:9092 failed #828

tttrrryyyyeer opened this issue Mar 18, 2019 · 2 comments

Comments

@tttrrryyyyeer
Copy link

tttrrryyyyeer commented Mar 18, 2019

Client OS: Windows 10 version 1803 (OS Build 17134.590)
Kafka client: Confluetn.Kafka 1.0.0-beta3-ci-880
Framework: .Net Core 2.2
Docker image: openSdk
Host OS: Oracle Linux
Kafka version: 2.1.1

           `var consumerConfig = new ConsumerConfig
            {
                GroupId = "custom-group",
                BootstrapServers = _bootstrapServers,
                AutoOffsetReset = AutoOffsetReset.Earliest,
                BrokerAddressFamily = BrokerAddressFamily.V4
            };

            using (var consumer = new ConsumerBuilder<long, T>(consumerConfig)
                                      .SetValueDeserializer(new CustomDeserializer<T>())
                                      .SetErrorHandler((key, item) => Console.WriteLine("Consumer error: " + item.Reason))
                                      .Build())
            {
                consumer.Subscribe(topic);

                while (!cancellationToken.IsCancellationRequested)
                {
                    var consumeResult = consumer.Consume(cancellationToken);
                    action?.Invoke(consumeResult.Value);
                }
            }`

_bootstrapServers = XXX.XXX.XXX.XXX:9092

Telnet on server and port connect success.

On subscribe I get next error:

Consumer error: GroupCoordinator: Connect to ipv4#127.0.0.1:9092 failed: No connection could be made because the target machine actively refused it... (after 1010ms in state CONNECT)

But my bootstrapServers are different from localhost.

What could be my mistake?

@edenhill
Copy link
Contributor

The broker is advertising itself as localhost. See the broker's advertised.listeners configuration property.

@tttrrryyyyeer
Copy link
Author

@edenhill Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants