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 A Laxmi <a....@gmail.com> on 2016/05/09 16:38:32 UTC

Solr 5.x bug with Service installation script?

Hi,

I have installed Solr 5.3.1 using the Service Installation Script. I was
able to successfully start and stop Solr using service solr start/stop
commands and Solr loads up just fine.

However, when I stop Solr service and copy an index of a core from one
server to another with same exact version of Solr and its corresponding
conf and restart the service, it complains about write.lock file when none
exists under the path that it specifies in the log.

To validate whether the issue is with the data that is being copied or the
service script itself, I copied the collection directory with new index
into example-DIH directory and restarted Solr manually bin/solr start -e
dih -m 2g, it worked without any error. So, atleast this validates that
collection data is just fine and service script is creating a lock
everytime a new index is copied from another server though it has the same
exact Solr version.

Did anyone experience the same? Any thoughts if this is a bug?

Thanks!
AL

Re: Solr 5.x bug with Service installation script?

Posted by A Laxmi <a....@gmail.com>.
Hi Erick - I used "sudo service solr stop" to shut it down.

On Tue, May 10, 2016 at 12:26 AM, Erick Erickson <er...@gmail.com>
wrote:

> How do you shut down your Solrs? Any kind of un-graceful
> stopping (kill -9 is a favorite) may leave the lock file around.
>
> It can't be coming from nowhere, so my guess is that
> it's present in the source or destination before
> you do your copy...
>
> Best,
> Erick
>
> On Mon, May 9, 2016 at 10:30 AM, A Laxmi <a....@gmail.com> wrote:
> > yes, I always shutdown both source and destination Solr before copying
> the
> > index over from one to another. Somehow the write.lock only happens when
> > Solr restarts from service script. If loads just fine when started
> manually.
> >
> > On Mon, May 9, 2016 at 1:20 PM, Abdel Belkasri <be...@gmail.com>
> wrote:
> >
> >> Did you copy the core while solr is running? if yes, first shuown source
> >> and destination solr, copy intex to the other solr, then restat solr
> nodes.
> >> Lock files get written to the core while solr is running and doing
> indexing
> >> or searching, etc.
> >>
> >> On Mon, May 9, 2016 at 12:38 PM, A Laxmi <a....@gmail.com>
> wrote:
> >>
> >> > Hi,
> >> >
> >> > I have installed Solr 5.3.1 using the Service Installation Script. I
> was
> >> > able to successfully start and stop Solr using service solr start/stop
> >> > commands and Solr loads up just fine.
> >> >
> >> > However, when I stop Solr service and copy an index of a core from one
> >> > server to another with same exact version of Solr and its
> corresponding
> >> > conf and restart the service, it complains about write.lock file when
> >> none
> >> > exists under the path that it specifies in the log.
> >> >
> >> > To validate whether the issue is with the data that is being copied or
> >> the
> >> > service script itself, I copied the collection directory with new
> index
> >> > into example-DIH directory and restarted Solr manually bin/solr start
> -e
> >> > dih -m 2g, it worked without any error. So, atleast this validates
> that
> >> > collection data is just fine and service script is creating a lock
> >> > everytime a new index is copied from another server though it has the
> >> same
> >> > exact Solr version.
> >> >
> >> > Did anyone experience the same? Any thoughts if this is a bug?
> >> >
> >> > Thanks!
> >> > AL
> >> >
> >>
> >>
> >>
> >> --
> >> Abdel K. Belkasri, PhD
> >>
>

Re: Solr 5.x bug with Service installation script?

Posted by Erick Erickson <er...@gmail.com>.
How do you shut down your Solrs? Any kind of un-graceful
stopping (kill -9 is a favorite) may leave the lock file around.

It can't be coming from nowhere, so my guess is that
it's present in the source or destination before
you do your copy...

Best,
Erick

On Mon, May 9, 2016 at 10:30 AM, A Laxmi <a....@gmail.com> wrote:
> yes, I always shutdown both source and destination Solr before copying the
> index over from one to another. Somehow the write.lock only happens when
> Solr restarts from service script. If loads just fine when started manually.
>
> On Mon, May 9, 2016 at 1:20 PM, Abdel Belkasri <be...@gmail.com> wrote:
>
>> Did you copy the core while solr is running? if yes, first shuown source
>> and destination solr, copy intex to the other solr, then restat solr nodes.
>> Lock files get written to the core while solr is running and doing indexing
>> or searching, etc.
>>
>> On Mon, May 9, 2016 at 12:38 PM, A Laxmi <a....@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I have installed Solr 5.3.1 using the Service Installation Script. I was
>> > able to successfully start and stop Solr using service solr start/stop
>> > commands and Solr loads up just fine.
>> >
>> > However, when I stop Solr service and copy an index of a core from one
>> > server to another with same exact version of Solr and its corresponding
>> > conf and restart the service, it complains about write.lock file when
>> none
>> > exists under the path that it specifies in the log.
>> >
>> > To validate whether the issue is with the data that is being copied or
>> the
>> > service script itself, I copied the collection directory with new index
>> > into example-DIH directory and restarted Solr manually bin/solr start -e
>> > dih -m 2g, it worked without any error. So, atleast this validates that
>> > collection data is just fine and service script is creating a lock
>> > everytime a new index is copied from another server though it has the
>> same
>> > exact Solr version.
>> >
>> > Did anyone experience the same? Any thoughts if this is a bug?
>> >
>> > Thanks!
>> > AL
>> >
>>
>>
>>
>> --
>> Abdel K. Belkasri, PhD
>>

Re: Solr 5.x bug with Service installation script?

Posted by A Laxmi <a....@gmail.com>.
Hi Shawn -

You brought up a good point. This might be a possible reason. I'll test it
out. Thanks! My index (4.5g) usually takes about 15-20 secs to load.

One other observation - even though it says write.lock file in a specific
data directory path, when I look up the directory, I don't see any
write.lock file in there. It is really confusing.

AL

On Tue, May 10, 2016 at 10:37 AM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 5/9/2016 11:30 AM, A Laxmi wrote:
> > yes, I always shutdown both source and destination Solr before copying
> the
> > index over from one to another. Somehow the write.lock only happens when
> > Solr restarts from service script. If loads just fine when started
> manually.
>
> One possible problem:
>
> The bin/solr script (which is used by the init script) only waits for 5
> seconds for Solr to stop gracefully before killingit forcibly.  This can
> leave write.lock files behind.
>
> I thought it had increased to 30 seconds in a recent version and that it
> was possibly even configurable in solr.in.sh, but I just checked the
> 6.0.0 download.  It's still only 5 seconds, and the value is hard-coded
> in the script.  This is only enough time if you have a very small number
> of very small indexes.
>
> Thanks,
> Shawn
>
>

Re: Solr 5.x bug with Service installation script?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/9/2016 11:30 AM, A Laxmi wrote:
> yes, I always shutdown both source and destination Solr before copying the
> index over from one to another. Somehow the write.lock only happens when
> Solr restarts from service script. If loads just fine when started manually.

One possible problem:

The bin/solr script (which is used by the init script) only waits for 5
seconds for Solr to stop gracefully before killingit forcibly.  This can
leave write.lock files behind.

I thought it had increased to 30 seconds in a recent version and that it
was possibly even configurable in solr.in.sh, but I just checked the
6.0.0 download.  It's still only 5 seconds, and the value is hard-coded
in the script.  This is only enough time if you have a very small number
of very small indexes.

Thanks,
Shawn


Re: Solr 5.x bug with Service installation script?

Posted by A Laxmi <a....@gmail.com>.
yes, I always shutdown both source and destination Solr before copying the
index over from one to another. Somehow the write.lock only happens when
Solr restarts from service script. If loads just fine when started manually.

On Mon, May 9, 2016 at 1:20 PM, Abdel Belkasri <be...@gmail.com> wrote:

> Did you copy the core while solr is running? if yes, first shuown source
> and destination solr, copy intex to the other solr, then restat solr nodes.
> Lock files get written to the core while solr is running and doing indexing
> or searching, etc.
>
> On Mon, May 9, 2016 at 12:38 PM, A Laxmi <a....@gmail.com> wrote:
>
> > Hi,
> >
> > I have installed Solr 5.3.1 using the Service Installation Script. I was
> > able to successfully start and stop Solr using service solr start/stop
> > commands and Solr loads up just fine.
> >
> > However, when I stop Solr service and copy an index of a core from one
> > server to another with same exact version of Solr and its corresponding
> > conf and restart the service, it complains about write.lock file when
> none
> > exists under the path that it specifies in the log.
> >
> > To validate whether the issue is with the data that is being copied or
> the
> > service script itself, I copied the collection directory with new index
> > into example-DIH directory and restarted Solr manually bin/solr start -e
> > dih -m 2g, it worked without any error. So, atleast this validates that
> > collection data is just fine and service script is creating a lock
> > everytime a new index is copied from another server though it has the
> same
> > exact Solr version.
> >
> > Did anyone experience the same? Any thoughts if this is a bug?
> >
> > Thanks!
> > AL
> >
>
>
>
> --
> Abdel K. Belkasri, PhD
>

Re: Solr 5.x bug with Service installation script?

Posted by Abdel Belkasri <be...@gmail.com>.
Did you copy the core while solr is running? if yes, first shuown source
and destination solr, copy intex to the other solr, then restat solr nodes.
Lock files get written to the core while solr is running and doing indexing
or searching, etc.

On Mon, May 9, 2016 at 12:38 PM, A Laxmi <a....@gmail.com> wrote:

> Hi,
>
> I have installed Solr 5.3.1 using the Service Installation Script. I was
> able to successfully start and stop Solr using service solr start/stop
> commands and Solr loads up just fine.
>
> However, when I stop Solr service and copy an index of a core from one
> server to another with same exact version of Solr and its corresponding
> conf and restart the service, it complains about write.lock file when none
> exists under the path that it specifies in the log.
>
> To validate whether the issue is with the data that is being copied or the
> service script itself, I copied the collection directory with new index
> into example-DIH directory and restarted Solr manually bin/solr start -e
> dih -m 2g, it worked without any error. So, atleast this validates that
> collection data is just fine and service script is creating a lock
> everytime a new index is copied from another server though it has the same
> exact Solr version.
>
> Did anyone experience the same? Any thoughts if this is a bug?
>
> Thanks!
> AL
>



-- 
Abdel K. Belkasri, PhD