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 "M. Flatterie" <ni...@yahoo.com> on 2013/05/16 20:02:55 UTC

Migrating from 4.2.1 to 4.3.0

Greetings, I just started with Solr a couple weeks ago, with version 4.2.1.

I installed the following setup:
- ZooKeeper: 3 instances ensemble
- Solr: on Tomcat, 4 instances
    - WebOrder_Collection: instances 1 and 2, 1 shard, 1 master, 1 replica

    - other_collectionA: instances 3 and 4, 1 shard, 1 master, 1 replica

    - other_CollectionB: instances 3 and 4, 1 shard, 1 master, 1 replica


With version 4.2.1 everything works fine.  But I do have a problem if I query instance 3 for something in the WebOrder_Collection.  I found that this is a bug in 4.2.1,. I must query instances 1 or 2 to get results from WebOrder_Collection.


Now that I have upgraded to 4.3.0 I have the following problem.  My replicas will not recover.  The recovery will retry, and retry, ... forever.

Details.  If I look at the Zoo, I see that:
     - node_name
            10.0.2.15:8180_solr        in solr 4.2.1
            10.0.2.15:8180_             in solr 4.3.0
     - base_url
            http://10.0.2.15:8180/solr      in solr 4.2.1

            http://10.0.2.15:8180            in solr 4.3.0

My solr logs show this:

8869687 [RecoveryThread] ERROR org.apache.solr.cloud.RecoveryStrategy  – Error while trying to recover. core=WebOrder_Collection:org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://10.0.2.15:8180 returned non ok status:404, message:Not Found
    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)
    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
    at org.apache.solr.cloud.RecoveryStrategy.sendPrepRecoveryCmd(RecoveryStrategy.java:202)
    at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:346)
    at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:223)


I have not been able to find more info than that.  The Solr cloud diagram shows instance1 as active and leader, instance 2 as recovering.  My solrconfig.xml are identical, except for the LUCENE_42 or LUCENE_43 tag.


Any idea?  I hope that it is a configuration issue on my part...

Thank you for any help, Nic.

Re: Migrating from 4.2.1 to 4.3.0

Posted by "M. Flatterie" <ni...@yahoo.com>.
Great it works, I am back on track!  Thank you!!!
Nic



________________________________
 From: Shawn Heisey <so...@elyograg.org>
To: solr-user@lucene.apache.org 
Sent: Thursday, May 16, 2013 4:25:09 PM
Subject: Re: Migrating from 4.2.1 to 4.3.0
 

On 5/16/2013 1:40 PM, M. Flatterie wrote:
> Oups sorry about that, since it was referring context I thought it was the Tomcat one.
>
> Here is the /home/solradm1/solr.xml file (comments removed!)
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <solr persistent="true">
>      <cores adminPath="/admin/cores" defaultCoreName="WebOrder_Collection" host="${host:}" hostPort="8180" hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
>          <core name="WebOrder_Collection" instanceDir="WebOrder_Collection">
>              <property name="solr.data.dir" value="/home/solradm1/WebOrder_Collection/data" />
>              <property name="solr.ulog.dir" value="/home/solradm1/WebOrder_Collection/ulog" />
>          </core>
>      </cores>
> </solr>

The hostContext attribute needs changing.  It should be this instead:

hostContext="${hostContext:/solr}"

Looks like the previous version wasn't taking this attribute from your 
config, but the new version is.  This is probably a bug that was fixed 
in 4.3.

Thanks,
Shawn

Re: Migrating from 4.2.1 to 4.3.0

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/16/2013 1:40 PM, M. Flatterie wrote:
> Oups sorry about that, since it was referring context I thought it was the Tomcat one.
>
> Here is the /home/solradm1/solr.xml file (comments removed!)
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <solr persistent="true">
>      <cores adminPath="/admin/cores" defaultCoreName="WebOrder_Collection" host="${host:}" hostPort="8180" hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
>          <core name="WebOrder_Collection" instanceDir="WebOrder_Collection">
>              <property name="solr.data.dir" value="/home/solradm1/WebOrder_Collection/data" />
>              <property name="solr.ulog.dir" value="/home/solradm1/WebOrder_Collection/ulog" />
>          </core>
>      </cores>
> </solr>

The hostContext attribute needs changing.  It should be this instead:

hostContext="${hostContext:/solr}"

Looks like the previous version wasn't taking this attribute from your 
config, but the new version is.  This is probably a bug that was fixed 
in 4.3.

Thanks,
Shawn


Re: Migrating from 4.2.1 to 4.3.0

Posted by "M. Flatterie" <ni...@yahoo.com>.
Oups sorry about that, since it was referring context I thought it was the Tomcat one.

Here is the /home/solradm1/solr.xml file (comments removed!)

<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true">
    <cores adminPath="/admin/cores" defaultCoreName="WebOrder_Collection" host="${host:}" hostPort="8180" hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
        <core name="WebOrder_Collection" instanceDir="WebOrder_Collection">
            <property name="solr.data.dir" value="/home/solradm1/WebOrder_Collection/data" />
            <property name="solr.ulog.dir" value="/home/solradm1/WebOrder_Collection/ulog" />
        </core>
    </cores>
</solr>



Note: I configure solr.data.dir and solr.ulog.dir so I can run two instances on the same system and separate the data and ulog directories between the instances.

Nic.




________________________________
 From: Shawn Heisey <so...@elyograg.org>
To: solr-user@lucene.apache.org 
Sent: Thursday, May 16, 2013 3:29:41 PM
Subject: Re: Migrating from 4.2.1 to 4.3.0
 

On 5/16/2013 12:37 PM, M. Flatterie wrote:
> Afternoon, my solr.xml file is the following (and has not changed from 4.2.1 to 4.3.0):
>
>          <Context path="/solr" docBase="/home/tcatadm1/apache-tomcat-7.0.39/webapps/solr.war" debug="0" crossContext="true">
>              <Environment name="solr/home" type="java.lang.String" value="/home/solradm1" override="true"/>
>          </Context>

That is not the solr.xml Mark is referring to.  This solr.xml configures 
tomcat to load Solr.  You will have /home/solradm1/solr.xml as well, 
that is the one we are concerned with.

Thanks,
Shawn

Re: Migrating from 4.2.1 to 4.3.0

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/16/2013 12:37 PM, M. Flatterie wrote:
> Afternoon, my solr.xml file is the following (and has not changed from 4.2.1 to 4.3.0):
>
>          <Context path="/solr" docBase="/home/tcatadm1/apache-tomcat-7.0.39/webapps/solr.war" debug="0" crossContext="true">
>              <Environment name="solr/home" type="java.lang.String" value="/home/solradm1" override="true"/>
>          </Context>

That is not the solr.xml Mark is referring to.  This solr.xml configures 
tomcat to load Solr.  You will have /home/solradm1/solr.xml as well, 
that is the one we are concerned with.

Thanks,
Shawn


Re: Migrating from 4.2.1 to 4.3.0

Posted by "M. Flatterie" <ni...@yahoo.com>.
Afternoon, my solr.xml file is the following (and has not changed from 4.2.1 to 4.3.0):

        <Context path="/solr" docBase="/home/tcatadm1/apache-tomcat-7.0.39/webapps/solr.war" debug="0" crossContext="true">
            <Environment name="solr/home" type="java.lang.String" value="/home/solradm1" override="true"/>
        </Context>



________________________________
 From: Mark Miller <ma...@gmail.com>
To: solr-user@lucene.apache.org 
Sent: Thursday, May 16, 2013 2:28:52 PM
Subject: Re: Migrating from 4.2.1 to 4.3.0
 

Your solr webapp context appears to be "" rather than "solr". There was a JIRA issue in 4.3 that may have affected this, but I only saw it from a distance, so just a guess.

What does it say in solr.xml for the context (an attribute on <cores>)

- Mark

On May 16, 2013, at 2:02 PM, "M. Flatterie" <ni...@yahoo.com> wrote:

> Greetings, I just started with Solr a couple weeks ago, with version 4.2.1.
> 
> I installed the following setup:
> - ZooKeeper: 3 instances ensemble
> - Solr: on Tomcat, 4 instances
>     - WebOrder_Collection: instances 1 and 2, 1 shard, 1 master, 1 replica
> 
>     - other_collectionA: instances 3 and 4, 1 shard, 1 master, 1 replica
> 
>     - other_CollectionB: instances 3 and 4, 1 shard, 1 master, 1 replica
> 
> 
> With version 4.2.1 everything works fine.  But I do have a problem if I query instance 3 for something in the WebOrder_Collection.  I found that this is a bug in 4.2.1,. I must query instances 1 or 2 to get results from WebOrder_Collection.
> 
> 
> Now that I have upgraded to 4.3.0 I have the following problem.  My replicas will not recover.  The recovery will retry, and retry, ... forever.
> 
> Details.  If I look at the Zoo, I see that:
>      - node_name
>             10.0.2.15:8180_solr        in solr 4.2.1
>             10.0.2.15:8180_             in solr 4.3.0
>      - base_url
>            http://10.0.2.15:8180/solr      in solr 4.2.1
> 
>            http://10.0.2.15:8180            in solr 4.3.0
> 
> My solr logs show this:
> 
> 8869687 [RecoveryThread] ERROR org.apache.solr.cloud.RecoveryStrategy  – Error while trying to recover. core=WebOrder_Collection:org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://10.0.2.15:8180 returned non ok status:404, message:Not Found
>     at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)
>     at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
>     at org.apache.solr.cloud.RecoveryStrategy.sendPrepRecoveryCmd(RecoveryStrategy.java:202)
>     at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:346)
>     at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:223)
> 
> 
> I have not been able to find more info than that.  The Solr cloud diagram shows instance1 as active and leader, instance 2 as recovering.  My solrconfig.xml are identical, except for the LUCENE_42 or LUCENE_43 tag.
> 
> 
> Any idea?  I hope that it is a configuration issue on my part...
> 
> Thank you for any help, Nic.

Re: Migrating from 4.2.1 to 4.3.0

Posted by Mark Miller <ma...@gmail.com>.
Your solr webapp context appears to be "" rather than "solr". There was a JIRA issue in 4.3 that may have affected this, but I only saw it from a distance, so just a guess.

What does it say in solr.xml for the context (an attribute on <cores>)

- Mark

On May 16, 2013, at 2:02 PM, "M. Flatterie" <ni...@yahoo.com> wrote:

> Greetings, I just started with Solr a couple weeks ago, with version 4.2.1.
> 
> I installed the following setup:
> - ZooKeeper: 3 instances ensemble
> - Solr: on Tomcat, 4 instances
>     - WebOrder_Collection: instances 1 and 2, 1 shard, 1 master, 1 replica
> 
>     - other_collectionA: instances 3 and 4, 1 shard, 1 master, 1 replica
> 
>     - other_CollectionB: instances 3 and 4, 1 shard, 1 master, 1 replica
> 
> 
> With version 4.2.1 everything works fine.  But I do have a problem if I query instance 3 for something in the WebOrder_Collection.  I found that this is a bug in 4.2.1,. I must query instances 1 or 2 to get results from WebOrder_Collection.
> 
> 
> Now that I have upgraded to 4.3.0 I have the following problem.  My replicas will not recover.  The recovery will retry, and retry, ... forever.
> 
> Details.  If I look at the Zoo, I see that:
>      - node_name
>             10.0.2.15:8180_solr        in solr 4.2.1
>             10.0.2.15:8180_             in solr 4.3.0
>      - base_url
>             http://10.0.2.15:8180/solr      in solr 4.2.1
> 
>             http://10.0.2.15:8180            in solr 4.3.0
> 
> My solr logs show this:
> 
> 8869687 [RecoveryThread] ERROR org.apache.solr.cloud.RecoveryStrategy  – Error while trying to recover. core=WebOrder_Collection:org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://10.0.2.15:8180 returned non ok status:404, message:Not Found
>     at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)
>     at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
>     at org.apache.solr.cloud.RecoveryStrategy.sendPrepRecoveryCmd(RecoveryStrategy.java:202)
>     at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:346)
>     at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:223)
> 
> 
> I have not been able to find more info than that.  The Solr cloud diagram shows instance1 as active and leader, instance 2 as recovering.  My solrconfig.xml are identical, except for the LUCENE_42 or LUCENE_43 tag.
> 
> 
> Any idea?  I hope that it is a configuration issue on my part...
> 
> Thank you for any help, Nic.