On Thu, Oct 29, 2009 at 5:26 PM, Chris Stockton wrote: > Hello, > > Creating a simple view such as function(doc) { emit(null, doc); }, > will fail with subject. This happens when executing both temporary > view or one I create. The database is extremely simple. I think this > may be in my setup? I am not sure, seems any view fails. I would > appreciate any help in tracking this down. > It looks like you're couchjs process isn't booting properly. Maybe an installation / permissions issue. I'm guessing your test suite is failing too. A basic test you can run (from the couchdb src directory), is this: $ couchjs share/server/main.js then type: ["reset"] and you should see: true > Regards, > > -Chris > > -- > > Document number 1: > { >   "_id": "xdcRU8WukSeO", >   "_rev": "1-a4472fb3b8b66dc3ffced25dc4e035cf", >   "type": "contact", >   "data": { >       "Name": "Name num 0", >       "Phone Number": "0 0 0 0", >       "Email": "0@0.com", >       "Message": "Message 0" >   } > } ... Through document number 9 ... { >   "_id": "1FHmEFk6cv6v", >   "_rev": "1-710fbefdbac372c501de009af476568c", >   "type": "contact", >   "data": { >       "Name": "Name num 9", >       "Phone Number": "9 9 9 9", >       "Email": "9@9.com", >       "Message": "Message 9" >   } > } > > Error Log: > > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] 'POST' > /example_db/_temp_view?limit=11 {1,1} > Headers: [{'Accept',"application/json, text/javascript, */*"}, >          {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.3"}, >          {'Accept-Encoding',"gzip,deflate,sdch"}, >          {'Accept-Language',"en-US,en;q=0.8"}, >          {'Authorization',"Basic bmV0d29yazpzYXZldGhlU1FM"}, >          {'Connection',"keep-alive"}, >          {'Content-Length',"72"}, >          {'Content-Type',"application/json"}, >          {'Host',":5984"}, >          {"Origin","http://:5984"}, >          {'Referer',"http:// host>:5984/_utils/database.html?example_db/_temp_view"}, >          {'User-Agent',"Mozilla/5.0 (Windows; U; Windows NT 5.1; > en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 > Safari/532.0"}, >          {"X-Requested-With","XMLHttpRequest"}] > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] OAuth Params: > [{"limit","11"}] > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.52.0>] Spawning new group > server for view group _temp in database example_db. > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] request_group > {Pid, Seq} {<0.714.0>,16} > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.48.0>] New task status for > example_db _temp: Processed 0 of 13 changes (0%) > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.48.0>] New task status for > example_db _temp: Finishing. > [Fri, 30 Oct 2009 07:19:15 GMT] [error] [<0.717.0>] OS Process Error > :: {os_process_error,{exit_status,127}} > [Fri, 30 Oct 2009 07:19:15 GMT] [error] [emulator] Error in process > <0.717.0> with exit value: > {{nocatch,{os_process_error,{exit_status,127}}},[{couch_os_process,prompt,2},{couch_query_servers,'-start_doc_map/2-fun-0-',2},{lists,foreach,2},{couch_query_servers,start_doc_map,2},{couch_view_updater,view_compute... > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.695.0>] Unknown linked > process died: <0.719.0> (reason: normal) > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.714.0>] Uncaught throw() > in linked pid: {<0.717.0>, >                                 {os_process_error,{exit_status,127}}} > [Fri, 30 Oct 2009 07:19:15 GMT] [error] [<0.714.0>] ** Generic server > <0.714.0> terminating > ** Last message in was {'EXIT',<0.717.0>, >                           {{nocatch,{os_process_error,{exit_status,127}}}, >                            [{couch_os_process,prompt,2}, >                             {couch_query_servers,'-start_doc_map/2-fun-0-',2}, >                             {lists,foreach,2}, >                             {couch_query_servers,start_doc_map,2}, >                             {couch_view_updater,view_compute,2}, >                             {couch_view_updater,update,2}]}} > ** When Server state == {group_state,undefined,<<"example_db">>, >                         {"/usr/local/var/lib/couchdb", >                          <<"example_db">>, >                          {group, >                           <<31,170,227,209,242,10,95,198,53,255,160,254,154, >                             112,168,153>>, >                           {db,<0.460.0>,<0.461.0>,nil, >                            <<"1256886983248549">>,<0.458.0>,<0.462.0>, >                            {db_header,4,15,0, >                             {20596,{11,2}}, >                             {21609,13}, >                             nil,0,nil,nil,1000}, >                            15, >                            {btree,<0.458.0>, >                             {24692,{10,3}}, >                             #Fun, >                             #Fun, >                             #Fun, >                             #Fun}, >                            {btree,<0.458.0>, >                             {25745,13}, >                             #Fun, >                             #Fun, >                             #Fun, >                             #Fun}, >                            {btree,<0.458.0>,nil, >                             #Fun, >                             #Fun, >                             #Fun,nil}, >                            16,<<"example_db">>, >                            "/usr/local/var/lib/couchdb/example_db.couch", >                            [],[],nil, >                            {user_ctx,null,[]}, >                            #Ref<0.0.0.9133>,1000, >                            [before_header,after_header,on_file_open]}, >                           nil,<<"_temp">>,<<"javascript">>,[], >                           [{view,0, >                             [<<"_temp">>], >                             <<"function(doc) {\n  emit(null, doc);\n}">>,nil, >                             []}], >                           nil,0,0,nil,nil}}, >                         {group, >                          <<31,170,227,209,242,10,95,198,53,255,160,254,154, >                            112,168,153>>, >                          {db,<0.460.0>,<0.461.0>,nil,<<"1256886983248549">>, >                           <0.458.0>,<0.462.0>, >                           {db_header,4,15,0, >                            {20596,{11,2}}, >                            {21609,13}, >                            nil,0,nil,nil,1000}, >                           15, >                           {btree,<0.458.0>, >                            {24692,{10,3}}, >                            #Fun, >                            #Fun, >                            #Fun, >                            #Fun}, >                           {btree,<0.458.0>, >                            {25745,13}, >                            #Fun, >                            #Fun, >                            #Fun, >                            #Fun}, >                           {btree,<0.458.0>,nil,#Fun, >                            #Fun, >                            #Fun,nil}, >                           16,<<"example_db">>, >                           "/usr/local/var/lib/couchdb/example_db.couch", >                           [],[],nil, >                           {user_ctx,null,[]}, >                           #Ref<0.0.0.9133>,1000, >                           [before_header,after_header,on_file_open]}, >                          <0.715.0>,<<"_temp">>,<<"javascript">>,[], >                          [{view,0, >                            [<<"_temp">>], >                            <<"function(doc) {\n  emit(null, doc);\n}">>, >                            {btree,<0.715.0>,nil, >                             #Fun, >                             #Fun, >                             #Fun, >                             #Fun}, >                            []}], >                          {btree,<0.715.0>,nil,#Fun, >                           #Fun, >                           #Fun,nil}, >                          0,0,nil,nil}, >                         <0.717.0>,nil,false, >                         [{{<0.682.0>,#Ref<0.0.0.10843>},16}], >                         <0.718.0>} > ** Reason for termination == > ** {os_process_error,{exit_status,127}} > [Fri, 30 Oct 2009 07:19:15 GMT] [error] [<0.714.0>] {error_report,<0.22.0>, >    {<0.714.0>,crash_report, >     [[{initial_call,{couch_view_group,init,['Argument__1']}}, >       {pid,<0.714.0>}, >       {registered_name,[]}, >       {error_info, >           {exit, >               {os_process_error,{exit_status,127}}, >               [{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}}, >       {ancestors, >           [couch_view,couch_secondary_services,couch_server_sup,<0.1.0>]}, >       {messages,[]}, >       {links,[<0.715.0>,<0.52.0>]}, >       {dictionary,[]}, >       {trap_exit,true}, >       {status,running}, >       {heap_size,1597}, >       {stack_size,24}, >       {reductions,376}], >      [{neighbour, >           [{pid,<0.718.0>}, >            {registered_name,[]}, >            {initial_call,{couch_ref_counter,init,['Argument__1']}}, >            {current_function,{gen_server,loop,6}}, >            {ancestors, >                [<0.714.0>,couch_view,couch_secondary_services, >                 couch_server_sup,<0.1.0>]}, >            {messages,[]}, >            {links,[<0.715.0>]}, >            {dictionary,[]}, >            {trap_exit,false}, >            {status,waiting}, >            {heap_size,233}, >            {stack_size,9}, >            {reductions,47}]}, >       {neighbour, >           [{pid,<0.715.0>}, >            {registered_name,[]}, >            {initial_call,{couch_file,init,['Argument__1']}}, >            {current_function,{gen_server,loop,6}}, >            {ancestors, >                [<0.714.0>,couch_view,couch_secondary_services, >                 couch_server_sup,<0.1.0>]}, >            {messages,[]}, >            {links,[<0.714.0>,<0.718.0>,#Port<0.1604>]}, >            {dictionary,[]}, >            {trap_exit,false}, >            {status,waiting}, >            {heap_size,987}, >            {stack_size,9}, >            {reductions,1403}]}]]}} > [Fri, 30 Oct 2009 07:19:15 GMT] [error] [<0.51.0>] {error_report,<0.22.0>, >              {<0.51.0>,supervisor_report, >               [{supervisor,{local,couch_secondary_services}}, >                {errorContext,child_terminated}, >                {reason,normal}, >                {offender,[{pid,<0.695.0>}, >                           {name,query_servers}, >                           {mfa,{couch_query_servers,start_link,[]}}, >                           {restart_type,permanent}, >                           {shutdown,brutal_kill}, >                           {child_type,worker}]}]}} > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] request_group > Error {os_process_error,{exit_status,127}} > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] Minor error in > HTTP request: {os_process_error,{exit_status,127}} > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] Stacktrace: > [{couch_view_group,request_group,2}, >             {couch_view,get_temp_map_view,4}, >             {couch_httpd_view,handle_temp_view_req,2}, >             {couch_httpd_db,do_db_req,2}, >             {couch_httpd,handle_request,5}, >             {mochiweb_http,headers,5}, >             {proc_lib,init_p_do_apply,3}] > [Fri, 30 Oct 2009 07:19:15 GMT] [debug] [<0.682.0>] httpd 500 error response: >  {"error":"os_process_error","reason":"{exit_status,127}"} > [Fri, 30 Oct 2009 07:19:15 GMT] [info] [<0.682.0>] - - > 'POST' /example_db/_temp_view?limit=11 500 > -- Chris Anderson http://jchrisa.net http://couch.io