You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Piyush <pi...@istream.com> on 2013/04/17 10:04:09 UTC

Solr on AWS EC2 machine

I'm facing problem with the setup of SolrCloud on AWS EC2 machine.
The scenario is follows,

I have three servers for zookeeper and solr.

Each server has zookeeper running on it.
When I start Solr with zookeeper hosts information, it start and works as
expected.

The problem is that the zookeeper when generating the cluster information
uses private ip of the servers and thus I cannot query it using the Solrj
which cannot recognize the private IP.
For e.g
server1. private IP ip-a,b,c,d
public IP : u,v,w,x
The zookeeper recognizes the solr instance by the private IP (Obviously
which won't be visible from the outside EC2 machines)

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 nodes IP is the private IP  and not the public one

Is there any way in which we can zookeeper to store cluster information as
the host name rather than ip. If that cannot be done how can I running solr
Cloud on AWS EC2 machine?



Thanks and regards,
Piyush

Re: Solr on AWS EC2 machine

Posted by Mark Miller <ma...@gmail.com>.
We guess the host address to use by default - if you want or need to use a different host, just override it per node in solr.xml (or by sys prop substitution with solr.xml) - simply set the host attribute on the <solr> node to the desired  host name.

- Mark

On Apr 17, 2013, at 4:04 AM, Piyush <pi...@istream.com> wrote:

> I'm facing problem with the setup of SolrCloud on AWS EC2 machine. 
> The scenario is follows,
> 
> I have three servers for zookeeper and solr.
> 
> Each server has zookeeper running on it.
> When I start Solr with zookeeper hosts information, it start and works as expected. 
> 
> The problem is that the zookeeper when generating the cluster information uses private ip of the servers and thus I cannot query it using the Solrj which cannot recognize the private IP.
> For e.g
> server1. private IP ip-a,b,c,d
> public IP : u,v,w,x
> The zookeeper recognizes the solr instance by the private IP (Obviously which won't be visible from the outside EC2 machines)
> 
> 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 nodes IP is the private IP  and not the public one
> 
> Is there any way in which we can zookeeper to store cluster information as the host name rather than ip. If that cannot be done how can I running solr Cloud on AWS EC2 machine?
> 
> 
> 
> Thanks and regards,
> Piyush


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Solr on AWS EC2 machine

Posted by Bill Au <bi...@gmail.com>.
So you are not using elastic IP.  Take a look at this which is available in
4.2:

https://issues.apache.org/jira/browse/SOLR-4078


On Wed, Apr 17, 2013 at 4:04 AM, Piyush <pi...@istream.com> wrote:

> I'm facing problem with the setup of SolrCloud on AWS EC2 machine.
> The scenario is follows,
>
> I have three servers for zookeeper and solr.
>
> Each server has zookeeper running on it.
> When I start Solr with zookeeper hosts information, it start and works as
> expected.
>
> The problem is that the zookeeper when generating the cluster information
> uses private ip of the servers and thus I cannot query it using the Solrj
> which cannot recognize the private IP.
> For e.g
> server1. private IP ip-a,b,c,d
> public IP : u,v,w,x
> The zookeeper recognizes the solr instance by the private IP (Obviously
> which won't be visible from the outside EC2 machines)
>
> 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 nodes IP is the private IP  and not the public one
>
> Is there any way in which we can zookeeper to store cluster information as
> the host name rather than ip. If that cannot be done how can I running solr
> Cloud on AWS EC2 machine?
>
>
>
> Thanks and regards,
> Piyush
>