Reputation: 151
When making a REST call to CouchDB, the request fails with unknown error 500. Any help would be much appreciated... thanks!
Here are the logs:
[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"}
Upvotes: 0
Views: 1178
Reputation: 4679
Your Authorization header looks weird: {'Authorization',"Basic XXX=, Basic XXX=="}
- there should be only single Basic credentials token, not multiple ones.
Upvotes: 2