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

Provider not working since version 0.6 #383

Open
Aransh opened this issue Feb 13, 2024 · 21 comments
Open

Provider not working since version 0.6 #383

Aransh opened this issue Feb 13, 2024 · 21 comments

Comments

@Aransh
Copy link

Aransh commented Feb 13, 2024

Been using this provider for a while now, since version 0.6 was released I am unable to use it..

I am getting this error when trying to manage "kafka_topic" resources:

│ Error: kafka: client has run out of available brokers to talk to: 3 errors occurred:
│ * EOF
│ * EOF
│ * EOF


│ with module.eclector.kafka_topic.main["eclector-waf-triggers-dlr-5"],
│ on .terraform/modules/eclector/kafka_topics/main.tf line 26, in resource "kafka_topic" "main":
│ 26: resource "kafka_topic" "main" {

Reverting the version 0.5.4 (with no other configuration changes) works right away.
Any directions would be greatly appreciated

@Mongey
Copy link
Owner

Mongey commented Feb 20, 2024

@Aransh what Kafka version are you using?

@Aransh
Copy link
Author

Aransh commented Feb 21, 2024

I'm actually using RedPanda (a Kafka-compatible broker), was probably relevant to mention 😅.
I tried asking their team if there's any solid answer to your question (as in, is there some internal kafka version used), this is their response:

I would just say you’re using Redpanda 🙂
Looking at the change log, this could either be something to do with Sarama v1.40.1 versus v1.42.1, or the Net.Proxy changes they’ve added.
v0.5.4...v0.6.0

@arkadiusjonczek
Copy link

Hi @Aransh , I have the same problem. Can you please share your solution if you found something?

@Aransh
Copy link
Author

Aransh commented Feb 26, 2024

@arkadiusjonczek no solution yet except using the old provider version.
Waiting to see if @Mongey has any possible solution

@yermulnik
Copy link

We're hitting the same issue with AWS Managed Kafka (MSK). Different versions of MSK. I'll ask my colleague to provided details.

@srikanth520
Copy link

@Mongey After upgrading to 0.6.0 version Getting this error

12:57:20 Error: kafka: client has run out of available brokers to talk to: 3 errors occurred:
12:57:20 * EOF
12:57:20 * EOF
12:57:20 * EOF
12:57:20
12:57:20
12:57:20 with kafka_topic.topics["devopstest.topic.empty2.config"],
12:57:20 on main.tf line 1, in resource "kafka_topic" "topics":
12:57:20 1: resource "kafka_topic" "topics" {

TLS Brokers
AWS MSK Kafka version - 2.2.1
Terraform version: 1.5.7

Note: Same code is working for 0.5.4 version

@yermulnik
Copy link

@Mongey @errm Is this being worked on please?

Also, as it was already suggested, documentation update would be great improvement.

Thank you.

@srikanth520
Copy link

@Mongey @errm After upgrading provider version to 0.7.0 also. Still getting the error for TLS communication brokers which was occured for 0.6.0 version also.

with 0.5.4 version able to create to topics.

Error: kafka: client has run out of available brokers to talk to: 3 errors occurred:

@EliranTurgeman
Copy link

Same issue here.
Someone knows what can be done??

@EliranTurgeman
Copy link

Hi Team, Any update?

@Mongey
Copy link
Owner

Mongey commented May 30, 2024

@EliranTurgeman / @srikanth520 / @yermulnik / @Aransh Can you please provide examples of your configuration, along with details of the Kafka service, and versions you're using.

@yermulnik
Copy link

@Mongey Please see #383 (comment)@srikanth520 and I are on the same team.
Please let us know what additional details you'd like us to provide.

@Mongey
Copy link
Owner

Mongey commented May 30, 2024

@yermulnik There is no terraform config provided.

@yermulnik
Copy link

yermulnik commented May 30, 2024

Ouch, I just double checked and couldn't reproduce the issue (currently we're at v0.7.1 of Kafka provider). As in I was able to connect to both Anon TLS and AWS-IAM clusters w/o issues.
Even tried downgrading to v0.6.0 and still have no issues with Anon TLS cluster 🤔

I'll talk to @srikanth520 to see whether I might be missing something from his setup. Will keep you posted.

UPD: I re-read through the history of our internal ticket and it looks like the issue was with MSK cluster of 2.2.1 version, while there were no issues with clusters with version 3.5.1. Recently we finished off upgrading all of our MSK clusters to 3.5.1, so we're not anymore able to confirm the issue 🤷🏻

@Aransh
Copy link
Author

Aransh commented Jun 2, 2024

@Mongey I can try and help with that.
As I mentioned here - #383 (comment), we are using redpanda (which works with this provider up to version 0.5.4).

Relevant terraform files are pretty standard:
provider:

provider "kafka" {
  bootstrap_servers = ["<broker-1>:31092,<broker-2>:31092,<broker-3>:31092"]
  sasl_mechanism    = "scram-sha512"
  sasl_username     = <username>
  sasl_password     = <password>
}

example topic:

  resource "kafka_topic" "main" {
      config  = {
          "cleanup.policy"    = "delete"
          "max.message.bytes" = "2097164"
          "retention.ms"      = "86400000"
          "segment.ms"        = "82800000"
      }
      name               = "<topic-name>"
      partitions         = 6
      replication_factor = 3
  }

And on apply, after approving the plan:

kafka_topic.main["<topic-name>"]: Creating...
kafka_topic.main["<topic-name>"]: Still creating... [10s elapsed]
╷
│ Error: kafka: client has run out of available brokers to talk to: 3 errors occurred:
│ 	* EOF
│ 	* EOF
│ 	* EOF

@Mongey
Copy link
Owner

Mongey commented Jun 6, 2024

@Aransh I have just tried with red panda serverless and cannot reproduce.

@Aransh
Copy link
Author

Aransh commented Jun 6, 2024

@Mongey Hmmm... that's odd, we've had this issue reproduced by 3 of our teams in several different redpanda deployments...
We are using self-hosted redpanda, does serverless tell you the redpanda version? (our main environment uses v24.1.1)

@tommyminds
Copy link

I'm having the same issue with my self-hosted redpanda broker. In the redpanda logs I see the following error:

kafka - connection_context.cc:362 - Error while processing request from 10.244.0.84:55402 - Unsupported version 9 for metadata API.

Maybe that is related?

@Mongey
Copy link
Owner

Mongey commented Jun 12, 2024

I'm having the same issue with my self-hosted redpanda broker. In the redpanda logs I see the following error:

kafka - connection_context.cc:362 - Error while processing request from 10.244.0.84:55402 - Unsupported version 9 for metadata API.

Maybe that is related?

Maybe try setting kafka_version in the provider config to something lower than the default (2.7.0)

@Aransh
Copy link
Author

Aransh commented Jun 13, 2024

Maybe try setting kafka_version in the provider config to something lower than the default (2.7.0)

Already tried that, no dice...

@voutilad
Copy link

kafka_version = "2.1.0" works for me with Redpanda 24.1.

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

8 participants