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 Aman Tandon <am...@gmail.com> on 2015/03/09 16:19:15 UTC

SolrCloud: Chroot error

Hi,

I tried to start solr with chroot feature, i am using solr 5.0.0 on Centos
6 and i am getting this error in the logs. Please help.

*./solr start -c -z localhost:2181,192.168.5.11:2181
<http://192.168.5.11:2181>,192.168.3.13:2181/home/aman/solrcloud/solr_zoo
<http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*

*ERROR - 2015-03-09 12:38:03.394;
org.apache.solr.servlet.SolrDispatchFilter;*
* Could not start Solr. Check solr/home property and the logs*
*ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
null:*
*org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified in
Z*
*kHost but the znode doesn't exist. 192.168.6.217:2181
<http://192.168.6.217:2181/>,192.168.5.81:2181
<http://192.168.5.81:2181/>,192.*
*168.5.236:2181/data/solr/aman/solr_cloud/zoo_solr*
*        at
org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
*31)*

With Regards
Aman Tandon

Re: SolrCloud: Chroot error

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/10/2015 6:10 AM, Aman Tandon wrote:
> Thanks Shawn, I tried it with single string but still no success.
> 
> So currently i am running it without chroot and it is working fine.

That brings up a something for me or you to try.  I wonder if perhaps
there is a bug that will prevent the "directory" creation from
happening.  I would imagine that if you create the directory manually,
Solr would work just fine.  My production cloud is running a very old
release - 4.2.1 - and I find it difficult to set up a full SolrCloud
test environment because I don't have a lot of hardware.

Thanks,
Shawn


Re: SolrCloud: Chroot error

Posted by Aman Tandon <am...@gmail.com>.
Thanks Shawn, I tried it with single string but still no success.

So currently i am running it without chroot and it is working fine.

With Regards
Aman Tandon

On Mon, Mar 9, 2015 at 9:46 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 3/9/2015 10:03 AM, Aman Tandon wrote:
> > Thanks for replying, Just to send the mail, I replaced the IP addresses
> > with the imaginary hostname, now the command is
> >
> > *./solr start -c -z localhost:2181,abc.com:2181
> > <http://abc.com:2181>,xyz.com:2181/home/aman/solrcloud/solr_zoo
> > <http://xyz.com:2181/home/aman/solrcloud/solr_zoo> -p 4567*
>
> The same URL replacement is still happening.  I think I know what you
> are doing, but I was hoping to have a clean string just to make sure.
>
> You should not be using "localhost" in the zkHost string unless there is
> only one zk server, or you are trying to start the entire cluster on one
> machine.  All of your Solr machines should have identical zkHost
> parameters.  That is not possible if they are separate machines and you
> use localhost.
>
> Your chroot should be very simple, as I mentioned in the other email.
> Using "/solr" is appropriate if you won't be sharing the zookeeper
> ensemble with multiple SolrCloud clusters.  The filesystem layout of
> your zookeeper install (bin, data, logs, etc) is NOT relevant for this
> chroot.  It exists only within the zookeeper database.
>
> Thanks,
> Shawn
>
>

Re: SolrCloud: Chroot error

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/9/2015 10:03 AM, Aman Tandon wrote:
> Thanks for replying, Just to send the mail, I replaced the IP addresses
> with the imaginary hostname, now the command is
>
> *./solr start -c -z localhost:2181,abc.com:2181
> <http://abc.com:2181>,xyz.com:2181/home/aman/solrcloud/solr_zoo
> <http://xyz.com:2181/home/aman/solrcloud/solr_zoo> -p 4567*

The same URL replacement is still happening.  I think I know what you
are doing, but I was hoping to have a clean string just to make sure.

You should not be using "localhost" in the zkHost string unless there is
only one zk server, or you are trying to start the entire cluster on one
machine.  All of your Solr machines should have identical zkHost
parameters.  That is not possible if they are separate machines and you
use localhost.

Your chroot should be very simple, as I mentioned in the other email. 
Using "/solr" is appropriate if you won't be sharing the zookeeper
ensemble with multiple SolrCloud clusters.  The filesystem layout of
your zookeeper install (bin, data, logs, etc) is NOT relevant for this
chroot.  It exists only within the zookeeper database.

Thanks,
Shawn


Re: SolrCloud: Chroot error

Posted by Aman Tandon <am...@gmail.com>.
Hi Shawn,

Thanks for replying, Just to send the mail, I replaced the IP addresses
with the imaginary hostname, now the command is

*./solr start -c -z localhost:2181,abc.com:2181
<http://abc.com:2181>,xyz.com:2181/home/aman/solrcloud/solr_zoo
<http://xyz.com:2181/home/aman/solrcloud/solr_zoo> -p 4567*

*ERROR - 2015-03-09 12:38:03.394;
org.apache.solr.servlet.SolrDispatchFilter;*
* Could not start Solr. Check solr/home property and the logs*
*ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
null:*
*org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified in
Z*
*kHost but the znode doesn't exist. localhost:2181,abc.com:2181
<http://abc.com:2181>,xyz.com <http://xyz.com>*
*:2181/data/solr/aman/solr_cloud/zoo_solr*
*        at
org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
*31)*

With Regards
Aman Tandon

On Mon, Mar 9, 2015 at 9:26 PM, Aman Tandon <am...@gmail.com> wrote:

> Hi Anshum,
>
> Thanks for your time.
>
> I am using the external zookeeper. I am unaware that where should i create
> the path in Zk. The directory structure for zookepeer is as follows:
>
> Zookeeper */ *instance / bin,etc
> Zookeeper / data
> Zookeeper / logs
>
>  instance (contains bin,etc folders of zookeeper server)
>  data (dataDir for zookeeper)
>  logs (dataDirLog for zookeeper to keep the logs)
>
> With Regards
> Aman Tandon
>
> On Mon, Mar 9, 2015 at 9:02 PM, Anshum Gupta <an...@anshumgupta.net>
> wrote:
>
>> Looks like the zk you're pointing to doesn't contain the path
>> 'data/solr/aman/solr_cloud'
>> that you've specified as the chroot prefix.
>> Can you confirm that your zk contains this path? If it doesn't, can you
>> create this path and then try?
>>
>> On Mon, Mar 9, 2015 at 8:19 AM, Aman Tandon <am...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I tried to start solr with chroot feature, i am using solr 5.0.0 on
>> Centos
>> > 6 and i am getting this error in the logs. Please help.
>> >
>> > *./solr start -c -z localhost:2181,192.168.5.11:2181
>> > <http://192.168.5.11:2181>,
>> 192.168.3.13:2181/home/aman/solrcloud/solr_zoo
>> > <http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*
>> >
>> > *ERROR - 2015-03-09 12:38:03.394;
>> > org.apache.solr.servlet.SolrDispatchFilter;*
>> > * Could not start Solr. Check solr/home property and the logs*
>> > *ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
>> > null:*
>> > *org.apache.solr.common.cloud.ZooKeeperException: A chroot was
>> specified in
>> > Z*
>> > *kHost but the znode doesn't exist. 192.168.6.217:2181
>> > <http://192.168.6.217:2181/>,192.168.5.81:2181
>> > <http://192.168.5.81:2181/>,192.*
>> > *168.5.236:2181/data/solr/aman/solr_cloud/zoo_solr*
>> > *        at
>> > org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
>> > *31)*
>> >
>> > With Regards
>> > Aman Tandon
>> >
>>
>>
>>
>> --
>> Anshum Gupta
>>
>
>

Re: SolrCloud: Chroot error

Posted by Anshum Gupta <an...@anshumgupta.net>.
If you 
1. Don't know about chroot and 
2. Don't have other apps using the same zk and no other requirement to change the default; 

don't change the defaults. The zk string then should just point to host1:port1,host2:port2... String without the /path/in/zk part.

-Anshum

> On Mar 9, 2015, at 8:56 AM, Aman Tandon <am...@gmail.com> wrote:
> 
> Hi Anshum,
> 
> Thanks for your time.
> 
> I am using the external zookeeper. I am unaware that where should i create
> the path in Zk. The directory structure for zookepeer is as follows:
> 
> Zookeeper */ *instance / bin,etc
> Zookeeper / data
> Zookeeper / logs
> 
> instance (contains bin,etc folders of zookeeper server)
> data (dataDir for zookeeper)
> logs (dataDirLog for zookeeper to keep the logs)
> 
> With Regards
> Aman Tandon
> 
>> On Mon, Mar 9, 2015 at 9:02 PM, Anshum Gupta <an...@anshumgupta.net> wrote:
>> 
>> Looks like the zk you're pointing to doesn't contain the path
>> 'data/solr/aman/solr_cloud'
>> that you've specified as the chroot prefix.
>> Can you confirm that your zk contains this path? If it doesn't, can you
>> create this path and then try?
>> 
>> On Mon, Mar 9, 2015 at 8:19 AM, Aman Tandon <am...@gmail.com>
>> wrote:
>> 
>>> Hi,
>>> 
>>> I tried to start solr with chroot feature, i am using solr 5.0.0 on
>> Centos
>>> 6 and i am getting this error in the logs. Please help.
>>> 
>>> *./solr start -c -z localhost:2181,192.168.5.11:2181
>>> <http://192.168.5.11:2181>,
>> 192.168.3.13:2181/home/aman/solrcloud/solr_zoo
>>> <http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*
>>> 
>>> *ERROR - 2015-03-09 12:38:03.394;
>>> org.apache.solr.servlet.SolrDispatchFilter;*
>>> * Could not start Solr. Check solr/home property and the logs*
>>> *ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
>>> null:*
>>> *org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified
>> in
>>> Z*
>>> *kHost but the znode doesn't exist. 192.168.6.217:2181
>>> <http://192.168.6.217:2181/>,192.168.5.81:2181
>>> <http://192.168.5.81:2181/>,192.*
>>> *168.5.236:2181/data/solr/aman/solr_cloud/zoo_solr*
>>> *        at
>>> org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
>>> *31)*
>>> 
>>> With Regards
>>> Aman Tandon
>> 
>> 
>> 
>> --
>> Anshum Gupta
>> 

Re: SolrCloud: Chroot error

Posted by Aman Tandon <am...@gmail.com>.
Hi Anshum,

Thanks for your time.

I am using the external zookeeper. I am unaware that where should i create
the path in Zk. The directory structure for zookepeer is as follows:

Zookeeper */ *instance / bin,etc
Zookeeper / data
Zookeeper / logs

 instance (contains bin,etc folders of zookeeper server)
 data (dataDir for zookeeper)
 logs (dataDirLog for zookeeper to keep the logs)

With Regards
Aman Tandon

On Mon, Mar 9, 2015 at 9:02 PM, Anshum Gupta <an...@anshumgupta.net> wrote:

> Looks like the zk you're pointing to doesn't contain the path
> 'data/solr/aman/solr_cloud'
> that you've specified as the chroot prefix.
> Can you confirm that your zk contains this path? If it doesn't, can you
> create this path and then try?
>
> On Mon, Mar 9, 2015 at 8:19 AM, Aman Tandon <am...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I tried to start solr with chroot feature, i am using solr 5.0.0 on
> Centos
> > 6 and i am getting this error in the logs. Please help.
> >
> > *./solr start -c -z localhost:2181,192.168.5.11:2181
> > <http://192.168.5.11:2181>,
> 192.168.3.13:2181/home/aman/solrcloud/solr_zoo
> > <http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*
> >
> > *ERROR - 2015-03-09 12:38:03.394;
> > org.apache.solr.servlet.SolrDispatchFilter;*
> > * Could not start Solr. Check solr/home property and the logs*
> > *ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
> > null:*
> > *org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified
> in
> > Z*
> > *kHost but the znode doesn't exist. 192.168.6.217:2181
> > <http://192.168.6.217:2181/>,192.168.5.81:2181
> > <http://192.168.5.81:2181/>,192.*
> > *168.5.236:2181/data/solr/aman/solr_cloud/zoo_solr*
> > *        at
> > org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
> > *31)*
> >
> > With Regards
> > Aman Tandon
> >
>
>
>
> --
> Anshum Gupta
>

Re: SolrCloud: Chroot error

Posted by Anshum Gupta <an...@anshumgupta.net>.
Looks like the zk you're pointing to doesn't contain the path
'data/solr/aman/solr_cloud'
that you've specified as the chroot prefix.
Can you confirm that your zk contains this path? If it doesn't, can you
create this path and then try?

On Mon, Mar 9, 2015 at 8:19 AM, Aman Tandon <am...@gmail.com> wrote:

> Hi,
>
> I tried to start solr with chroot feature, i am using solr 5.0.0 on Centos
> 6 and i am getting this error in the logs. Please help.
>
> *./solr start -c -z localhost:2181,192.168.5.11:2181
> <http://192.168.5.11:2181>,192.168.3.13:2181/home/aman/solrcloud/solr_zoo
> <http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*
>
> *ERROR - 2015-03-09 12:38:03.394;
> org.apache.solr.servlet.SolrDispatchFilter;*
> * Could not start Solr. Check solr/home property and the logs*
> *ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
> null:*
> *org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified in
> Z*
> *kHost but the znode doesn't exist. 192.168.6.217:2181
> <http://192.168.6.217:2181/>,192.168.5.81:2181
> <http://192.168.5.81:2181/>,192.*
> *168.5.236:2181/data/solr/aman/solr_cloud/zoo_solr*
> *        at
> org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:1*
> *31)*
>
> With Regards
> Aman Tandon
>



-- 
Anshum Gupta

Re: SolrCloud: Chroot error

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/9/2015 9:19 AM, Aman Tandon wrote:
> I tried to start solr with chroot feature, i am using solr 5.0.0 on Centos
> 6 and i am getting this error in the logs. Please help.
>
> *./solr start -c -z localhost:2181,192.168.5.11:2181
> <http://192.168.5.11:2181>,192.168.3.13:2181/home/aman/solrcloud/solr_zoo
> <http://192.168.3.13:2181/home/aman/solrcloud/solr_zoo> -p 4567*
>
> *ERROR - 2015-03-09 12:38:03.394;
> org.apache.solr.servlet.SolrDispatchFilter;*
> * Could not start Solr. Check solr/home property and the logs*
> *ERROR - 2015-03-09 12:38:03.416; org.apache.solr.common.SolrException;
> null:*
> *org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified in
> Z*
> *kHost but the znode doesn't exist. 192.168.6.217:2181

As Anshum mentioned, it appears that the chroot you have specified
doesn't exist.

Note that this is a path within the zookeeper database ... you appear to
have listed a filesystem path, which is NOT the same thing.  Typically a
chroot on zookeeper should be very simple, normally consisting of one
forward slash followed by a short string, like "/solr1" or "/mysolr" or
similar.

As for why it simply didn't create the path, I wonder if perhaps
zookeeper (or the client code within Solr) is not capable of creating a
multi-level path.  You could try starting it four times, to see if it
will create one path level on each run.  I know from prior experience
with SolrCloud on version 4.2.1 that a chroot with a single path element
will work.

Your mail client appears to have turned the text of your zkHost
parameter into URLs, which makes it difficult to see what you are
actually using.  Can you make your reply plaintext and include it again
so that doesn't happen?

Thanks,
Shawn