Solrcloud Configuration on AWS EC2

I encountered a problem installing SolrCloud on an AWS EC2 machine. Below is the script,

I have three servers for zookeeper and solr.

Each server runs zookeeper. When I start Solr with the zookeeper host information, it starts and works as expected.

The problem is that zookeeper uses private ip servers when creating cluster information, and therefore I cannot request it using Solrj, which cannot recognize private IP. For example, for example server1. private IP ip-a, b, c, d public IP: u, v, w, x Zookeeper recognizes a solr instance using a private IP (obviously, it will not be visible from external EC2 computers)

The cluster information looks something like this: live nodes:[10.165.15.104:8983_solr] collections:{vicon=DocCollection(vicon)={ "shards":{"shard1":{ "range":"80000000-7fffffff", "state":"active", "replicas":{"10.165.15.104:8983_solr_vicon":{ "shard":"shard1", "state":"down", "core":"vicon", "collection":"vicon", "node_name":"10.165.15.104:8983_solr", "base_url":"http://10.165.15.104:8983/solr", "leader":"true"}}}}, "router":"compositeId"}, collection1=DocCollection(collection1)={ "shards":{"shard1":{ "range":"80000000-7fffffff", "state":"active", "replicas":{"10.165.15.104:8983_solr_collection1":{ "shard":"shard1", "state":"down", "core":"collection1", "collection":"collection1", "node_name":"10.165.15.104:8983_solr", "base_url":"http://10.165.15.104:8983/solr", "leader":"true"}}}}, "router":"compositeId"}, collections=DocCollection(collections)={ "shards":{"shard1":{ "range":"80000000-7fffffff", "state":"active", "replicas":{ "10.165.15.104:8983_solr_collections":{ "shard":"shard1", "state":"active", "core":"collections", "collection":"collections", "node_name":"10.165.15.104:8983_solr", "base_url":"http://10.165.15.104:8983/solr", "leader":"true"}, "10.147.129.56:8983_solr_collections":{ "shard":"shard1", "state":"down", "core":"collections", "collection":"collections", "node_name":"10.147.129.56:8983_solr", "base_url":"http://10.147.129.56:8983/solr"}}}}, "router":"compositeId"}} 

Live IP nodes are a private IP address, not a public one.

Is there a way in which we can zookeeper store cluster information as a host name, not ip. If this is not possible, then how can I run solr Cloud on AWS EC2?

+4
source share
1 answer

I have decided the solution. We can run the solr server with the host name that zookeeper will use

Just give -Dhost = xycom when starting the solr instance and it will work fine

+6
source

All Articles