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

Connecting to Kafka triggers DEP0123 #1354

Closed
milibopp opened this issue May 12, 2022 · 4 comments
Closed

Connecting to Kafka triggers DEP0123 #1354

milibopp opened this issue May 12, 2022 · 4 comments

Comments

@milibopp
Copy link

Describe the bug
When using a broker identified by a domain name, its IP addresses seems to be used for domain resolution rather than its IP. The domain name appears to resolve to multiple IP addresses. (I'm guessing those are the different Kafka instances of the cluster.)

To Reproduce
Connect to a Kafka cluster identified by a domain name that refers to multiple IP addresses. (In my case a Kafka cluster hosted by Aiven triggered the issue.)

Expected behavior
No warnings.

Observed behavior

(node:40285) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.

Environment:

  • OS: NixOS 21.11
  • KafkaJS version 1.16.0
  • Kafka version 3.1
  • NodeJS version 16.14.2
@Nevon
Copy link
Collaborator

Nevon commented Jul 25, 2022

Can you reproduce this with 2.2.0-beta.2? #1425 made it so that we don't set the servername by default if the host is an IP address rather than a hostname.

My guess, without having any access to aiven, is that the issue is not with the first broker(s) that you add to the config, but rather the subsequent brokers that are discovered. I'm guessing that the domain just resolves to one of the brokers, and the TLS ServerName will be the domain you provided, but that broker then returns a list of IPs rather than domain names, so subsequent connections use the IP as ServerName, triggering this warning.

@milibopp
Copy link
Author

Unfortunately, I am unable to reproduce it today – neither on the 2.2.0-beta.2 nor on 1.16.0. It is possible that something about the infrastructure changed in the meantime.

@milibopp
Copy link
Author

Ah, yes, I checked application logs: the warning appeared upon daily server restart on July 20th for the last time. No version upgrade of KafkaJS was involved, so I would guess something about DNS or another aspect of the cluster infrastructure must have changed on Aiven's side at that point, so that our setup no longer reproduces this issue.

@Nevon
Copy link
Collaborator

Nevon commented Jul 26, 2022

Alright, then I will close this, as this should have been fixed by #1425 regardless.

@Nevon Nevon closed this as completed Jul 26, 2022
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