From user-return-17054-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sat Jul 9 21:12:42 2011 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C775A4AA4 for ; Sat, 9 Jul 2011 21:12:42 +0000 (UTC) Received: (qmail 71186 invoked by uid 500); 9 Jul 2011 21:12:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 71137 invoked by uid 500); 9 Jul 2011 21:12:40 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 71127 invoked by uid 99); 9 Jul 2011 21:12:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 21:12:40 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of doronrotem@gmail.com designates 209.85.160.180 as permitted sender) Received: from [209.85.160.180] (HELO mail-gy0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 21:12:32 +0000 Received: by gyg4 with SMTP id 4so1948476gyg.11 for ; Sat, 09 Jul 2011 14:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+zltO8ODryLfdq2bUbPP0pO6cT3xYEhsxtxz8dCE140=; b=tJjQVraVuJQv+67GECfi1IzC/kmHItJltCKuouW2jbpSpRK1Oqe+Mt4h3TCDYHdwfZ CBvBIVJ/qke05AL3sHY7qVeSo37F4pmrpsC41wcvcw/p5V3gQzget11AuxzuJdvQG8o0 jkKRX/oHRrgBBcgxt38eSaumkq9BEwlmpzZFI= MIME-Version: 1.0 Received: by 10.151.7.5 with SMTP id k5mr3041373ybi.89.1310245931613; Sat, 09 Jul 2011 14:12:11 -0700 (PDT) Received: by 10.150.139.14 with HTTP; Sat, 9 Jul 2011 14:12:11 -0700 (PDT) In-Reply-To: References: Date: Sun, 10 Jul 2011 00:12:11 +0300 Message-ID: Subject: Re: Help using couchdb-lucene 0.6.0 From: Doron Rotem To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd4030e52804804a7a96729 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd4030e52804804a7a96729 Content-Type: text/plain; charset=ISO-8859-1 Thanks for your help, it helped clarify things, but it still doesn't work. i made the changes as you suggested, the hook file is back with 5985, and couchdb-lucene.ini has this content: [couchdb] os_process_timeout=60000 ; increase the timeout from 5 seconds. [external] fti=/Users/doron/.virtualenvs/py24/bin/python /usr/local/Cellar/couchdb-lucene/0.6.0/tools/couchdb-external-hook.py [httpd_db_handlers] _fti = {couch_httpd_external, handle_external_req, <<"fti">>} *[local]* *url = http://localhost:5986/* However the response I get when accessing the view is: {"reason":"Connection to http://localhost:5984 refused","code":500} and the log shows this: WARNING: /local/p_cb/_design/search/by_title: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:5984 refused It seems it tries to reach port 5984, and fails because my couch runs on port 5986. So, I configured couchdb to run on 5984 and it worked. cool! It worked despite the fact that the couchdb-lucene.ini file says couchdb runs on 5986! it seems it doesn't care about these settings. I moved the [local] part to the top of the file. It didn't helped either. Maybe I have some error in my conf file or maybe couchdb-lucene ignores it. I had a look at the code and saw that HttpClientFactory.java have 5984 hardcoded in the method getInstance. Maybe this is the problem. I didn't see it is over written later by the config value, but I only invested a few minutes in this and my understanding of the code is limited. thanks for your help anyway. doron On Sat, Jul 9, 2011 at 6:16 PM, Robert Newson wrote: > Ah, sorry, now I pay closer attention, you have your settings confused. > > The --remote-port is to help couchdb find couchdb-lucene, so you don't > need to change it. > > You do, however, need to tell couchdb-lucene how to find couchdb. If > you look in couchdb-lucene.ini you'll find this; > > # couchdb server mappings > > [local] > url = http://localhost:5984/ > > change this 5984 to 5986 and you should be up and running. > > B. > > On 9 July 2011 16:06, Robert Newson wrote: > > couchdb-lucene should be writing a log in the logs/ subfolder of > > wherever you unpacked the zip or tar to. > > > > I've not tried switching to an alternative port since the first time > > those options were added to the hook script, but it did work at the > > time. > > B. > > > > On 8 July 2011 18:18, Doron Rotem wrote: > >> Hi, > >> > >> Hope this is the right place to ask help on couchdb-lucene. > >> I am trying to use it on Mac OS X 10.6.4 > >> > >> I already had a couchdb running on my mac. I installed couchdb-lucene > using: > >> brew install couchdb-lucene > >> > >> > >> i configured both /usr/local/etc/couchdb/default.ini and > >> /usr/local/etc/couchdb/local.ini: > >> > >> [couchdb] > >> os_process_timeout=60000 ; increase the timeout from 5 seconds. > >> > >> [external] > >> fti=/Users/doron/.virtualenvs/py24/bin/python > >> /usr/local/Cellar/couchdb-lucene/0.6.0/tools/couchdb-external-hook.py > >> --remote-host=http://127.0.0.1 --remote-port=5986 > >> > >> [httpd_db_handlers] > >> _fti = {couch_httpd_external, handle_external_req, <<"fti">>} > >> > >> > >> > >> as you can see my couchdb runs on port 5986, not 5984. > >> i wasn't sure the --remote-port args worked so I changed the > >> couchdb-external-hook.py file to have 5986 as default. > >> > >> > >> Starting couchdb: > >> > >> Apache CouchDB 1.0.2 (LogLevel=info) is starting. > >> Apache CouchDB has started. Time to relax. > >> [info] [<0.31.0>] Apache CouchDB has started on http://127.0.0.1:5986/ > >> > >> > >> > >> Starting couchdb-lucene: > >> > >> /usr/local/Cellar/couchdb-lucene/0.6.0/bin/run > >> > >> 2011-07-07 18:05:06,014 INFO [Main] Index output goes to: > >> /usr/local/Cellar/couchdb-lucene/0.6.0/indexes > >> 2011-07-07 18:05:06,098 INFO [Main] Accepting connections with > >> SelectChannelConnector@localhost:5985 > >> Jul 7, 2011 6:05:06 PM org.mortbay.log.Slf4jLog info > >> INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via > >> org.mortbay.log.Slf4jLog > >> Jul 7, 2011 6:05:06 PM org.mortbay.log.Slf4jLog info > >> INFO: jetty-6.1.20 > >> Jul 7, 2011 6:05:06 PM org.mortbay.log.Slf4jLog info > >> INFO: Started SelectChannelConnector@localhost:5985 > >> > >> > >> > >> my design doc: > >> > >> { > >> "_id": "_design/search", > >> "_rev": "6-ffa3f1a09f6f12f92ce3766c5ebe64f6", > >> "fulltext": { > >> "by_title": { > >> "index": "function(doc) { if (doc.doc_type == 'content' && > >> doc.title) { var ret=new Document(); ret.add(doc.title); return ret; } > }" > >> } > >> }, > >> "language": "javascript" > >> } > >> > >> > >> when i browse to http://127.0.0.1:5985/ i get this response: > >> {"couchdb-lucene":"Welcome","version":"0.6.0"} > >> > >> when i browse to > >> http://127.0.0.1:5986/my-db-name/_fti/_design/search/by_title?q=how i > get > >> this response: > >> {"error":"not_found","reason":"no_db_file"} > >> > >> the logs i see for couchdb are: [info] [<0.103.0>] 127.0.0.1 - - 'GET' > >> /p_cb/_fti/_design/search/by_title?q=how 404 > >> > >> i don't see any logs for couchdb-lucene. > >> > >> I am probably missing a tiny thing, but can't find it. i am not mis > spelling > >> the db name, that's for sure. > >> > >> thanks for your help, > >> > >> > >> > >> -- > >> doron > >> > > > -- doron --000e0cd4030e52804804a7a96729--