Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

couchdb-external-hook.py problem #144

Closed
cmadsen opened this Issue · 2 comments

2 participants

Carsten Madsen Robert Newson
Carsten Madsen

I have a problem with the couchdb-external-hook.py

curl 'http://localhost:5984'
{"couchdb":"Welcome","version":"1.0.2"}
curl 'http://localhost:5985'
{"couchdb-lucene":"Welcome","version":"0.8.0-SNAPSHOT"}
uname -a
Linux localhost 2.6.41.1-1.fc15.i686

When it is called by couchdb I get a HTTP 500 error. However if I past the input into couchdb-external-hook.py I get a correct answer back.

python couchdb-external-hook.py
{"info":{"db_name":"test","doc_count":1,"doc_del_count":0,"update_seq":2,"purge_seq":0,"compact_running":false,"disk_size":8281,"instance_start_time":"1322557480255446","disk_format_version":5,"committed_update_seq":2},"id":null,"uuid":"9f1acbe7d7da6fbc05aeba79fc002485","method":"GET","path":["test","_fti","_design","lucene","by_title"],"query":{"q":"First"},"headers":{"Accept":"/","Host":"localhost:5984","User-Agent":"curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.10.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7"},"body":"undefined","peer":"127.0.0.1","form":{},"cookie":{},"userCtx":{"db":"test","name":null,"roles":[]}}
{"body": "{\"limit\":25,\"etag\":\"7812bf25071\",\"fetch_duration\":0,\"q\":\"default:first\",\"search_duration\":6,\"total_rows\":0,\"skip\":0,\"rows\":[]}", "headers": {"ETag": "7812bf25071", "Content-Type": "text/plain; charset=utf-8"}, "code": 200}

Any hints?

[Tue, 29 Nov 2011 09:31:31 GMT] [debug] [] OAuth Params: [{"q","First"}]

[Tue, 29 Nov 2011 09:31:31 GMT] [info] [] EXTERNAL: Starting process for: fti

[Tue, 29 Nov 2011 09:31:31 GMT] [info] [] COMMAND: python /opt/couchdb-lucene-0.8.0/tools/couchdb
-external-hook.py

[Tue, 29 Nov 2011 09:31:31 GMT] [debug] [] OS Process Start :: #Port

[Tue, 29 Nov 2011 09:31:31 GMT] [debug] [] OS Process #Port Input :: {"info":{"db_name":
"test","doc_count":1,"doc_del_count":0,"update_seq":2,"purge_seq":0,"compact_running":false,"disk_size":12
379,"instance_start_time":"1322559042049515","disk_format_version":5,"committed_update_seq":2},"id":null,"
uuid":"5f220e4b859913543f718c8f9100199f","method":"GET","path":["test","_fti","_design","lucene","by_title
"],"query":{"q":"First"},"headers":{"Accept":"/","Host":"localhost:5984","User-Agent":"curl/7.21.3 (i386
-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.10.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7"},"body":"undefined",
"peer":"127.0.0.1","form":{},"cookie":{},"userCtx":{"db":"test","name":null,"roles":[]}}

[Tue, 29 Nov 2011 09:31:31 GMT] [error] [] OS Process Error :: {os_process_error,{exit_
status,2}}

[Tue, 29 Nov 2011 09:31:31 GMT] [error] [] ** Generic server terminating
** Last message in was {execute,
{[{<<"info">>,
{[{db_name,<<"test">>},
{doc_count,1},
{doc_del_count,0},
{update_seq,2},
{purge_seq,0},
{compact_running,false},
{disk_size,12379},
{instance_start_time,<<"1322559042049515">>},
{disk_format_version,5},
{committed_update_seq,2}]}},
{<<"id">>,null},
{<<"uuid">>,
<<"5f220e4b859913543f718c8f9100199f">>},
{<<"method">>,'GET'},
{<<"path">>,
[<<"test">>,<<"_fti">>,<<"_design">>,
<<"lucene">>,<<"by_title">>]},
{<<"query">>,{[{<<"q">>,<<"First">>}]}},
{<<"headers">>,
{[{<<"Accept">>,<<"/">>},
{<<"Host">>,<<"localhost:5984">>},
{<<"User-Agent">>,
<<"curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.10.0 zlib/
1.2.5 libidn/1.19 libssh2/1.2.7">>}]}},
{<<"body">>,undefined},
{<<"peer">>,<<"127.0.0.1">>},
{<<"form">>,{[]}},
{<<"cookie">>,{[]}},
{<<"userCtx">>,
{[{<<"db">>,<<"test">>},
{<<"name">>,null},
{<<"roles">>,[]}]}}]}}
** When Server state == {"fti",
"python /opt/couchdb-lucene-0.8.0/tools/couchdb-external-hook.py",
}
** Reason for termination ==
** {bad_return_value,{os_process_error,{exit_status,2}}}
[Tue, 29 Nov 2011 09:31:31 GMT] [error] [] {error_report,,
{,crash_report,
[[{initial_call,{couch_external_server,init,['Argument__1']}},
{pid,},
{registered_name,[]},
{error_info,
{exit,
{bad_return_value,{os_process_error,{exit_status,2}}},
[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
{ancestors,
[couch_external_manager,couch_secondary_services,couch_server_sup,
]},
{messages,[{'EXIT',,normal}]},
{links,[]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,987},
{stack_size,24},
{reductions,226}],
[]]}}

[Tue, 29 Nov 2011 09:31:31 GMT] [error] [] Uncaught error in HTTP request: {exit,
{{bad_return_value,
{os_process_error,{exit_status,2}}},
{gen_server,call,
[,
{execute,
{[{<<"info">>,
{[{db_name,<<"test">>},
{doc_count,1},
{doc_del_count,0},
{update_seq,2},
{purge_seq,0},
{compact_running,false},
{disk_size,12379},
{instance_start_time,
<<"1322559042049515">>},
{disk_format_version,5},
{committed_update_seq,2}]}},
{<<"id">>,null},
{<<"uuid">>,
<<"5f220e4b859913543f718c8f9100199f">>},
{<<"method">>,'GET'},
{<<"path">>,
[<<"test">>,<<"_fti">>,<<"_design">>,
<<"lucene">>,<<"by_title">>]},
{<<"query">>,{[{<<"q">>,<<"First">>}]}},
{<<"headers">>,
{[{<<"Accept">>,<<"/">>},
{<<"Host">>,<<"localhost:5984">>},
{<<"User-Agent">>,
<<"curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.10.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7">>}]}},
{<<"body">>,undefined},
{<<"peer">>,<<"127.0.0.1">>},
{<<"form">>,{[]}},
{<<"cookie">>,{[]}},
{<<"userCtx">>,
{[{<<"db">>,<<"test">>},
{<<"name">>,null},
{<<"roles">>,[]}]}}]}},
infinity]}}}
[Tue, 29 Nov 2011 09:31:31 GMT] [info] [] EXTERNAL: Server died. (reason: {bad_return_value,
{os_process_error,{exit_status,2}}})

[Tue, 29 Nov 2011 09:31:31 GMT] [info] [] Stacktrace: [{gen_server,call,3},
{couch_httpd_external,process_external_req,3},
{couch_httpd_db,do_db_req,2},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]

[Tue, 29 Nov 2011 09:31:31 GMT] [error] [] {error_report,,
{,supervisor_report,
[{supervisor,{local,couch_secondary_services}},
{errorContext,child_terminated},
{reason,normal},
{offender,[{pid,},
{name,external_manager},
{mfargs,{couch_external_manager,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]}]}}

Robert Newson
Owner

Try specifying the full path to python?

Carsten Madsen

permission issue

Carsten Madsen cmadsen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.