You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by akshat <ak...@iiitmk.ac.in> on 2018/06/08 12:52:57 UTC

Can replace the IP with the hostname or some unique identifier for each node in Solr

Hi,

I have deployed Solr in docker swarm and scaling the replicas as 3.

What I have achieved -> Created the Solr core replicas in the other
containers.

Blocker -> When I kill a container
​, D
ocker swarm brings another container with a different IP. So, when I see
the graph it is still pointing to the older dead node. But in ZooKeeper
live_nodes, I can see the newly registered node.

So, For experimenting I am doing it manually through GUI by pointin
​g​
the new node
​by
manually delet
​ing​
the older node from the collections in Solr GUI and created a replica in
the new node.

My question -> Is it possible to some way we can trick the
​S​
olr by replacing the IP which it shows in the graph to some unique
identifier so that when swarm brings the new node it should still be
pointing to the unique identifier name, not the IP.

-- 
​Regards​
Akshat Singh

Re: Can replace the IP with the hostname or some unique identifier for each node in Solr

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/8/2018 6:52 AM, akshat wrote:
> My question -> Is it possible to some way we can trick the
> ​S​olr by replacing the IP which it shows in the graph to some unique
> identifier so that when swarm brings the new node it should still be
> pointing to the unique identifier name, not the IP.

Each Solr node registers itself in live_nodes when it starts.  If you do 
not provide specific information, it will detect its own IP address and 
use that.  All you have to do is provide specific host information.

https://lucene.apache.org/solr/guide/7_3/parameter-reference.html#solrcloud-instance-parameters

Thanks,
Shawn


Re: Can replace the IP with the hostname or some unique identifier for each node in Solr

Posted by Jan Høydahl <ja...@cominvent.com>.
See this FAQ
https://github.com/docker-solr/docker-solr/blob/master/Docker-FAQ.md#can-i-run-zookeeper-and-solr-clusters-under-docker

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 8. jun. 2018 kl. 14:52 skrev akshat <ak...@iiitmk.ac.in>:
> 
> Hi,
> 
> I have deployed Solr in docker swarm and scaling the replicas as 3.
> 
> What I have achieved -> Created the Solr core replicas in the other
> containers.
> 
> Blocker -> When I kill a container
> ​, D
> ocker swarm brings another container with a different IP. So, when I see
> the graph it is still pointing to the older dead node. But in ZooKeeper
> live_nodes, I can see the newly registered node.
> 
> So, For experimenting I am doing it manually through GUI by pointin
> ​g​
> the new node
> ​by
> manually delet
> ​ing​
> the older node from the collections in Solr GUI and created a replica in
> the new node.
> 
> My question -> Is it possible to some way we can trick the
> ​S​
> olr by replacing the IP which it shows in the graph to some unique
> identifier so that when swarm brings the new node it should still be
> pointing to the unique identifier name, not the IP.
> 
> -- 
> ​Regards​
> Akshat Singh