Hey folks. I’m setting up my first CouchDB instance for an internal project, and am running into an error on start-up. I was wondering if anybody could help.
In short, I’m trying to run CouchDB like we run Apache. We have Apache installed in a shared, unwritable filesystem. To run an instance, one copies the apachectl file and the default configuration file, edits apachectl to point to the config file copy, then edits the config file to point to local log directories and perform other custom configurations. When ‘apachectl start’ is run, it uses the binaries from the shared area and the custom config, and runs great.
To mimic this, I copied bin/couchdb to a local area as well as etc/local.*. I edited bin/couchdb to point to local files where necessary:
> diff /tools/couchdb/1.2.0/Linux_x86_64/bin/couchdb bin/couchdb
< HEART_COMMAND="/tools/couchdb/1.2.0/Linux_x86_64/bin/couchdb -k"
< LOCAL_CONFIG_DIR=/tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/local.d
< LOCAL_CONFIG_FILE=/tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/local.ini
< PID_FILE=/tools/couchdb/1.2.0/Linux_x86_64/var/run/couchdb/couchdb.pid
> LOCAL_CONFIG_DIR=/webserver/couchdb/etc/local.d
> LOCAL_CONFIG_FILE=/webserver/couchdb/etc/local.ini
> PID_FILE=/webserver/couchdb/couchdb.pid
Using the -c startup option, this appears to be fine:
> bin/couchdb -c
My etc/local.ini file is also changed minimally, mainly to point things at local paths (and turn on debugging):
> diff /tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/local.ini etc/local.ini
> database_dir = /webserver/couchdb/db
> view_index_dir = /webserver/couchdb/db
< ;bind_address =
> bind_address = *
< ;level = debug
> file = /webserver/logs/couchdb/couch.log
> level = debug
Startup at this point dumps a lot of debug output, and everything seems to be as I configured it. I’ll only include the things that reflect changes that I’ve made; let me know if you want to see the entire output.
> bin/couchdb
Apache CouchDB 1.2.0 (LogLevel=debug) is starting.
Configuration Settings ["/tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/default.ini",
  [couchdb] database_dir="/webserver/couchdb/db"
  [couchdb] view_index_dir="/webserver/couchdb/db"
  [httpd] bind_address="*"
  [log] file="/webserver/logs/couchdb/couch.log"
  [log] level="debug"
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/default.ini","/tools/couchdb/1.2.0/Linux_x86_64/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{application_master,start_it_old,4}]}}}}}},[{couch,start,0},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
All the other debug outputs are the same as the values found in default.ini, so it appears that my local.ini is being seen and parsed. Can anybody explain what they cryptic error might mean? :) Thanks!
Doug Shea
Lead Engineer

The information contained in this communication may be CONFIDENTIAL and is intended only for the use of the recipient(s) named above. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please notify the sender and delete/destroy the original message and any copy of it from your computer or paper files.