Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Getting {"error":"unknown_error","reason":"undef"} for http://localhost:5984/_fti #183

Closed
kumaravadivel opened this issue Nov 26, 2013 · 19 comments

Comments

@kumaravadivel
Copy link

Hi,

I'm install couchdb 1.3.0 and couchdb-lucene-0.8.0-SNAPSHOT. I can verify that it is properly configured by looking at http://localhost:5984/_utils/config.html - there is an entry for _fti in httpd_global_handlers. But when i do curl -X GET http://localhost:5984/_fti i get {"error":"unknown_error","reason":"undef"} instead of the couchdb-lucene welcome message JSON.

I request any help to resolve this.

thanks in advance,
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Nov 26, 2013

Does couchdb work otherwise? What does couch.log say? Look for lines with undef in them.

Not sure why you'd run 0.8.0-SNAPSHOT, there's an actual 0.8.0 release (as well as newer ones).

@kumaravadivel
Copy link
Author

Thanks very much for quick response. Entries from couch.log is :

[Tue, 26 Nov 2013 10:54:35 GMT] [error] [<0.133.0>] Uncaught error in HTTP request: {error,undef}
[Tue, 26 Nov 2013 10:54:35 GMT] [info] [<0.133.0>] Stacktrace: [{couchdb_httpd_proxy,handle_proxy_req,
[{httpd,
{mochiweb_request,#Port<0.2865>,'GET',
"/fti",
{1,1},
{3,
{"user-agent",
{'User-Agent',
"curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3"},
{"host",
{'Host',"localhost:5984"},
{"accept",{'Accept',"
/_"},nil,nil},
nil},
nil}}},
"127.0.0.1",'GET',
[<<"_fti">>],
[<<"_fti">>],
{dict,6,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
{{[[<<"_design">>|
#Fun<couch_httpd.8.126311203>]],
[[<<"_all_docs">>|
#Fun<couch_httpd.8.126311203>]],
[[<<"_view_cleanup">>|
#Fun<couch_httpd.8.126311203>]],
[],[],[],[],[],
[[<<"_compact">>|
#Fun<couch_httpd.8.126311203>]],
[],[],
[[<<"_temp_view">>|
#Fun<couch_httpd.8.126311203>]],
[[<<"_changes">>|
#Fun<couch_httpd.8.126311203>]],
[],[],[]}}},
{user_ctx,null,[],undefined},
undefined,
{dict,7,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
{{[],
[[<<"_show">>|
#Fun<couch_httpd.10.26258678>]],
[[<<"_info">>|
#Fun<couch_httpd.10.26258678>],
[<<"_list">>|
#Fun<couch_httpd.10.26258678>]],
[[<<"_update">>|
#Fun<couch_httpd.10.26258678>]],
[],[],[],[],
[[<<"_compact">>|
#Fun<couch_httpd.10.26258678>]],
[[<<"_rewrite">>|
#Fun<couch_httpd.10.26258678>]],
[],[],[],
[[<<"_view">>|
#Fun<couch_httpd.10.26258678>]],
[],[]}}},
undefined,#Fun<couch_httpd.6.97290151>,
{dict,14,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
{{[[<<"_restart">>|
#Fun<couch_httpd.6.97290151>],
[<<"_replicate">>|
#Fun<couch_httpd.6.97290151>]],
[[<<"_active_tasks">>|
#Fun<couch_httpd.6.97290151>]],
[],[],
[[<<"_utils">>|
#Fun<couch_httpd.5.57039245>],
[<<"/">>|#Fun<couch_httpd.5.57039245>],
[<<"_fti">>|
#Fun<couch_httpd.5.57039245>],
[<<"_config">>|
#Fun<couch_httpd.6.97290151>]],
[[<<"_log">>|
#Fun<couch_httpd.6.97290151>]],
[],[],
[[<<"_all_dbs">>|
#Fun<couch_httpd.6.97290151>]],
[],
[[<<"_stats">>|
#Fun<couch_httpd.6.97290151>],
[<<"favicon.ico">>|
#Fun<couch_httpd.5.57039245>]],
[[<<"_session">>|
#Fun<couch_httpd.6.97290151>],
[<<"_uuids">>|
#Fun<couch_httpd.6.97290151>]],
[],[],
[[<<"_oauth">>|
#Fun<couch_httpd.6.97290151>]],
[]}}}},
<<"http://127.0.0.1:5985">>]},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]
[Tue, 26 Nov 2013 10:54:35 GMT] [info] [<0.133.0>] 127.0.0.1 - - GET /_fti 500
[Tue, 26 Nov 2013 10:54:35 GMT] [error] [<0.133.0>] httpd 500 error response:
{"error":"unknown_error","reason":"undef"}

@kumaravadivel
Copy link
Author

couchdb is working. I get the same error in couchdb-lucene-0.9.0-SNAPSHOT.

Thanks very much
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Nov 26, 2013

What does;

curl localhost:5984/_config/httpd_global_handlers/_fti

and

curl localhost:5985/

return?

@kumaravadivel
Copy link
Author

  1. couchdb@kumar:~$ curl localhost:5984/_config/httpd_global_handlers/_fti , I am getting curl: (7) couldn't connect to host

2.kumar@kumar:~$ curl localhost:5984/_config/httpd_global_handlers/_fti
{"error":"unauthorized","reason":"You are not a server admin."}

  1. For curl localhost:5985/ , I am getting {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"}

Thanks very much
kumaravadivel

@kumaravadivel
Copy link
Author

kumar@kumar:~$ curl admin:admin@localhost:5984/_config/httpd_global_handlers/_fti
"{couchdb_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985\">>}"

For curl localhost:5985/ , I am getting {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"}

Thanks very much,
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Nov 27, 2013

redo those and authenticate as admin please.

@rnewson
Copy link
Owner

rnewson commented Dec 3, 2013

closed for inaction from reporter.

@kumaravadivel
Copy link
Author

sorry for not responding so for, i am not understand your query.
now i am re-posting my problem as admin .

kumar@kumar:~$ curl admin:admin@localhost:5984/config/httpdglobal_handlers/fti
"{couchdbhttpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985\">>}"

For curl localhost:5985/ , I am getting {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"}

Thanks very much
kumaravadivel

@rnewson rnewson reopened this Dec 5, 2013
@rnewson
Copy link
Owner

rnewson commented Dec 5, 2013

Hi, thanks for getting back to me. Can you show me what;

curl http://localhost:5984/_fti 

returns now? When you include your output, please put 4 spaces at the front of each line, this will ensure it is formatted correctly.

@kumaravadivel
Copy link
Author

Thanks very much for your response,

kumar@kumar:~$ curl http://localhost:5984/fti

Output message:

{"error":"not_found","reason":"no_db_file"}

Thanks very much,
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Dec 5, 2013

are you doing _fti or fti there? That is, are you missing the leading underscore?

@kumaravadivel
Copy link
Author

kumar@kumar:~$ curl http://localhost:5984/_fti

{"error":"unknown_error","reason":"undef"}

Thanks,
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Dec 5, 2013

ok please show

curl admin:admin@localhost:5984/_config/httpd_global_handlers/_fti

remember that the "fti" has an underscore before it, it should show exactly;

"{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}"

and please add the four spaces at the front to ensure it renders properly, the exact output is important.

@kumaravadivel
Copy link
Author

yes,its shows the output exactly as what you mentioned

curl admin:admin@localhost:5984/_config/httpd_global_handlers/_fti

output message:

"{couchdb_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}"

Thanks very much
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Dec 5, 2013

hi,

"couchdb_httpd_proxy" is not the same as "couch_httpd_proxy", this explains why you get undef.

Do;

curl admin:admin@localhost:5984/_config/httpd_global_handlers/_fti -XPUT -d '"{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}"'

And it will be fixed.

@kumaravadivel
Copy link
Author

now i am getting the output message what u mentioned.

  curl admin:admin@localhost:5984/_config/httpd_global_handlers/_fti -XPUT -d '"{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}"'

   output:
  "{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}"

Thanks very much,
kumaravadivel

@rnewson
Copy link
Owner

rnewson commented Dec 5, 2013

good, so it's working now, yes?

@kumaravadivel
Copy link
Author

yes, its working good. In my application small error i am rectifying that. i ll check completely all and inform u back.

Thanks very much for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants