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

nats: cannot connect to ipv6 host #12374

Closed
jszwedko opened this issue Apr 22, 2022 Discussed in #12373 · 6 comments
Closed

nats: cannot connect to ipv6 host #12374

jszwedko opened this issue Apr 22, 2022 Discussed in #12373 · 6 comments
Labels
sink: nats Anything `nats` sink related source: nats Anything `nats` source related type: bug A code related bug.

Comments

@jszwedko
Copy link
Member

Discussed in #12373

Originally posted by jbergstroem April 22, 2022
Hello, after the auth fixes in 0.21.1 I'm attempting to connect to a ipv6 host, but vector doesn't seem to like my config. Something like:

[sources.my_nats]
  type = "nats"
  url = "nats://[::1]:4222"
  connection_name = "logs"

Gives:

2022-04-22T18:56:08.769003Z  INFO vector::app: Log level is enabled. level="vector=info,codec=info,vrl=info,file_source=info,tower_limit=trace,rdkafka=info,buffers=info,kube=info"
2022-04-22T18:56:08.769115Z  INFO vector::app: Loading configs. paths=["/etc/vector/vector.toml"]
2022-04-22T18:54:44.030456Z ERROR vector::topology: Configuration error. error=Source "my_nats": NATS Connect Error: failed to lookup address information: Name does not resolve

I've tried variations of the host but are running out of options. Any input much appreciated!

@jszwedko jszwedko added type: bug A code related bug. sink: nats Anything `nats` sink related source: nats Anything `nats` source related labels Apr 22, 2022
@jszwedko
Copy link
Member Author

Blocked by nats-io/nats.rs#322 fixed by nats-io/nats.rs#386.

@jszwedko
Copy link
Member Author

cc/ @jbergstroem

@jszwedko
Copy link
Member Author

@jbergstroem I think using a domain name that resolves to an IPv6 address would work, if that is a feasible workaround.

@jbergstroem
Copy link
Contributor

jbergstroem commented Apr 22, 2022

I think using a domain name that resolves to an IPv6 address would work, if that is a feasible workaround.

I'm unfortunately not in control of dns resolution. Can hack around /etc/hosts by mounting it via Docker I guess. Thanks for providing solutions and fixing the bug upstream!

@wjordan
Copy link
Contributor

wjordan commented Jul 26, 2022

For anyone following along, a nats.rs version bump (#13494) landed in Vector a couple weeks ago so this should be fixed in the next release. I can confirm it already works in the nightly Docker-image builds.

@jszwedko
Copy link
Member Author

Thanks for verifying @wjordan !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: nats Anything `nats` sink related source: nats Anything `nats` source related type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

3 participants