couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric casteleijn <>
Subject Strange problems when PUTting to _config
Date Thu, 01 Oct 2009 12:57:43 GMT
[mistakenly sent to user@ previously]

(This is on a snapshot of the 0.10 branch and may be fixed already. 
Since we're seeing this on a production server and not our development
environments, it's hard to write a reliably failing test.)

After a lot of successful (after a fashion[*]) PUTting to and DELETEing
from _config, we're seeing a sudden error in the logs, after which all
subsequent ones seem to fail. The first failure looks like this
(potential security sensitive info *****ed, but looks similar to earlier
successful attempts):

[Fri, 25 Sep 2009 01:41:03 GMT] [debug] [<0.13623.4>] 'PUT'
/_config/admins/50415 {1,1}
Headers: [{'Accept',"application/json"},
           {'Authorization',"OAuth realm=\"\", oauth_nonce=\"*****\",
oauth_timestamp=\"1253842863\", oauth_consumer_key=\"*****\",
oauth_signature_method=\"HMAC-SHA1\", oauth_version=\"1.0\",
oauth_token=\"*****\", oauth_signature=\"*****\""},
           {'User-Agent',"couchdb-python ?"}]

[Fri, 25 Sep 2009 01:41:03 GMT] [debug] [<0.13623.4>] OAuth Params:

[Fri, 25 Sep 2009 01:41:03 GMT] [debug] [<0.44.0>] saving to file
'/etc/couchdb/local.ini', Config: '{{"admins","50415"},

[Fri, 25 Sep 2009 01:41:08 GMT] [error] [<0.13623.4>] Uncaught error in
HTTP request: {exit,


[Fri, 25 Sep 2009 01:41:08 GMT] [info] [<0.13623.4>] Stacktrace:

[Fri, 25 Sep 2009 01:41:08 GMT] [debug] [<0.13623.4>] httpd 500 error


[Fri, 25 Sep 2009 01:41:08 GMT] [info] [<0.13623.4>] - -
'PUT' /_config/admins/50415 500

[Fri, 25 Sep 2009 01:41:08 GMT] [debug] [<0.44.0>] saving to file
'/etc/couchdb/local.ini', Config: '{{"admins","50415"},

NOTE: We get back a 500 (why, I don't know) and after that, the hashed
password is happily written to the file anyway?! (Note also: for
succesful writes, the order is the same, at least in the log file, which
seems wrong: it sends back a 200 OK and then attempts the write to the
.ini file...)

After this, all PUTS to _config seem to fail. Unfortunately it appears
that one of my colleagues in their haste to fix this problem, has
removed the local.ini file and started with a fresh one, so it is
impossible for me to determine what state it was in. (I have asked an
admin who is allowed to look in those files, but there seems to be
nothing strange there now, and the admin user that was being PUT does
not appear there.)

[*] Succesful in that we have to keep trying until we succeed, sometimes
several hundred times. I think this is because some erlang bits need to
be restarted after each write, like the auth_handler? Perhaps that is
what failed to come back up at all after above mishap...

I've been seeing errors like this which seem to suggest that, but I suck
at reading erlang/couchdb tracebacks:

[Fri, 25 Sep 2009 06:52:16 GMT] [error] [<0.3054.5>] {error_report,<0.24.0>,




- eric casteleijn

View raw message