views:

414

answers:

1

I'm trying to create a database in couchdb, which has an admin user/password set, using couchbeam. I've set my credentials in couchdb's local.ini file and restarted. My code to create a db is:

couchbeam:start(),
Params = #couchdb_params{username="test" ,password="pass"},
Connection = couchbeam_server:start_connection_link(Params),
Db = couchbeam_db:create(Connection, "testdb")

At this point Db = {unknown_error, 401}. Am I doing something wrong here? The 401 seems to indicate an authentication error.

My username/password are ok as this works from the command line:

$curl -X PUT http://test:[email protected]:5984/testdb
{"ok":true}

I'm running Ubuntu 9.10, couchdb 0.10.0. couchbeam 0.4.1, Erlang R1301. Any ideas?

+1  A: 

This turned out to be a bug with couchbeam. It has been fixed and the fix published to github.

Jeremy Raymond
Accept your answer so people will know this question is closed.
Zed
Will do - but SO makes you wait 24h before accepting your own answer... so you'll have to wait at least another 6 hours.
Jeremy Raymond