2009/03/17

CouchDB Startup Fix

László Bácsi, a Ruby hacker at Virgo Systems told me that he ran every time into a problem with his experimental Bible Reader app (Hungarian), namely that his CouchDB server doesn't start during the boot sequence.

I think I solved this problem by adding a few parameters to the init script. Here is my solution. I installed the svn version of CouchDB on a 64bit Ubuntu server on a VmWare box. I simply followed the excellent install instructions in the README file.

I think it is essential to create the couchdb (or equivalent) user to run the db - its not just the security hole but it seems running the init script as root gives false feedback at boot; the OS reports that the db is running but it is not the case at all. I don't see why at the moment.

I modified a bit the permissions for couchdb user:

I modified the path of the pid file to reflect these settings as well.

Additionally I added a few params to the init script at /etc/init.d/couchdb:


With these slight modifications I successfully enabled CouchDB to start up at boot.

Happy hacking!

1 comments:

LacKac said...

Thanks, it worked for me as well.