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 ade-b <ad...@gmail.com> on 2013/11/11 14:47:38 UTC

Adding a server to an existing SOLR cloud cluster

Hi 

We have a SOLRCloud cluster of 3 solr servers (v4.5.0 running under tomcat)
with 1 shard. We added a new SOLR server (v4.5.1) by simply starting tomcat
and pointing it at the zookeeper ensemble used by the existing cluster. My
understanding was that this new server would handshake with zookeeper and
add itself as a replica to the existing cluster.

What has actually happened is that the server is in zookeeper's live_nodes,
but is not in the clusterstate.json file. It also does not have a
CORE/collection associated with it.

Any ideas? I assume I am missing a step. Do I have to manually create the
core on the new server?


Cheers
Ade



--
View this message in context: http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Adding a server to an existing SOLR cloud cluster

Posted by Gopal Patwa <go...@gmail.com>.
Did you try adding core.properties file in your core folder with below
content and change the value for name and collection property

ex: core1/core.properties content:

numShards=1
name=core1
shard=shard1
collection=collection1


On Mon, Nov 11, 2013 at 8:14 AM, michael.boom <my...@yahoo.com> wrote:

> From my understanding, if your already existing cluster satisfies your
> collection (already live nodes >= nr shards * replication factor) there
> wouldn't be any need for creating additional replicas on the new server,
> unless you directly ask for them, after startup.
> I usually just add the machine to the cluster and the manually create the
> replicas I need.
>
>
>
> -----
> Thanks,
> Michael
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275p4100313.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Adding a server to an existing SOLR cloud cluster

Posted by "michael.boom" <my...@yahoo.com>.
>From my understanding, if your already existing cluster satisfies your
collection (already live nodes >= nr shards * replication factor) there
wouldn't be any need for creating additional replicas on the new server,
unless you directly ask for them, after startup.
I usually just add the machine to the cluster and the manually create the
replicas I need.



-----
Thanks,
Michael
--
View this message in context: http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275p4100313.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Adding a server to an existing SOLR cloud cluster

Posted by pr...@policija.si.
According to the wiki pages it should, but I have not really tried it yet 
- I like to make the "bookeeping" myself :)

I am sorry but someones with more knowledge of Solr will have to answer 
your question.

Primoz



From:   ade-b <ad...@gmail.com>
To:     solr-user@lucene.apache.org
Date:   11.11.2013 15:44
Subject:        Re: Adding a server to an existing SOLR cloud cluster



Thanks.

If I understand what you are saying, it should automatically register 
itself
with the existing cluster if we start SOLR with the correct command line
options. We tried adding the numShards option to the command line but 
still
get the same outcome.

We start the new SOLR server using 

/usr/bin/java
-Djava.util.logging.config.file=/mnt/ephemeral/apache-tomcat-7.0.47/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server
-Xms256m -Xmx1024m -XX:+DisableExplicitGC
-Dsolr.solr.home=/mnt/ephemeral/solr -Dport=8080 -DhostContext=solr
-DnumShards=1 -DzkClientTimeout=15000 -DzkHost=<zk ip address>
-Djava.endorsed.dirs=/mnt/ephemeral/apache-tomcat-7.0.47/endorsed 
-classpath
/mnt/ephemeral/apache-tomcat-7.0.47/bin/bootstrap.jar:/mnt/ephemeral/apache-tomcat-7.0.47/bin/tomcat-juli.jar
-Dcatalina.base=/mnt/ephemeral/apache-tomcat-7.0.47
-Dcatalina.home=/mnt/ephemeral/apache-tomcat-7.0.47
-Djava.io.tmpdir=/mnt/ephemeral/apache-tomcat-7.0.47/temp
org.apache.catalina.startup.Bootstrap start

Regards
Ade



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275p4100286.html

Sent from the Solr - User mailing list archive at Nabble.com.


Re: Adding a server to an existing SOLR cloud cluster

Posted by ade-b <ad...@gmail.com>.
Thanks.

If I understand what you are saying, it should automatically register itself
with the existing cluster if we start SOLR with the correct command line
options. We tried adding the numShards option to the command line but still
get the same outcome.

We start the new SOLR server using 

/usr/bin/java
-Djava.util.logging.config.file=/mnt/ephemeral/apache-tomcat-7.0.47/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server
-Xms256m -Xmx1024m -XX:+DisableExplicitGC
-Dsolr.solr.home=/mnt/ephemeral/solr -Dport=8080 -DhostContext=solr
-DnumShards=1 -DzkClientTimeout=15000 -DzkHost=<zk ip address>
-Djava.endorsed.dirs=/mnt/ephemeral/apache-tomcat-7.0.47/endorsed -classpath
/mnt/ephemeral/apache-tomcat-7.0.47/bin/bootstrap.jar:/mnt/ephemeral/apache-tomcat-7.0.47/bin/tomcat-juli.jar
-Dcatalina.base=/mnt/ephemeral/apache-tomcat-7.0.47
-Dcatalina.home=/mnt/ephemeral/apache-tomcat-7.0.47
-Djava.io.tmpdir=/mnt/ephemeral/apache-tomcat-7.0.47/temp
org.apache.catalina.startup.Bootstrap start

Regards
Ade



--
View this message in context: http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275p4100286.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Adding a server to an existing SOLR cloud cluster

Posted by pr...@policija.si.
Try manually creating shard replicas on the new server. I think the new 
server is only used automatically when you start you Solr server instance 
with "correct command line" option (aka. -DnumShards)  - I never liked 
this kind of behaviour. 

The server is not present in clusterstate.json file, because it contains 
no replicas - but it is a live node, as you have already stated.

Best regards,

Primoz



From:   ade-b <ad...@gmail.com>
To:     solr-user@lucene.apache.org
Date:   11.11.2013 14:48
Subject:        Adding a server to an existing SOLR cloud cluster



Hi 

We have a SOLRCloud cluster of 3 solr servers (v4.5.0 running under 
tomcat)
with 1 shard. We added a new SOLR server (v4.5.1) by simply starting 
tomcat
and pointing it at the zookeeper ensemble used by the existing cluster. My
understanding was that this new server would handshake with zookeeper and
add itself as a replica to the existing cluster.

What has actually happened is that the server is in zookeeper's 
live_nodes,
but is not in the clusterstate.json file. It also does not have a
CORE/collection associated with it.

Any ideas? I assume I am missing a step. Do I have to manually create the
core on the new server?


Cheers
Ade



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-a-server-to-an-existing-SOLR-cloud-cluster-tp4100275.html

Sent from the Solr - User mailing list archive at Nabble.com.