incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <d...@muse.net.nz>
Subject Re: Error calling external process
Date Mon, 31 May 2010 10:03:25 GMT
On 31 May 2010 21:31, Mahendra Kariya <mahendrakariya@gmail.com> wrote:
> I am running couchdb from root user. The command that I specified in
> my_process is working in root.
>
> CouchDB log says
> [info] [<0.95.0>] 127.0.0.1 - - 'GET' /microatm/my_process 404

Try this instead:

$ curl http://127.0.0.1:5984/microatm/_my_process

Your httpd_db_handler URL is the first parameter in the ini file, not
the <<"my_process">> bit, which is a pointer for couchdb to find the
actual script in the [external] section.

If you have the following diff against local.ini:

> [external]
> mango = /opt/local/bin/couch_external_process.py
>
> [httpd_db_handlers]
> _test = {couch_httpd_external, handle_external_req, <<"mango">>}
>

your URL is /microatm/_test
and not /microatm/mango or /microatm/_mango

when I try an incorrect URL I get your error:
dave@continuity:/Users/dave $ curl http://localhost:5984/sofa/mango

{"error":"not_found","reason":"missing"}
dave@continuity:/Users/dave $ curl http://localhost:5984/sofa/_mango

{"error":"not_found","reason":"missing"}
but the correct URL is fine:
dave@continuity:/Users/dave $ curl http://localhost:5984/sofa/_test
                                              {"qs":{}}%

you also seem to have a typo in your local.ini file from above -
you've got a double _underscore_ in httpd_db_handler.

_my__process should really be
_my_process

A+
Dave

Mime
View raw message