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

Cannot resolve hostname #19

Open
ketigid opened this issue Jun 11, 2019 · 1 comment
Open

Cannot resolve hostname #19

ketigid opened this issue Jun 11, 2019 · 1 comment

Comments

@ketigid
Copy link

ketigid commented Jun 11, 2019

Hi,

cassandra is the hostname of one of my cassandra nodes.

When I run cassandra-web --hosts cassandra, I get this error IPAddr::InvalidAddressError: invalid address: cassandra. Using the actual IP address works.

ping cassandra works fine.

Just to check, does cassandra-web only work with IP addresses and not hostnames?

@saintube
Copy link

saintube commented Aug 28, 2019

@ketigid
I think it was caused by the code below (bin/cassandra-web, line 74)

options[:load_balancing_policy] = ::Cassandra::LoadBalancing::Policies::WhiteList.new(hosts, ::Cassandra::LoadBalancing::Policies::RoundRobin.new)

WhiteList.new() would regard hosts as an IPAddr by default, so u got an error.
BTW, DataStax Ruby driver supports DNS resolution by using resolv lib.

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