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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

akshat
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
Reply | Threaded
Open this post in threaded view
|

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

Shawn Heisey-2
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

Reply | Threaded
Open this post in threaded view
|

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

Jan Høydahl / Cominvent
In reply to this post by akshat
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 <[hidden email]>:
>
> 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