Mark Needham

Thoughts on Software Development

Archive for the ‘futon’ tag

CouchDB/Futon: ‘_all_dbs’ call returns databases with leading ‘c/’

with one comment

As I mentioned in my previous post I’ve been playing around with CouchDB and one of the problems that I’ve been having is that although I can access my database through the REST API perfectly fine, whenever I went to the Futon page (‘http://localhost:5984/_utils/’ in my case) to view my list of databases I was getting the following javascript error:

Database information could not be retrieved: missing

I thought I’d have a quick look with FireBug to see if I could work out what was going on and saw several requests being made to the following urls and resulting in 404s:

  • http://localhost:5984/c%2Fsharpcouch/
  • http://localhost:5984/c%2Fmark_erlang/

The value ‘c/’ was being added to the front of each of my database names, therefore meaning that Futon was unable to display the various attributes on the page for each of them.

Tracing this further I realised that the call to ‘http://localhost:5984/_all_dbs’ was actually the one that was failing, and calling it directly from ‘erl’ was resulting in the same error:

> couch_server:all_databases().
 
{ok,["c/mark_erlang","c/sharpcouch","c/test_suite_db"]}

I don’t know Erlang well enough to try and change the code to fix this problem but I came across a bug report on the CouchDB website which described exactly the problem I’ve been having.

Apparently there is a problem when you use an upper case ‘C’ for the ‘DbRootDir’ property in ‘couch.ini’. Changing that to a lower case ‘c’ so that my ‘couch.ini’ file now looks like this solved the problem:

DbRootDir=c:/couchdb/db

Written by Mark Needham

May 31st, 2009 at 11:28 pm

Posted in CouchDB

Tagged with ,