Saturday, October 20, 2012

CouchDB Tip: When You Can't Stop the Admin Party

I was setting up a new CouchDB 1.2 server today on Ubuntu Server, specifically following this excellent guide since sudo apt-get install couchdb still gets you CouchDB 0.10. Serious WTF on the fact that the apt installation method is years out of date -- maybe I should figure out who to talk to about it and volunteer to maintain the packages if it's just a matter of people not having time.

The installation went fine until I attempted to turn off the admin party, at which point after I submitted the form containing the initial admin user's name and password things just spun indefinitely. And apparently adding the admin user info manually to the [admin] section of the local.ini file no longer works, since it doesn't automatically encrypt the password you type into the file on a server restart like it used to.

Long and short of it is if you see this happening, chances are there's a permission problem with your config files, which are stored (if you compile from source) in /usr/local/etc/couchdb. In my case that directory and the files therein were owned by root and I'm not running CouchDB as root, so when I tried to fix the admin party the user that's running CouchDB didn't have permission to write to the files.

A quick chown on that directory structure and you're back to being an admin party pooper.


martha meyer said...
This comment has been removed by a blog administrator.
Nikola Rankovic said...

Thanks this helped out a lot! :)