I get this message when trying to start Couchbase and can't make heads or tails of how to fix it. (I probably have random entrails from an earlier failed install of the macports couchdb before I upgraded to OSX 10.6, but not sure if that has anything to do with this problem.)

Any suggestions?

Launching '/Applications/CouchbaseSingleServer-1.2.0/Couchbase Single Server.app/Contents/Resources/couchdbx-core/bin/couchdb'
Eshell V5.8.2  (abort with ^G)
Apache CouchDB 1.1.0 (LogLevel=info) is starting.

=CRASH REPORT==== 14-Jan-2012::00:06:42 ===
  crasher:
    initial call: couch_event_sup:init/1
    pid: <0.83.0>
    registered_name: []
    exception exit: {error,enoent}
      in function  gen_server:init_it/6
    ancestors: [couch_primary_services,couch_server_sup,<0.35.0>]
    messages: []
    links: [<0.82.0>,<0.6.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 377
    stack_size: 24
    reductions: 115
  neighbours:

=SUPERVISOR REPORT==== 14-Jan-2012::00:06:42 ===
     Supervisor: {local,couch_primary_services}
     Context:    start_error
     Reason:     {error,enoent}
     Offender:   [{pid,undefined},
                  {name,couch_log},
                  {mfargs,{couch_log,start_link,[]}},
                  {restart_type,permanent},
                  {shutdown,brutal_kill},
                  {child_type,worker}]


=SUPERVISOR REPORT==== 14-Jan-2012::00:06:42 ===
     Supervisor: {local,couch_server_sup}
     Context:    start_error
     Reason:     shutdown
     Offender:   [{pid,undefined},
                  {name,couch_primary_services},
                  {mfargs,{couch_server_sup,start_primary_services,[]}},
                  {restart_type,permanent},
                  {shutdown,infinity},
                  {child_type,supervisor}]


=CRASH REPORT==== 14-Jan-2012::00:06:42 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.34.0>
    registered_name: []
    exception exit: {bad_return,
                        {{couch_app,start,
                             [normal,
                              ["/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/etc/couchdb/default.ini",
                               "/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/etc/couchdb/local.ini"]]},
                         {'EXIT',
                             {{badmatch,{error,shutdown}},
                              [{couch_server_sup,start_server,1},
                               {application_master,start_it_old,4}]}}}}
      in function  application_master:init/4
    ancestors: [<0.33.0>]
    messages: [{'EXIT',<0.35.0>,normal}]
    links: [<0.33.0>,<0.7.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1597
    stack_size: 24
    reductions: 180
  neighbours:

=INFO REPORT==== 14-Jan-2012::00:06:42 ===
    application: couch
    exited: {bad_return,{{couch_app,start,
                                    [normal,
                                     ["/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/etc/couchdb/default.ini",
                                      "/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/etc/couchdb/local.ini"]]},
                         {'EXIT',{{badmatch,{error,shutdown}},
                                  [{couch_server_sup,start_server,1},
                                   {application_master,start_it_old,4}]}}}}

UPDATE: I saw this post http://www.couchbase.org/forums/thread/couchbase-single-server-120-released and it says there's an incorrect value in the etc/couchdb/default.ini file. (under "Show Package Contents" -> Contents/Resources/couchdbx-core)

I also found this in Contents/Resources/couchdbx-core/env.sh (below) with the following two lines in particular:

dir_to_path '/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/lib' 'insert' 'DYLD_LIBRARY_PATH'

dir_to_path '/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/bin' 'insert' 'PATH'

Clearly they are wrong (leftover from a jenkins build server i guess), but how do I know what to change them to?

#!/bin/sh
#
# Activate the environment used by Build CouchDB.
# This script is idempotent and runs silently when not connected to a terminal.

original_under="$_"

this_file="$BASH_SOURCE"
if [ -z "$this_file" ]; then
    this_file="$0"
fi

# Since this script sets the environment, it must be sourced. Since running it
# in a subshell is pointless, detect if that happened and warn the user.
#
# Detection confirmed to work for ./env.sh, . env.sh, source env.sh, $SHELL env.sh for all of:
#  * Bash
#  * Zsh
#  * Dash
if [ $(basename -- "$0") = 'env.sh' ]; then
    err="This script must be sourced, not run standalone"

    if [ "$ZSH_VERSION" ]; then
        # Re-confirm for Zsh since the above test does not work.
        if [ "$original_under" != "$0" ]; then
            echo "$err" >&2
            exit 1
        fi
    else
        echo "$err" >&2
        exit 1
    fi
fi

main () {



                dir_to_path '/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/lib' 'insert' 'DYLD_LIBRARY_PATH'





                dir_to_path '/Users/farshid/jenkins/jobs/couchbase-single-x/workspace/build/bin' 'insert' 'PATH'





}

puts ()
{
    if [ -t 2 ]; then
        echo "$*" >&2
    fi
}

abspath () {
    if [ `uname` = 'Darwin' ]; then
        ruby -e "puts File.expand_path('$1')"
    else
        readlink -f "$1"
    fi
}

# Idempotently add a directory into a search path.
dir_to_path () {
    desired="$1"
    add_type="$2"
    env_var="$3"

    if [ ! -d "$desired" ]; then
        mkdir -p "$desired"
    fi

    desired=`abspath "$desired"`

    # Prefix the path with ':' so grep can confirm the absolute location.
    current_path=`eval "echo :\\$$env_var"`
    if ! echo "$current_path" | grep ":$desired" > /dev/null; then
        if [ "$add_type" = 'insert' ]; then
            puts "Inserting to $env_var: $desired"
            eval "$env_var=\"$desired:\$$env_var\""
        elif [ "$add_type" = 'append' ]; then
            puts "Appending to $env_var: $desired"
            eval "$env_var=\"$env_var:\$$desired\""
        else
            "Woa, what's going on here? $add_type $desired"
        fi

        eval "export $env_var"
    fi
}

main

# Clean up.
unset desired
unset env_var
unset pre_dir
unset post_dir
unset add_type
unset this_file
unset current_path
unset greppable_path
unset original_under

unset main
unset puts
unset abspath
unset to_path

# vim: sts=4 sw=4 et
link|improve this question

72% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.