在对CouchDB进行REST调用时,请求失败并显示未知错误500.任何帮助都将非常感谢...谢谢!
以下是日志:
[Thu, 30 Oct 2014 20:47:50 GMT] [debug] [] 'GET' /settings/master-config? {1,1} from "10.48.XX.XXX" Headers: [{'Authorization',"Basic XXX=, Basic XXX=="}, {'Connection',"Keep-Alive"}, {'Host',"127.0.0.1:5984"}, {'User-Agent',"Apache-HttpClient/4.2.2 (java 1.5)"}, {'X-Forwarded-For',"10.48.xx.xxx"}, {"X-Forwarded-Host","my.couchdb.server.com"}, {"X-Forwarded-Server","ip-10-48-xx-xxx.ec2.internal"}, {"X-Newrelic-Id","XXXX="}, {"X-NewRelic-Transaction","XXXXXXX"}] [Thu, 30 Oct 2014 20:47:50 GMT] [debug] [] OAuth Params: [] [Thu, 30 Oct 2014 20:47:50 GMT] [error] [] function_clause error in HTTP request [Thu, 30 Oct 2014 20:47:50 GMT] [info] [] Stacktrace: [{base64,b64d_ok,[eq]}, {base64,decode,2}, {base64,decode,1}, {couch_httpd_auth,basic_name_pw,1}, {couch_httpd_auth, default_authentication_handler,1}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}] [Thu, 30 Oct 2014 20:47:50 GMT] [info] [] 10.48.XX.XXX - - GET /settings/master-config? 500 [Thu, 30 Oct 2014 20:47:50 GMT] [error] [] httpd 500 error response: {"error":"unknown_error","reason":"function_clause"}
答案 0 :(得分:2)
您的授权标题看起来很奇怪:{'Authorization',"Basic XXX=, Basic XXX=="}
- 应该只有一个基本凭证令牌,而不是多个凭证令牌。