Danke Schon mein freund. I got the setup working on a VMware guest. I think my host CouchDB instance was (is) corrupted.
Cheers Tim ________________________________ From: Robert Newson <[email protected]> To: [email protected] Sent: Tue, August 3, 2010 4:26:36 PM Subject: Re: Trying CouchDB / Coucdb-Lucene stack They can run on different machines, you just have to configure for that, localhost is assumed by default. B. On Tue, Aug 3, 2010 at 9:12 PM, Timothy Washington <[email protected]> wrote: > Aha, that looks a bit better. So I can assume 'couchdb-external-hook.py' is > working. So why isn't it indexing files. Maybe CouchDB and Couchdb-Lucene have > to be running on the same machine (separate machines in my instance) ? > > > > t...@tim-laptop:~/tmp$ /usr/bin/python > /home/tim/Tools/couchdb-lucene/couchdb-external-hook.py {} > Usage: couchdb-external-hook.py [OPTIONS] > couchdb-external-hook.py: error: Unrecognized arguments: {} > t...@tim-laptop:~/tmp$ > > > t...@tim-laptop:~/tmp$ /usr/bin/python > /home/tim/Tools/couchdb-lucene/couchdb-external-hook.py --help > Usage: couchdb-external-hook.py [OPTIONS] > Options: > --remote-host=REMOTE_HOST > Hostname of the couchdb-lucene server. [localhost] > --remote-port=REMOTE_PORT > Port of the couchdb-lucene server. [5985] > --local-key=KEY Configured key name for this couchdb instance. [local] > -h, --help show this help message and exit > t...@tim-laptop:~/tmp$ > > > > > > > > ________________________________ > From: Robert Newson <[email protected]> > To: [email protected] > Sent: Tue, August 3, 2010 4:01:57 PM > Subject: Re: Trying CouchDB / Coucdb-Lucene stack > > you need to enter valid JSON before you hit return if you're testing > the Python script directly. Entering '{}' without the single quotes is > a fair test. > > B. > > On Tue, Aug 3, 2010 at 8:54 PM, Timothy Washington > <[email protected]> wrote: >> I was sure I had, but lost it. I put back into '/etc/couchdb/local.ini', the >> following configuration, then restarted couchdb and couchdb-lucene. >> >> >> 7 [couchdb] >> 8 os_process_timeout=60000 ; increase the timeout from 5 seconds. >> 9 ;max_document_size = 4294967296 ; bytes >> 10 >> 11 [external] >> 12 fti=/usr/bin/python > /home/tim/Tools/couchdb-lucene/couchdb-external-hook.py >> 13 >> 14 [httpd_db_handlers] >> 15 _fti = {couch_httpd_external, handle_external_req, <<"fti">>} >> 16 >> 17 >> 18 [httpd] >> 19 ;port = 5984 >> 20 bind_address = 0.0.0.0 >> 21 >> 22 [log] >> 23 level = debug >> >> >> >> >> I was still getting errors trying to access the URL >> 'http://localhost:5984/baron/_fti/', so I tried running >> 'couchdb-external-hook.py' directly to see what would happen. This might not >> mean anything as it probably needs to be run in context, but... >> >> >> t...@tim-laptop:~/tmp$ /usr/bin/python >> /home/tim/Tools/couchdb-lucene/couchdb-external-hook.py >> >> Traceback (most recent call last): >> File "/home/tim/Tools/couchdb-lucene/couchdb-external-hook.py", line 98, in >> <module> >> main() >> File "/home/tim/Tools/couchdb-lucene/couchdb-external-hook.py", line 37, in >> main >> for req in requests(): >> File "/home/tim/Tools/couchdb-lucene/couchdb-external-hook.py", line 53, in >> requests >> yield json.loads(line) >> File "/usr/lib/python2.6/json/__init__.py", line 307, in loads >> return _default_decoder.decode(s) >> File "/usr/lib/python2.6/json/decoder.py", line 319, in decode >> obj, end = self.raw_decode(s, idx=_w(s, 0).end()) >> File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode >> raise ValueError("No JSON object could be decoded") >> ValueError: No JSON object could be decoded >> t...@tim-laptop:~/tmp$ >> >> >> >> Tim >> >> >> >> >> ________________________________ >> From: Robert Newson <[email protected]> >> To: [email protected] >> Sent: Tue, August 3, 2010 3:25:00 PM >> Subject: Re: Trying CouchDB / Coucdb-Lucene stack >> >> Did you add this to your .ini file?; >> >> [external] >> fti=/path/to/python /path/to/couchdb-lucene/tools/couchdb-external-hook.py >> >> [httpd_db_handlers] >> _fti = {couch_httpd_external, handle_external_req, <<"fti">>} >> >> B. >> >> On Tue, Aug 3, 2010 at 8:21 PM, Timothy Washington >> <[email protected]> wrote: >>> Hey Chris, thanks for the feedback. I don't know where couchdb indexes are >>> physically stored. So I don't know how to delete them. But I have attached >>> ini files for: >>> >>> couchdb (on vmware Host: 10.10.89.93 - /etc/couchdb/local.ini) >>> couchdb-lucene (on vmware Guest: 172.16.114.129 - >>>/home/baron/Tools/couchdb-lucene/couchdb-lucene-0.6-SNAPSHOT/conf/couchdb-lucene.ini) >>> >>> >>>) >>> >>> The JSON I get back from 'http://localhost:5984/baron/_fti/' is: >>> {"error":"not_found","reason":"missing"} >>> >>> LOGs >>> 7043 [Tue, 03 Aug 2010 19:04:04 GMT] [debug] [<0.64.0>] 'GET' /baron/_fti/ >>> {1,1} >>> 7044 Headers: >>> > [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, >>> 7045 {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"}, >>> 7046 {'Accept-Encoding',"gzip,deflate"}, >>> 7047 {'Accept-Language',"en-us,en;q=0.5"}, >>> 7048 {'Connection',"keep-alive"}, >>> 7049 {'Host',"localhost:5984"}, >>> 7050 {'Keep-Alive',"115"}, >>> 7051 {'User-Agent',"Mozilla/5.0 (X11; U; Linux i686; en-US; >>> rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8"}] >>> 7052 >>> 7053 [Tue, 03 Aug 2010 19:04:04 GMT] [debug] [<0.64.0>] OAuth Params: [] >>> 7054 >>> 7055 [Tue, 03 Aug 2010 19:04:04 GMT] [debug] [<0.64.0>] Minor error in HTTP >>> request: {not_found,missing} >>> 7056 >>> 7057 [Tue, 03 Aug 2010 19:04:04 GMT] [debug] [<0.64.0>] Stacktrace: >>> [{couch_httpd_db,couch_doc_open,4}, >>> 7058 {couch_httpd_db,db_doc_req,3}, >>> 7059 {couch_httpd_db,do_db_req,2}, >>> 7060 {couch_httpd,handle_request,5}, >>> 7061 {mochiweb_http,headers,5}, >>> 7062 {proc_lib,init_p_do_apply,3}] >>> 7063 >>> 7064 [Tue, 03 Aug 2010 19:04:04 GMT] [debug] [<0.64.0>] httpd 404 error >>> response: >>> 7065 {"error":"not_found","reason":"missing"} >>> 7066 >>> 7067 >>> 7068 [Tue, 03 Aug 2010 19:04:04 GMT] [info] [<0.64.0>] 127.0.0.1 - - 'GET' >>> /baron/_fti/ 404 >>> >>> >>> I've included the log file (couch.log - DEBUG level) and there is indeed a >>> recurring error that is populating the logs: >>> >>> LOGs >>> 7735 [Tue, 03 Aug 2010 19:07:05 GMT] [error] [<0.63.0>] >>> {error_report,<0.24.0>, >>> 7736 {<0.63.0>,crash_report, >>> 7737 >>> [[{initial_call,{mochiweb_socket_server,init,['Argument__1']}}, >>> 7738 {pid,<0.63.0>}, >>> 7739 {registered_name,[]}, >>> 7740 {error_info,{exit,eaddrinuse, >>> 7741 [{gen_server,init_it,6}, >>> 7742 {proc_lib,init_p_do_apply,3}]}}, >>> 7743 {ancestors,[couch_secondary_services,couch_server_sup, >>> 7744 <0.2.0>]}, >>> 7745 {messages,[]}, >>> 7746 {links,[<0.53.0>]}, >>> 7747 {dictionary,[]}, >>> 7748 {trap_exit,true}, >>> 7749 {status,running}, >>> 7750 {heap_size,987}, >>> 7751 {stack_size,24}, >>> 7752 {reductions,447}], >>> 7753 []]}} >>> >>> >>> Tim >>> >>> >>> >>> >>> ________________________________ >>> From: Chris Stockton <[email protected]> >>> To: [email protected] >>> Sent: Tue, August 3, 2010 2:45:17 PM >>> Subject: Re: Trying CouchDB / Coucdb-Lucene stack >>> >>> Hello, >>> >>> On Tue, Aug 3, 2010 at 10:54 AM, Timothy Washington >>> <[email protected]> wrote: >>>> Hi there, >>>> >>>> I am able to successfully run CouchDB ( 0.10.0 ). But now I'm trying to >>>> run an >>>> extra module to give me better querying - >>>> couchdb-lucene(http://github.com/rnewson/couchdb-lucene). I can install >>>> and run >>>> the thing correctly. But the indexing doesn't seem to be working in my >>>> case. I >>>> tried using the examples directly from the site. But I keep getting an >>>> error >>>> when I try >>>> 'http://localhost:5984/baron/_fti/_design/foo/by_title?q=CELEBRITY'. >>>> Here's the error output (w/ debug turned on). >>>> >>> >>> I would paste your couchdb and couchdb-lucene ini files. Sounds like >>> it isn't finding the FTI engine. One way you can check that is to go >>> to http://localhost:5984/baron/_fti/ and see if you get the >>> information on the index. Also make sure lucene is indexing docs when >>> you write them, you can check that by deleting the index then cd'n to >>> that directory and make sure new files get written when you try to >>> search. Just some troubleshooting tips from my own findings. >>> >>> -Chris >>> >>> >> >> >> > > >
