Noah, here is the result of the PID run as the couchdb user: r...@default:/usr/bin$ sudo -u couchdb couchdb -b -p /var/run/couchdb + BACKGROUND=false + DEFAULT_CONFIG_DIR=/etc/couchdb/default.d + DEFAULT_CONFIG_FILE=/etc/couchdb/default.ini + HEART_BEAT_TIMEOUT=11 + HEART_COMMAND=/usr/bin/couchdb -k + INTERACTIVE=false + KILL=false + LOCAL_CONFIG_DIR=/etc/couchdb/local.d + LOCAL_CONFIG_FILE=/etc/couchdb/local.ini + PID_FILE=/var/run/couchdb/couchdb.pid + RECURSED=false + RESET_CONFIG=true + RESPAWN_TIMEOUT=0 + SCRIPT_ERROR=1 + SCRIPT_OK=0 + SHUTDOWN=false + STDERR_FILE=couchdb.stderr + STDOUT_FILE=couchdb.stdout + print_arguments= + start_arguments= + background_start_arguments= + xulrunner-1.9.1 --gre-version + LD_LIBRARY_PATH=:/usr/lib/xulrunner-1.9.1.4/ + export LD_LIBRARY_PATH + basename /usr/bin/couchdb + basename=couchdb + parse_script_option_list -b -p /var/run/couchdb + _load_config + _add_config_file /etc/couchdb/default.ini + test -n + test -z + print_arguments=/etc/couchdb/default.ini + start_arguments= \"/etc/couchdb/default.ini\" + background_start_arguments= -a \"/etc/couchdb/default.ini\" + _add_config_dir /etc/couchdb/default.d + find /etc/couchdb/default.d -mindepth 1 -maxdepth 1 -type f + _add_config_file /etc/couchdb/local.ini + test -n \"/etc/couchdb/default.ini\" + start_arguments= \"/etc/couchdb/default.ini\", + test -z /etc/couchdb/default.ini + cat + print_arguments=/etc/couchdb/default.ini /etc/couchdb/local.ini + start_arguments= \"/etc/couchdb/default.ini\", \"/etc/couchdb/local.ini\" + background_start_arguments= -a \"/etc/couchdb/default.ini\" -a \"/etc/couchdb/local.ini\" + _add_config_dir /etc/couchdb/local.d + find /etc/couchdb/local.d -mindepth 1 -maxdepth 1 -type f + set +e + getopt hVa:A:ncibp:r:Ro:e:skd -b -p /var/run/couchdb + options= -b -p /var/run/couchdb -- + test ! 0 -eq 0 + set -e + eval set -- -b -p /var/run/couchdb -- + set -- -b -p /var/run/couchdb -- + [ 4 -gt 0 ] + shift + BACKGROUND=true + [ 3 -gt 0 ] + shift + PID_FILE=/var/run/couchdb + shift + [ 1 -gt 0 ] + shift + break + test false = true -o false = true + start_couchdb + test ! false = true + check_status + check_environment + test true != true + touch /var/run/couchdb + touch couchdb.stdout + true + touch couchdb.stderr + true + message_prefix=Apache CouchDB needs write permission on the + test ! -w /var/run/couchdb + test ! -w couchdb.stdout + echo Apache CouchDB needs write permission on the STDOUT file: couchdb.stdout Apache CouchDB needs write permission on the STDOUT file: couchdb.stdout + false r...@default:/usr/bin$
On Wed, Nov 11, 2009 at 4:32 PM, Noah Slater <[email protected]> wrote: > > On 11 Nov 2009, at 13:53, Robert Campbell wrote: > >> @Mikhail - but when I tried to specify the PID file I found in >> /var/run, it didn't work: >> >> r...@default:~# couchdb -b -p /var/run/couchdb >> Apache CouchDB needs a regular PID file: /var/run/couchdb > > You likely don't have permissions to do this. > > Could you try running it as the couchdb user, like this: > > sudo -u couchdb couchdb -b -p /var/run/couchdb > > What happens then? > >> I just want the init.d scripts to work as they're supposed to. Is >> there some special trick you have to perform after "apt-get install >> couchdb"? I can't imagine I'm the only one whose init.d/couchdb won't >> stop the DB in two completely different Ubuntu & CouchDB versions and >> installations. > > No, this is a bug, that much is certain. > >
