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 Yu-Hui Jin <yu...@gmail.com> on 2007/09/20 03:35:02 UTC

setting absolute path for snapshooter in solrconfig.xml doesn't work

Hi, there,

I used an absolute path for the "dir" param in the solrconfig.xml as below:

    <listener event="postCommit" class="solr.RunExecutableListener">
      <str name="exe">snapshooter</str>
      <str name="dir">/var/SolrHome/solr/bin</str>
      <bool name="wait">true</bool>
      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
      <arr name="env"> <str>MYVAR=val1</str> </arr>
    </listener>

However, I got "snapshooter: not found"  exception thrown in catalina.out.
I don't see why this doesn't work. Anything I'm missing?


Many thanks,

-Hui

catalina.out logs:
=========
......
Sep 19, 2007 6:17:20 PM org.apache.solr.handler.XmlUpdateRequestHandlerupdate
INFO: added id={SOLR1000} in 67ms
Sep 19, 2007 6:17:20 PM org.apache.solr.core.SolrCore execute
INFO: /update  0 86
Sep 19, 2007 6:17:21 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: start commit(optimize=false,waitFlush=false,waitSearcher=true)
Sep 19, 2007 6:17:21 PM org.apache.solr.update.DirectUpdateHandler2doDeletions
INFO: DirectUpdateHandler2 deleting and removing dups for 1 ids
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@44d990 DirectUpdateHandler2
Sep 19, 2007 6:17:21 PM org.apache.solr.update.DirectUpdateHandler2doDeletions
INFO: DirectUpdateHandler2 docs deleted=0
Sep 19, 2007 6:17:21 PM org.apache.solr.core.SolrException log
SEVERE: java.io.IOException: java.io.IOException: snapshooter: not found
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
        at java.lang.ProcessImpl.start(ProcessImpl.java:65)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
        at java.lang.Runtime.exec(Runtime.java:591)
        at org.apache.solr.core.RunExecutableListener.exec(
RunExecutableListener.java:70)
        at org.apache.solr.core.RunExecutableListener.postCommit(
RunExecutableListener.java:97)
        at org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(
UpdateHandler.java:99)
        at org.apache.solr.update.DirectUpdateHandler2.commit(
DirectUpdateHandler2.java:514)
        at org.apache.solr.handler.XmlUpdateRequestHandler.update(
XmlUpdateRequestHandler.java:214)
        at org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody
(XmlUpdateRequestHandler.java:84)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(
RequestHandlerBase.java:77)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(
SolrDispatchFilter.java:191)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
SolrDispatchFilter.java:159)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
        at org.apache.catalina.valves.AccessLogValve.invoke(
AccessLogValve.java:526)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:7
44)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)


Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@bd09e8 main
Sep 19, 2007 6:17:21 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming Searcher@bd09e8 main from Searcher@1415056 main
        filterCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for Searcher@bd09e8 main
        filterCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming Searcher@bd09e8 main from Searcher@1415056 main
        queryResultCache{lookups=1,hits=0,hitratio=0.00
,inserts=1,evictions=0,size=1,cumulative_lookups=1,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=1,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for Searcher@bd09e8 main
        queryResultCache{lookups=0,hits=0,hitratio=0.00
,inserts=1,evictions=0,size=1,cumulative_lookups=1,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=1,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming Searcher@bd09e8 main from Searcher@1415056 main
        documentCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for Searcher@bd09e8 main
        documentCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.core.SolrCore registerSearcher
INFO: Registered new searcher Searcher@bd09e8 main
Sep 19, 2007 6:17:21 PM org.apache.solr.search.SolrIndexSearcher close
INFO: Closing Searcher@1415056 main
        filterCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
        queryResultCache{lookups=1,hits=0,hitratio=0.00
,inserts=1,evictions=0,size=1,cumulative_lookups=1,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=1,cumulative_evictions=0}
        documentCache{lookups=0,hits=0,hitratio=0.00
,inserts=0,evictions=0,size=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=
0.00,cumulative_inserts=0,cumulative_evictions=0}
Sep 19, 2007 6:17:21 PM org.apache.solr.handler.XmlUpdateRequestHandlerupdate
INFO: commit 0 60
Sep 19, 2007 6:17:21 PM org.apache.solr.core.SolrCore execute
INFO: /update  0 61




-- 
Regards,

-Hui

Re: Scripts not working on cron - always asking for password

Posted by Mike Klaas <mi...@gmail.com>.
On 21-Sep-07, at 7:44 AM, Daniel Alheiros wrote:

> Hi
>
> Problem solved... I had to create a private/public key for my users  
> and add
> it to the authorized_keys on my server...
>
> I've used instructions on this page, quite simple actually (after  
> you know
> what you need to do...).
>
> http://www.ece.uci.edu/~chou/ssh-key.html
>
> Shouldn't this kind of information be present on the SOLR  
> documentation? I'm
> going to write it in my installation procedures, so I can  
> contribute it back
> to SOLR wiki if you think it's appropriate.

I wouldn't mind listing a brief note and a link, but trying to cover  
too many unix basics will clutter up the documentation.

-Mike

Re: Scripts not working on cron - always asking for password

Posted by Daniel Alheiros <Da...@bbc.co.uk>.
Hi

Problem solved... I had to create a private/public key for my users and add
it to the authorized_keys on my server...

I've used instructions on this page, quite simple actually (after you know
what you need to do...).

http://www.ece.uci.edu/~chou/ssh-key.html

Shouldn't this kind of information be present on the SOLR documentation? I'm
going to write it in my installation procedures, so I can contribute it back
to SOLR wiki if you think it's appropriate.

Regards,
Daniel


On 21/9/07 14:31, "Daniel Alheiros" <Da...@bbc.co.uk> wrote:

> Hi Thorsten,
> 
> Thanks for your answer, but I've done it before and it still didn't work. I
> was running everything before as root and it didn't work either.
> 
> Now I've created a solr user, part of the root group, changed the ownership
> of all solr stuff, and changed file permissions to 775 (so any user on the
> root group should be able to do anything on any files)....
> 
> Any other suggestion?
> 
> Regards,
> Daniel
> 
> On 21/9/07 13:12, "Thorsten Scherler"
> <th...@juntadeandalucia.es> wrote:
> 
>> On Fri, 2007-09-21 at 13:02 +0100, Daniel Alheiros wrote:
>>> Hi
>>> 
>>> I'm having problems trying to setup my schedulled tasks. Sorry if it's
>>> something Linux related, as I'm not a Linux expert...
>>> 
>>> I created a scripts.conf file (for my slave server) containing:
>>> user=solr
>>> solr_hostname=10.133.132.159
>>> solr_port=8080
>>> rsyncd_port=20280
>>> data_dir=/var/solr2-v1.2.0/home/data
>>> webapp_name=solr
>>> master_host=10.133.132.159
>>> master_data_dir=/var/solr3-v1.2.0/home/data
>>> master_status_dir=/var/solr3-v1.2.0/home/logs
>>> 
>>> I have two solr instances running on the same machine, each one has its own
>>> data dir.
>>> 
>>> My cron configuration is:
>>> # master
>>> 2 5 * * * /var/solr3-v1.2.0/home/bin/snapcleaner -D 1
>>> 2 4 * * * /var/solr3-v1.2.0/home/bin/optimize
>>> # slave
>>> */5 * * * * 
>>> /var/solr2-v1.2.0/home/bin/snappuller;/var/solr2-v1.2.0/home/bin/snapinstall
>>> er
>>> */9 * * * * /var/solr3-v1.2.0/home/bin/snapcleaner -N 2
>>> 
>>> It's pretty weird for me because it always asks me for a password when I run
>>> any of them manually (and after passwords are provided they work properly).
>> 
>> Well you just gave the answer. Make sure the user that is executing the
>> cron has sufficient rights. The cron job will not be able to have a
>> dialog.
>> 
>> The "prude force" method is:
>> 
>> sudo chown USER:USER /var/solr3-v1.2.0
>> 
>> That should do the job.
>> 
>> salu2
>> 
>>> Where should I add this password in order to avoid it? I couldn't find it in
>>> the documentation. When I try to run manually the snappuller it asks for
>>> password 5 times when it has a new snapshot to get and 2 times when it
>>> doesn't have a new snapshot.
>>> 
>>> Here goes the error log in the snappuller.log file:
>>> 2007/09/21 13:00:01 started by solr
>>> 2007/09/21 13:00:01 command: /var/solr2-v1.2.0/home/bin/snappuller
>>> 2007/09/21 13:00:01 failed to ssh to master 10.133.132.159
>>> 
>>> My OS is a RHEL.
>>> 
>>> Regards,
>>> Daniel
>>> 
>>> On 20/9/07 07:14, "Yu-Hui Jin" <yu...@gmail.com> wrote:
>>> 
>>>> Thanks, it works now.
>>>> 
>>>> 
>>>> regards,
>>>> -Hui
>>>> 
>>>> 
>>>> On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
>>>>> 
>>>>> If you don't need to pass any command line arguments to snapshooter,
>>>>> remove
>>>>> (or comment out) this line from solrconfig.xml:
>>>>> 
>>>>> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>>> 
>>>>> By the same token, if you're not setting environment variables either,
>>>>> remove the following line as well:
>>>>> 
>>>>> <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>>> 
>>>>> Once you alter / remove those two lines, snapshooter should function as
>>>>> expected.
>>>>> 
>>>>> cheers,
>>>>> Piete
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>>> 
>>>>>> Hi, Pieter,
>>>>>> 
>>>>>> Thanks!  Now the exception is gone. However, There's no snapshot file
>>>>>> created in the data directory. Strangely, the snapshooter.log seems to
>>>>>> complete successfully.  Any idea what else I'm missing?
>>>>>> 
>>>>>> $ cat var/SolrHome/solr/logs/snapshooter.log
>>>>>> 2007/09/19 20:16:17 started by solruser
>>>>>> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
>>>>> arg2
>>>>>> 2007/09/19 20:16:17 taking snapshot
>>>>>> var/SolrHome/solr/data/snapshot.20070919201617
>>>>>> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
>>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> -Hui
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
>>>>>>> 
>>>>>>> See this recent thread for some helpful info:
>>>>>>> 
>>>>>>> 
>>>>>> 
http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf42648>>>>>>
7
>>>>>> 9.
>>>>>> html#a12167792
>>>>> 
>>>>>>> 
>>>>>>> You'll probably want to configure your exe with an absolute path
>>>>> rather
>>>>>>> than
>>>>>>> the dir:
>>>>>>> 
>>>>>>>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
>>>>>>>       <str name="dir">.</str>
>>>>>>> 
>>>>>>> In order to get the snapshooter working correctly.
>>>>>>> 
>>>>>>> cheers,
>>>>>>> Piete
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>> Hi, there,
>>>>>>>> 
>>>>>>>> I used an absolute path for the "dir" param in the solrconfig.xml as
>>>>>>>> below:
>>>>>>>> 
>>>>>>>>     <listener event="postCommit" class="solr.RunExecutableListener">
>>>>>>>>       <str name="exe">snapshooter</str>
>>>>>>>>       <str name="dir">/var/SolrHome/solr/bin</str>
>>>>>>>>       <bool name="wait">true</bool>
>>>>>>>>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>>>>>>       <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>>>>>>     </listener>
>>>>>>>> 
>>>>>>>> However, I got "snapshooter: not found"  exception thrown in
>>>>>>> catalina.out.
>>>>>>>> I don't see why this doesn't work. Anything I'm missing?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Many thanks,
>>>>>>>> 
>>>>>>>> -Hui
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Regards,
>>>>>> 
>>>>>> -Hui
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> http://www.bbc.co.uk/
>>> This e-mail (and any attachments) is confidential and may contain personal
>>> views which are not the views of the BBC unless specifically stated.
>>> If you have received it in error, please delete it from your system.
>>> Do not use, copy or disclose the information in any way nor act in reliance
>>> on it and notify the sender immediately.
>>> Please note that the BBC monitors e-mails sent or received.
>>> Further communication will signify your consent to this.
>>> 
> 
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on
> it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
> 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Re: Scripts not working on cron - always asking for password

Posted by Daniel Alheiros <Da...@bbc.co.uk>.
Hi Thorsten,

Thanks for your answer, but I've done it before and it still didn't work. I
was running everything before as root and it didn't work either.

Now I've created a solr user, part of the root group, changed the ownership
of all solr stuff, and changed file permissions to 775 (so any user on the
root group should be able to do anything on any files)....

Any other suggestion?

Regards,
Daniel

On 21/9/07 13:12, "Thorsten Scherler"
<th...@juntadeandalucia.es> wrote:

> On Fri, 2007-09-21 at 13:02 +0100, Daniel Alheiros wrote:
>> Hi
>> 
>> I'm having problems trying to setup my schedulled tasks. Sorry if it's
>> something Linux related, as I'm not a Linux expert...
>> 
>> I created a scripts.conf file (for my slave server) containing:
>> user=solr
>> solr_hostname=10.133.132.159
>> solr_port=8080
>> rsyncd_port=20280
>> data_dir=/var/solr2-v1.2.0/home/data
>> webapp_name=solr
>> master_host=10.133.132.159
>> master_data_dir=/var/solr3-v1.2.0/home/data
>> master_status_dir=/var/solr3-v1.2.0/home/logs
>> 
>> I have two solr instances running on the same machine, each one has its own
>> data dir.
>> 
>> My cron configuration is:
>> # master
>> 2 5 * * * /var/solr3-v1.2.0/home/bin/snapcleaner -D 1
>> 2 4 * * * /var/solr3-v1.2.0/home/bin/optimize
>> # slave
>> */5 * * * * 
>> /var/solr2-v1.2.0/home/bin/snappuller;/var/solr2-v1.2.0/home/bin/snapinstall
>> er
>> */9 * * * * /var/solr3-v1.2.0/home/bin/snapcleaner -N 2
>> 
>> It's pretty weird for me because it always asks me for a password when I run
>> any of them manually (and after passwords are provided they work properly).
> 
> Well you just gave the answer. Make sure the user that is executing the
> cron has sufficient rights. The cron job will not be able to have a
> dialog.
> 
> The "prude force" method is:
> 
> sudo chown USER:USER /var/solr3-v1.2.0
> 
> That should do the job.
> 
> salu2
> 
>> Where should I add this password in order to avoid it? I couldn't find it in
>> the documentation. When I try to run manually the snappuller it asks for
>> password 5 times when it has a new snapshot to get and 2 times when it
>> doesn't have a new snapshot.
>> 
>> Here goes the error log in the snappuller.log file:
>> 2007/09/21 13:00:01 started by solr
>> 2007/09/21 13:00:01 command: /var/solr2-v1.2.0/home/bin/snappuller
>> 2007/09/21 13:00:01 failed to ssh to master 10.133.132.159
>> 
>> My OS is a RHEL.
>> 
>> Regards,
>> Daniel
>> 
>> On 20/9/07 07:14, "Yu-Hui Jin" <yu...@gmail.com> wrote:
>> 
>>> Thanks, it works now.
>>> 
>>> 
>>> regards,
>>> -Hui
>>> 
>>> 
>>> On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
>>>> 
>>>> If you don't need to pass any command line arguments to snapshooter,
>>>> remove
>>>> (or comment out) this line from solrconfig.xml:
>>>> 
>>>> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>> 
>>>> By the same token, if you're not setting environment variables either,
>>>> remove the following line as well:
>>>> 
>>>> <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>> 
>>>> Once you alter / remove those two lines, snapshooter should function as
>>>> expected.
>>>> 
>>>> cheers,
>>>> Piete
>>>> 
>>>> 
>>>> 
>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>> 
>>>>> Hi, Pieter,
>>>>> 
>>>>> Thanks!  Now the exception is gone. However, There's no snapshot file
>>>>> created in the data directory. Strangely, the snapshooter.log seems to
>>>>> complete successfully.  Any idea what else I'm missing?
>>>>> 
>>>>> $ cat var/SolrHome/solr/logs/snapshooter.log
>>>>> 2007/09/19 20:16:17 started by solruser
>>>>> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
>>>> arg2
>>>>> 2007/09/19 20:16:17 taking snapshot
>>>>> var/SolrHome/solr/data/snapshot.20070919201617
>>>>> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> -Hui
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
>>>>>> 
>>>>>> See this recent thread for some helpful info:
>>>>>> 
>>>>>> 
>>>>> http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf426487
>>>>> 9.
>>>>> html#a12167792
>>>> 
>>>>>> 
>>>>>> You'll probably want to configure your exe with an absolute path
>>>> rather
>>>>>> than
>>>>>> the dir:
>>>>>> 
>>>>>>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
>>>>>>       <str name="dir">.</str>
>>>>>> 
>>>>>> In order to get the snapshooter working correctly.
>>>>>> 
>>>>>> cheers,
>>>>>> Piete
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>>>> 
>>>>>>> Hi, there,
>>>>>>> 
>>>>>>> I used an absolute path for the "dir" param in the solrconfig.xml as
>>>>>>> below:
>>>>>>> 
>>>>>>>     <listener event="postCommit" class="solr.RunExecutableListener">
>>>>>>>       <str name="exe">snapshooter</str>
>>>>>>>       <str name="dir">/var/SolrHome/solr/bin</str>
>>>>>>>       <bool name="wait">true</bool>
>>>>>>>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>>>>>       <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>>>>>     </listener>
>>>>>>> 
>>>>>>> However, I got "snapshooter: not found"  exception thrown in
>>>>>> catalina.out.
>>>>>>> I don't see why this doesn't work. Anything I'm missing?
>>>>>>> 
>>>>>>> 
>>>>>>> Many thanks,
>>>>>>> 
>>>>>>> -Hui
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Regards,
>>>>> 
>>>>> -Hui
>>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
>> http://www.bbc.co.uk/
>> This e-mail (and any attachments) is confidential and may contain personal
>> views which are not the views of the BBC unless specifically stated.
>> If you have received it in error, please delete it from your system.
>> Do not use, copy or disclose the information in any way nor act in reliance
>> on it and notify the sender immediately.
>> Please note that the BBC monitors e-mails sent or received.
>> Further communication will signify your consent to this.
>> 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Re: Scripts not working on cron - always asking for password

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Fri, 2007-09-21 at 13:02 +0100, Daniel Alheiros wrote:
> Hi
> 
> I'm having problems trying to setup my schedulled tasks. Sorry if it's
> something Linux related, as I'm not a Linux expert...
> 
> I created a scripts.conf file (for my slave server) containing:
> user=solr
> solr_hostname=10.133.132.159
> solr_port=8080
> rsyncd_port=20280
> data_dir=/var/solr2-v1.2.0/home/data
> webapp_name=solr
> master_host=10.133.132.159
> master_data_dir=/var/solr3-v1.2.0/home/data
> master_status_dir=/var/solr3-v1.2.0/home/logs
> 
> I have two solr instances running on the same machine, each one has its own
> data dir.
> 
> My cron configuration is:
> # master
> 2 5 * * * /var/solr3-v1.2.0/home/bin/snapcleaner -D 1
> 2 4 * * * /var/solr3-v1.2.0/home/bin/optimize
> # slave
> */5 * * * * 
> /var/solr2-v1.2.0/home/bin/snappuller;/var/solr2-v1.2.0/home/bin/snapinstall
> er
> */9 * * * * /var/solr3-v1.2.0/home/bin/snapcleaner -N 2
> 
> It's pretty weird for me because it always asks me for a password when I run
> any of them manually (and after passwords are provided they work properly).

Well you just gave the answer. Make sure the user that is executing the
cron has sufficient rights. The cron job will not be able to have a
dialog.

The "prude force" method is:

sudo chown USER:USER /var/solr3-v1.2.0

That should do the job.

salu2

> Where should I add this password in order to avoid it? I couldn't find it in
> the documentation. When I try to run manually the snappuller it asks for
> password 5 times when it has a new snapshot to get and 2 times when it
> doesn't have a new snapshot.
> 
> Here goes the error log in the snappuller.log file:
> 2007/09/21 13:00:01 started by solr
> 2007/09/21 13:00:01 command: /var/solr2-v1.2.0/home/bin/snappuller
> 2007/09/21 13:00:01 failed to ssh to master 10.133.132.159
> 
> My OS is a RHEL.
> 
> Regards,
> Daniel
> 
> On 20/9/07 07:14, "Yu-Hui Jin" <yu...@gmail.com> wrote:
> 
> > Thanks, it works now.
> > 
> > 
> > regards,
> > -Hui
> > 
> > 
> > On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
> >> 
> >> If you don't need to pass any command line arguments to snapshooter,
> >> remove
> >> (or comment out) this line from solrconfig.xml:
> >> 
> >> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
> >> 
> >> By the same token, if you're not setting environment variables either,
> >> remove the following line as well:
> >> 
> >> <arr name="env"> <str>MYVAR=val1</str> </arr>
> >> 
> >> Once you alter / remove those two lines, snapshooter should function as
> >> expected.
> >> 
> >> cheers,
> >> Piete
> >> 
> >> 
> >> 
> >> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> >>> 
> >>> Hi, Pieter,
> >>> 
> >>> Thanks!  Now the exception is gone. However, There's no snapshot file
> >>> created in the data directory. Strangely, the snapshooter.log seems to
> >>> complete successfully.  Any idea what else I'm missing?
> >>> 
> >>> $ cat var/SolrHome/solr/logs/snapshooter.log
> >>> 2007/09/19 20:16:17 started by solruser
> >>> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
> >> arg2
> >>> 2007/09/19 20:16:17 taking snapshot
> >>> var/SolrHome/solr/data/snapshot.20070919201617
> >>> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
> >>> 
> >>> Thanks,
> >>> 
> >>> -Hui
> >>> 
> >>> 
> >>> 
> >>> 
> >>> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
> >>>> 
> >>>> See this recent thread for some helpful info:
> >>>> 
> >>>> 
> >>> http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.
> >>> html#a12167792
> >> 
> >>>> 
> >>>> You'll probably want to configure your exe with an absolute path
> >> rather
> >>>> than
> >>>> the dir:
> >>>> 
> >>>>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
> >>>>       <str name="dir">.</str>
> >>>> 
> >>>> In order to get the snapshooter working correctly.
> >>>> 
> >>>> cheers,
> >>>> Piete
> >>>> 
> >>>> 
> >>>> 
> >>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> >>>>> 
> >>>>> Hi, there,
> >>>>> 
> >>>>> I used an absolute path for the "dir" param in the solrconfig.xml as
> >>>>> below:
> >>>>> 
> >>>>>     <listener event="postCommit" class="solr.RunExecutableListener">
> >>>>>       <str name="exe">snapshooter</str>
> >>>>>       <str name="dir">/var/SolrHome/solr/bin</str>
> >>>>>       <bool name="wait">true</bool>
> >>>>>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
> >>>>>       <arr name="env"> <str>MYVAR=val1</str> </arr>
> >>>>>     </listener>
> >>>>> 
> >>>>> However, I got "snapshooter: not found"  exception thrown in
> >>>> catalina.out.
> >>>>> I don't see why this doesn't work. Anything I'm missing?
> >>>>> 
> >>>>> 
> >>>>> Many thanks,
> >>>>> 
> >>>>> -Hui
> >>>>> 
> >>>> 
> >>> 
> >>> 
> >>> 
> >>> --
> >>> Regards,
> >>> 
> >>> -Hui
> >>> 
> >> 
> > 
> > 
> 
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
> 					
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: Scripts not working on cron - always asking for password

Posted by Daniel Alheiros <Da...@bbc.co.uk>.
Sorry I forgot to tell I'm running Solr 1.2.


On 21/9/07 13:02, "Daniel Alheiros" <Da...@bbc.co.uk> wrote:

> Hi
> 
> I'm having problems trying to setup my schedulled tasks. Sorry if it's
> something Linux related, as I'm not a Linux expert...
> 
> I created a scripts.conf file (for my slave server) containing:
> user=solr
> solr_hostname=10.133.132.159
> solr_port=8080
> rsyncd_port=20280
> data_dir=/var/solr2-v1.2.0/home/data
> webapp_name=solr
> master_host=10.133.132.159
> master_data_dir=/var/solr3-v1.2.0/home/data
> master_status_dir=/var/solr3-v1.2.0/home/logs
> 
> I have two solr instances running on the same machine, each one has its own
> data dir.
> 
> My cron configuration is:
> # master
> 2 5 * * * /var/solr3-v1.2.0/home/bin/snapcleaner -D 1
> 2 4 * * * /var/solr3-v1.2.0/home/bin/optimize
> # slave
> */5 * * * * 
> /var/solr2-v1.2.0/home/bin/snappuller;/var/solr2-v1.2.0/home/bin/snapinstall
> er
> */9 * * * * /var/solr3-v1.2.0/home/bin/snapcleaner -N 2
> 
> It's pretty weird for me because it always asks me for a password when I run
> any of them manually (and after passwords are provided they work properly).
> Where should I add this password in order to avoid it? I couldn't find it in
> the documentation. When I try to run manually the snappuller it asks for
> password 5 times when it has a new snapshot to get and 2 times when it
> doesn't have a new snapshot.
> 
> Here goes the error log in the snappuller.log file:
> 2007/09/21 13:00:01 started by solr
> 2007/09/21 13:00:01 command: /var/solr2-v1.2.0/home/bin/snappuller
> 2007/09/21 13:00:01 failed to ssh to master 10.133.132.159
> 
> My OS is a RHEL.
> 
> Regards,
> Daniel
> 
> On 20/9/07 07:14, "Yu-Hui Jin" <yu...@gmail.com> wrote:
> 
>> Thanks, it works now.
>> 
>> 
>> regards,
>> -Hui
>> 
>> 
>> On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
>>> 
>>> If you don't need to pass any command line arguments to snapshooter,
>>> remove
>>> (or comment out) this line from solrconfig.xml:
>>> 
>>> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>> 
>>> By the same token, if you're not setting environment variables either,
>>> remove the following line as well:
>>> 
>>> <arr name="env"> <str>MYVAR=val1</str> </arr>
>>> 
>>> Once you alter / remove those two lines, snapshooter should function as
>>> expected.
>>> 
>>> cheers,
>>> Piete
>>> 
>>> 
>>> 
>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>> 
>>>> Hi, Pieter,
>>>> 
>>>> Thanks!  Now the exception is gone. However, There's no snapshot file
>>>> created in the data directory. Strangely, the snapshooter.log seems to
>>>> complete successfully.  Any idea what else I'm missing?
>>>> 
>>>> $ cat var/SolrHome/solr/logs/snapshooter.log
>>>> 2007/09/19 20:16:17 started by solruser
>>>> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
>>> arg2
>>>> 2007/09/19 20:16:17 taking snapshot
>>>> var/SolrHome/solr/data/snapshot.20070919201617
>>>> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
>>>> 
>>>> Thanks,
>>>> 
>>>> -Hui
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
>>>>> 
>>>>> See this recent thread for some helpful info:
>>>>> 
>>>>> 
>>>> 
http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879>>>>
.
>>>> html#a12167792
>>> 
>>>>> 
>>>>> You'll probably want to configure your exe with an absolute path
>>> rather
>>>>> than
>>>>> the dir:
>>>>> 
>>>>>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
>>>>>       <str name="dir">.</str>
>>>>> 
>>>>> In order to get the snapshooter working correctly.
>>>>> 
>>>>> cheers,
>>>>> Piete
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>>> 
>>>>>> Hi, there,
>>>>>> 
>>>>>> I used an absolute path for the "dir" param in the solrconfig.xml as
>>>>>> below:
>>>>>> 
>>>>>>     <listener event="postCommit" class="solr.RunExecutableListener">
>>>>>>       <str name="exe">snapshooter</str>
>>>>>>       <str name="dir">/var/SolrHome/solr/bin</str>
>>>>>>       <bool name="wait">true</bool>
>>>>>>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>>>>       <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>>>>     </listener>
>>>>>> 
>>>>>> However, I got "snapshooter: not found"  exception thrown in
>>>>> catalina.out.
>>>>>> I don't see why this doesn't work. Anything I'm missing?
>>>>>> 
>>>>>> 
>>>>>> Many thanks,
>>>>>> 
>>>>>> -Hui
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Regards,
>>>> 
>>>> -Hui
>>>> 
>>> 
>> 
>> 
> 
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on
> it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
> 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Scripts not working on cron - always asking for password

Posted by Daniel Alheiros <Da...@bbc.co.uk>.
Hi

I'm having problems trying to setup my schedulled tasks. Sorry if it's
something Linux related, as I'm not a Linux expert...

I created a scripts.conf file (for my slave server) containing:
user=solr
solr_hostname=10.133.132.159
solr_port=8080
rsyncd_port=20280
data_dir=/var/solr2-v1.2.0/home/data
webapp_name=solr
master_host=10.133.132.159
master_data_dir=/var/solr3-v1.2.0/home/data
master_status_dir=/var/solr3-v1.2.0/home/logs

I have two solr instances running on the same machine, each one has its own
data dir.

My cron configuration is:
# master
2 5 * * * /var/solr3-v1.2.0/home/bin/snapcleaner -D 1
2 4 * * * /var/solr3-v1.2.0/home/bin/optimize
# slave
*/5 * * * * 
/var/solr2-v1.2.0/home/bin/snappuller;/var/solr2-v1.2.0/home/bin/snapinstall
er
*/9 * * * * /var/solr3-v1.2.0/home/bin/snapcleaner -N 2

It's pretty weird for me because it always asks me for a password when I run
any of them manually (and after passwords are provided they work properly).
Where should I add this password in order to avoid it? I couldn't find it in
the documentation. When I try to run manually the snappuller it asks for
password 5 times when it has a new snapshot to get and 2 times when it
doesn't have a new snapshot.

Here goes the error log in the snappuller.log file:
2007/09/21 13:00:01 started by solr
2007/09/21 13:00:01 command: /var/solr2-v1.2.0/home/bin/snappuller
2007/09/21 13:00:01 failed to ssh to master 10.133.132.159

My OS is a RHEL.

Regards,
Daniel

On 20/9/07 07:14, "Yu-Hui Jin" <yu...@gmail.com> wrote:

> Thanks, it works now.
> 
> 
> regards,
> -Hui
> 
> 
> On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
>> 
>> If you don't need to pass any command line arguments to snapshooter,
>> remove
>> (or comment out) this line from solrconfig.xml:
>> 
>> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>> 
>> By the same token, if you're not setting environment variables either,
>> remove the following line as well:
>> 
>> <arr name="env"> <str>MYVAR=val1</str> </arr>
>> 
>> Once you alter / remove those two lines, snapshooter should function as
>> expected.
>> 
>> cheers,
>> Piete
>> 
>> 
>> 
>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>> 
>>> Hi, Pieter,
>>> 
>>> Thanks!  Now the exception is gone. However, There's no snapshot file
>>> created in the data directory. Strangely, the snapshooter.log seems to
>>> complete successfully.  Any idea what else I'm missing?
>>> 
>>> $ cat var/SolrHome/solr/logs/snapshooter.log
>>> 2007/09/19 20:16:17 started by solruser
>>> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
>> arg2
>>> 2007/09/19 20:16:17 taking snapshot
>>> var/SolrHome/solr/data/snapshot.20070919201617
>>> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
>>> 
>>> Thanks,
>>> 
>>> -Hui
>>> 
>>> 
>>> 
>>> 
>>> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
>>>> 
>>>> See this recent thread for some helpful info:
>>>> 
>>>> 
>>> http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.
>>> html#a12167792
>> 
>>>> 
>>>> You'll probably want to configure your exe with an absolute path
>> rather
>>>> than
>>>> the dir:
>>>> 
>>>>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
>>>>       <str name="dir">.</str>
>>>> 
>>>> In order to get the snapshooter working correctly.
>>>> 
>>>> cheers,
>>>> Piete
>>>> 
>>>> 
>>>> 
>>>> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>>>>> 
>>>>> Hi, there,
>>>>> 
>>>>> I used an absolute path for the "dir" param in the solrconfig.xml as
>>>>> below:
>>>>> 
>>>>>     <listener event="postCommit" class="solr.RunExecutableListener">
>>>>>       <str name="exe">snapshooter</str>
>>>>>       <str name="dir">/var/SolrHome/solr/bin</str>
>>>>>       <bool name="wait">true</bool>
>>>>>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>>>>>       <arr name="env"> <str>MYVAR=val1</str> </arr>
>>>>>     </listener>
>>>>> 
>>>>> However, I got "snapshooter: not found"  exception thrown in
>>>> catalina.out.
>>>>> I don't see why this doesn't work. Anything I'm missing?
>>>>> 
>>>>> 
>>>>> Many thanks,
>>>>> 
>>>>> -Hui
>>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Regards,
>>> 
>>> -Hui
>>> 
>> 
> 
> 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Re: setting absolute path for snapshooter in solrconfig.xml doesn't work

Posted by Yu-Hui Jin <yu...@gmail.com>.
Thanks, it works now.


regards,
-Hui


On 9/19/07, Pieter Berkel <pieter.berkel@gmail.com > wrote:
>
> If you don't need to pass any command line arguments to snapshooter,
> remove
> (or comment out) this line from solrconfig.xml:
>
> <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>
> By the same token, if you're not setting environment variables either,
> remove the following line as well:
>
> <arr name="env"> <str>MYVAR=val1</str> </arr>
>
> Once you alter / remove those two lines, snapshooter should function as
> expected.
>
> cheers,
> Piete
>
>
>
> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> >
> > Hi, Pieter,
> >
> > Thanks!  Now the exception is gone. However, There's no snapshot file
> > created in the data directory. Strangely, the snapshooter.log seems to
> > complete successfully.  Any idea what else I'm missing?
> >
> > $ cat var/SolrHome/solr/logs/snapshooter.log
> > 2007/09/19 20:16:17 started by solruser
> > 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1
> arg2
> > 2007/09/19 20:16:17 taking snapshot
> > var/SolrHome/solr/data/snapshot.20070919201617
> > 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
> >
> > Thanks,
> >
> > -Hui
> >
> >
> >
> >
> > On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
> > >
> > > See this recent thread for some helpful info:
> > >
> > >
> > http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.html#a12167792
>
> > >
> > > You'll probably want to configure your exe with an absolute path
> rather
> > > than
> > > the dir:
> > >
> > >       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
> > >       <str name="dir">.</str>
> > >
> > > In order to get the snapshooter working correctly.
> > >
> > > cheers,
> > > Piete
> > >
> > >
> > >
> > > On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> > > >
> > > > Hi, there,
> > > >
> > > > I used an absolute path for the "dir" param in the solrconfig.xml as
> > > > below:
> > > >
> > > >     <listener event="postCommit" class="solr.RunExecutableListener">
> > > >       <str name="exe">snapshooter</str>
> > > >       <str name="dir">/var/SolrHome/solr/bin</str>
> > > >       <bool name="wait">true</bool>
> > > >       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
> > > >       <arr name="env"> <str>MYVAR=val1</str> </arr>
> > > >     </listener>
> > > >
> > > > However, I got "snapshooter: not found"  exception thrown in
> > > catalina.out.
> > > > I don't see why this doesn't work. Anything I'm missing?
> > > >
> > > >
> > > > Many thanks,
> > > >
> > > > -Hui
> > > >
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > -Hui
> >
>



-- 
Regards,

-Hui

Re: setting absolute path for snapshooter in solrconfig.xml doesn't work

Posted by Pieter Berkel <pi...@gmail.com>.
If you don't need to pass any command line arguments to snapshooter, remove
(or comment out) this line from solrconfig.xml:

<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>

By the same token, if you're not setting environment variables either,
remove the following line as well:

<arr name="env"> <str>MYVAR=val1</str> </arr>

Once you alter / remove those two lines, snapshooter should function as
expected.

cheers,
Piete



On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>
> Hi, Pieter,
>
> Thanks!  Now the exception is gone. However, There's no snapshot file
> created in the data directory. Strangely, the snapshooter.log seems to
> complete successfully.  Any idea what else I'm missing?
>
> $ cat var/SolrHome/solr/logs/snapshooter.log
> 2007/09/19 20:16:17 started by solruser
> 2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1 arg2
> 2007/09/19 20:16:17 taking snapshot
> var/SolrHome/solr/data/snapshot.20070919201617
> 2007/09/19 20:16:17 ended (elapsed time: 0 sec)
>
> Thanks,
>
> -Hui
>
>
>
>
> On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
> >
> > See this recent thread for some helpful info:
> >
> >
> http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.html#a12167792
> >
> > You'll probably want to configure your exe with an absolute path rather
> > than
> > the dir:
> >
> >       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
> >       <str name="dir">.</str>
> >
> > In order to get the snapshooter working correctly.
> >
> > cheers,
> > Piete
> >
> >
> >
> > On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> > >
> > > Hi, there,
> > >
> > > I used an absolute path for the "dir" param in the solrconfig.xml as
> > > below:
> > >
> > >     <listener event="postCommit" class="solr.RunExecutableListener">
> > >       <str name="exe">snapshooter</str>
> > >       <str name="dir">/var/SolrHome/solr/bin</str>
> > >       <bool name="wait">true</bool>
> > >       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
> > >       <arr name="env"> <str>MYVAR=val1</str> </arr>
> > >     </listener>
> > >
> > > However, I got "snapshooter: not found"  exception thrown in
> > catalina.out.
> > > I don't see why this doesn't work. Anything I'm missing?
> > >
> > >
> > > Many thanks,
> > >
> > > -Hui
> > >
> >
>
>
>
> --
> Regards,
>
> -Hui
>

Re: setting absolute path for snapshooter in solrconfig.xml doesn't work

Posted by Yu-Hui Jin <yu...@gmail.com>.
Hi, Pieter,

Thanks!  Now the exception is gone. However, There's no snapshot file
created in the data directory. Strangely, the snapshooter.log seems to
complete successfully.  Any idea what else I'm missing?

$ cat var/SolrHome/solr/logs/snapshooter.log
2007/09/19 20:16:17 started by solruser
2007/09/19 20:16:17 command: /var/SolrHome/solr/bin/snapshooter arg1 arg2
2007/09/19 20:16:17 taking snapshot
var/SolrHome/solr/data/snapshot.20070919201617
2007/09/19 20:16:17 ended (elapsed time: 0 sec)

Thanks,

-Hui




On 9/19/07, Pieter Berkel <pi...@gmail.com> wrote:
>
> See this recent thread for some helpful info:
>
> http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.html#a12167792
>
> You'll probably want to configure your exe with an absolute path rather
> than
> the dir:
>
>       <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
>       <str name="dir">.</str>
>
> In order to get the snapshooter working correctly.
>
> cheers,
> Piete
>
>
>
> On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
> >
> > Hi, there,
> >
> > I used an absolute path for the "dir" param in the solrconfig.xml as
> > below:
> >
> >     <listener event="postCommit" class="solr.RunExecutableListener">
> >       <str name="exe">snapshooter</str>
> >       <str name="dir">/var/SolrHome/solr/bin</str>
> >       <bool name="wait">true</bool>
> >       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
> >       <arr name="env"> <str>MYVAR=val1</str> </arr>
> >     </listener>
> >
> > However, I got "snapshooter: not found"  exception thrown in
> catalina.out.
> > I don't see why this doesn't work. Anything I'm missing?
> >
> >
> > Many thanks,
> >
> > -Hui
> >
>



-- 
Regards,

-Hui

Re: setting absolute path for snapshooter in solrconfig.xml doesn't work

Posted by Pieter Berkel <pi...@gmail.com>.
See this recent thread for some helpful info:
http://www.nabble.com/solr-doesn%27t-find-exe-in-postCommit-event-tf4264879.html#a12167792

You'll probably want to configure your exe with an absolute path rather than
the dir:

      <str name="exe">/var/SolrHome/solr/bin/snapshooter</str>
      <str name="dir">.</str>

In order to get the snapshooter working correctly.

cheers,
Piete



On 20/09/2007, Yu-Hui Jin <yu...@gmail.com> wrote:
>
> Hi, there,
>
> I used an absolute path for the "dir" param in the solrconfig.xml as
> below:
>
>     <listener event="postCommit" class="solr.RunExecutableListener">
>       <str name="exe">snapshooter</str>
>       <str name="dir">/var/SolrHome/solr/bin</str>
>       <bool name="wait">true</bool>
>       <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
>       <arr name="env"> <str>MYVAR=val1</str> </arr>
>     </listener>
>
> However, I got "snapshooter: not found"  exception thrown in catalina.out.
> I don't see why this doesn't work. Anything I'm missing?
>
>
> Many thanks,
>
> -Hui
>