cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error while switching to solr cloud

0 Kudos

Hello everybody,

I tried to switch my solr configruation from standalone to solr cloud configuration as it was described here:

https://microlearning.opensap.com/media/Customizing+Solr+Configuration+-+SAP+Commerce+Cloud/1_ya05u9...

I changed the mode to cloud, method to post, useMasterNodeExcluseivleyForIndexing to false and both numShards and replicationFactor to 2 and received the following error message:
```create failed:org.apache.solr.common.SolrException: Underlying core creation failed while creating collection```
No collection was created

I also lowered shards and replication to 1 each and now the collection was created, but I received following error message: ```while indexing Waiting until we see more replicas up for shard shard2: total=2 found=1 timeoute in=79706ms``` and it timed out after 3 minutes.

I checked my solrconfig and also found that these three lines exist:

<restManager>
<str name="storageIO">de.hybris.platform.solr.rest.IndexAwareStorageIO</str>
<str name="collectionName">${solr.core.collection:}</str>
<str name="instanceDir">${solr.core.instanceDir}</str>
</restManager>


Actually I am out of ideas, hope you guys can help me out.

Cheers

Serdar

Accepted Solutions (0)

Answers (1)

Answers (1)

mansurarisoy
Contributor
0 Kudos

Error is stating "Waiting until we see more replicas up for shard shard2: total=2 found=1" this is because the when you specify replicationFactor as 2, you need 2 solr instances. Set it to 1 if you have only one solr instance.

0 Kudos

Hi Mansur,

this is actually the Production Solr Cloud environment of SAP which has 4 Solr instances.

Therefore 2x2 should be correct, right?

But nevertheless I also tried 2x1 and 1x1, none of them worked.

mansurarisoy
Contributor
0 Kudos

Can you try giving replicationFactor as 4 and numShards as 1? If it does not work, try giving both as 4.

mansurarisoy
Contributor
0 Kudos

I tried this (replicationFactor as 4 and numShards as 1), but I needed to delete collection from Solr first. After that, replication on each node is created. I think replicationFactor as 2 and numShards as 2 configuration should work for your needs.