Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Communication with zookeeper with single common url instead multiple machine names and port

Communication with zookeeper with single common url instead multiple machine names and port

Contributor

I have solr insalled on  3 machines and I have written java class and trying to connect with solr through zookeeper. But Zookeeper library forced me to mention the machines names where zookeeper installed.But I need to keep a common url and which will be confirgured in DNS server and dns server resolve to machine name. But I dont How could I achieve this?

3 REPLIES 3

Re: Communication with zookeeper with single common url instead multiple machine names and port

Super Collaborator

Well if you are connecting Solr using ZK then it is expected that you supply the ZK quorum as the connection information.

 

I have not tried to provide a virtual IP instead of the quorum information. But it should work, be sure to configure your virtual IP for TCP traffic (and not for http only).

 

What is the purpose of having a common URL instead of the ZK quorum ? What do you want to achieve with that ?

 

By the way, are you using SolrJ ?

 

regards,

Mathieu

Re: Communication with zookeeper with single common url instead multiple machine names and port

Contributor

Thanks for your reply

 

Yes we are using Solrj.

 

We have DR cluster incase of PRO cluster down we need to move all calls to the DR cluster zookeeper.

 

For this we need to setup the virtual ip and this ip hits to the failover server where we will check the PRO is up or not. incase it is down then we need to redirect calls to the DR cluster.

 

We are planning to give DR cluster zookeeper quoram as well to the solr client. is this case what will happen on session id and zookeeper leader.

 

 

Re: Communication with zookeeper with single common url instead multiple machine names and port

Super Collaborator

Guess your DR cluster is running a completely separate ZK cluster.

I don't think SolrJ is designed for this (having two or more ZK quorum supplied). It will not handled it correctly I think.

 

We did have this similar kind of requirement (we also have a DR cluster or similar). In our case we choose to abandon the ZK connections and we are using the HttpClient alternative (also supported by SolrJ).