Hi,
I'm using couchdb-0.8.0-incubating, and I'm getting errors every time
I try to run a view. For example, the first test in the test suite
fails with this message in the browser:
Exception raised: {"error":"epipe","reason":"[{erlang,port_command,\n
[#Port<0.177>,\n [91,\n \"\\\"add_fun\\\"\",\n 44,\n \"\\\"(function
(doc) {if (doc.a == 4) {emit(null, doc.b);}})\\\"\",\n 93,\n 10]]},\n
{couch_query_servers,writeline,2},\n {couch_query_servers,prompt,2},\n
{couch_query_servers,'-start_doc_map/2-fun-0-',2},\n
{lists,foreach,2},\n {couch_query_servers,start_doc_map,2},\n
{couch_view,view_compute,2},\n {couch_view,update_group,1}]"}
At the same time, couchdb logs the following:
[info] [<0.66.0>] 127.0.0.1 - - "GET /_utils/image/test_failure.gif" 200
[info] [<0.67.0>] 127.0.0.1 - - "DELETE /test_suite_db/" 200
[info] [<0.67.0>] 127.0.0.1 - - "PUT /test_suite_db/" 201
[info] [<0.67.0>] 127.0.0.1 - - "GET /test_suite_db/" 200
[info] [<0.67.0>] 127.0.0.1 - - "PUT /test_suite_db/0" 201
[info] [<0.67.0>] 127.0.0.1 - - "PUT /test_suite_db/1" 201
[info] [<0.67.0>] 127.0.0.1 - - "PUT /test_suite_db/2" 201
[info] [<0.67.0>] 127.0.0.1 - - "PUT /test_suite_db/3" 201
[info] [<0.67.0>] 127.0.0.1 - - "GET /test_suite_db/" 200
[info] [<0.67.0>] 127.0.0.1 - - "GET /test_suite_db/_all_docs" 200
[info] [<0.92.0>] Spawning new javascript instance.
[error] [emulator] Error in process <0.92.0> with exit value:
{epipe,[{erlang,port_command,[#Port<0.177>,[91,"\"add_fun\"",44,"\"(function
(doc) {if (doc.a == 4) {emit(null,
doc.b);}})\"",93,10]]},{couch_query_servers,writeline,2},{couch_query_servers,prompt,2},{couch_query_servers,'-start_doc_map/2-fun-0-'...
=ERROR REPORT==== 16-Jul-2008::00:37:21 ===
Error in process <0.92.0> with exit value:
{epipe,[{erlang,port_command,[#Port<0.177>,[91,"\"add_fun\"",44,"\"(function
(doc) {if (doc.a == 4) {emit(null,
doc.b);}})\"",93,10]]},{couch_query_servers,writeline,2},{couch_query_servers,prompt,2},{couch_query_servers,'-start_doc_map/2-fun-0-'...
[info] [<0.67.0>] HTTP Error (code 500): {epipe,
[{erlang,
port_command,
[#Port<0.177>,
[91,
"\"add_fun\"",
44,
"\"(function (doc) {if (doc.a == 4)
{emit(null, doc.b);}})\"",
93,
10]]},
{couch_query_servers,writeline,2},
{couch_query_servers,prompt,2},
{couch_query_servers,'-start_doc_map/2-fun-0-',2},
{lists,foreach,2},
{couch_query_servers,start_doc_map,2},
{couch_view,view_compute,2},
{couch_view,update_group,1}]}
[info] [<0.67.0>] 127.0.0.1 - - "POST /test_suite_db/_temp_view" 500
I'm not sure whether this helps, but I tried to see whether the
problem was in the javascript interpreter:
/usr/local/share/couchdb/server$ couchjs main.js
["add_fun","function(doc){emit(null,doc);}"]
true
["add_fun",44,"(function (doc) {if (doc.a == 4) {emit(null, doc.b);}})",93,10]
{"error": "compilation_error","reason": "expression does not eval to a
function. (44)"}
I'm just about out of ideas. My next step is to learn erlang and start
debugging, but I'd prefer not to do that right now.
Can anyone help?
Thanks,
Alex