You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by David Laxer <da...@softintel.com> on 2011/04/26 18:40:28 UTC

CouchDB: Could Not Connect

Hi,

I am trying to build and run CouchDB from source on a Mac running OsX 10.6.7.

I first tried manually downloading, building and installing the prerequisite components (Erlang, ICU, SpiderMonkey, etc.), then Couchdb, changed the ownership and permissions of the directories and files to 'couchdb:couchdb'.

  chown -R couchdb:couchdb /usr/local/etc/couchdb
    chown -R couchdb:couchdb /usr/local/var/lib/couchdb
    chown -R couchdb:couchdb /usr/local/var/log/couchdb
    chown -R couchdb:couchdb /usr/local/var/run/couchdb
    chmod 0770 /usr/local/etc/couchdb
    chmod 0770 /usr/local/var/lib/couchdb
    chmod 0770 /usr/local/var/log/couchdb
    chmod 0770 /usr/local/var/run/couchdb


$ curl -vX GET http://localhost:5984

Could not connect

I then tried with MacPorts:
port install icu erlang spidermonkey cur

Same problem.

Next, I tried with HomeBrew, which failed.

brew install couchdb
Warning: You should upgrade to Xcode 3.2.3
Warning: It appears you have Macports or Fink installed
Software installed with other package managers causes known problems for
Homebrew. If formula fail to build uninstall Macports/Fink and reinstall any
affected formula.
Also installing dependencies: spidermonkey, icu4c, erlang
==> Downloading http://hg.mozilla.org/tracemonkey/archive/57a6ad20eae9.tar.gz
File already downloaded and cached to /Users/davidlaxer/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file js/src/jsdate.cpp
patching file js/src/jsdate.h
patching file js/src/jsregexp.cpp
patching file js/src/jsregexp.h
==> Downloading http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.13.tar.gz
File already downloaded and cached to /Users/davidlaxer/Library/Caches/Homebrew
==> ./configure --disable-debug --program-suffix=213 --prefix=/private/tmp/homeb
==> make install
==> /private/tmp/homebrew-spidermonkey-1.8.5-zIOs/tracemonkey-57a6ad20eae9/ac213
==> ../js/src/configure --prefix=/usr/local/Cellar/spidermonkey/1.8.5 --enable-r
creating cache ./config.cache
checking host system type... x86_64-apple-darwin10.7.0
checking target system type... x86_64-apple-darwin10.7.0
checking build system type... x86_64-apple-darwin10.7.0
checking for mawk... no
checking for gawk... gawk
checking for gcc... /usr/bin/cc
checking whether the C compiler (/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -L/usr/local/Cellar/readline/6.2.1/lib) works... yes
checking whether the C compiler (/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -L/usr/local/Cellar/readline/6.2.1/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether /usr/bin/cc accepts -g... yes
checking for c++... /usr/bin/c++
checking whether the C++ compiler (/usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe -L/usr/local/Cellar/readline/6.2.1/lib) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/spidermonkey.rb#L52
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.7
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.2
GCC-4.0: build 5493 (5494 or newer recommended)
GCC-4.2: build 5657 (5664 or newer recommended)
LLVM: build 2207 (2326 or newer recommended)
MacPorts or Fink? /opt/local/bin/port
X11 installed? true
==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/g++-4.0
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
MAKEFLAGS: -j2
PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig

Error: Failed executing: ../js/src/configure --prefix=/usr/local/Cellar/spidermonkey/1.8.5 --enable-readline --enable-threadsafe --with-system-nspr
Please report this bug: https://github.com/mxcl/homebrew/wiki/new-issue

Also try:
  `brew doctor` to check your setup for common problems.
  `brew missing` to check installed packages for missing deps.


Finally, I installed CouchOne's community version which worked fine:

David-Laxers-MacBook-Pro:~ davidlaxer$ !485
 curl -vX GET http://localhost:5984
* About to connect() to localhost port 5984 (#0)
*   Trying ::1... Connection refused
*   Trying fe80::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 5984 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-apple-darwin10.7.0) libcurl/7.21.6 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.20
> Host: localhost:5984
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: CouchDB/1.1.1 (Erlang OTP/R14B)
< Date: Tue, 26 Apr 2011 12:29:54 GMT
< Content-Type: text/plain;charset=utf-8
< Content-Length: 40
< Cache-Control: must-revalidate
< 
{"couchdb":"Welcome","version":"1.1.1"}
* Connection #0 to host localhost left intact
* Closing connection #0
David-Laxers-MacBook-Pro:~ davidlaxer$ 

If CouchOne's binary works, then the implication is that there's nothing in my network settings (e.g. - blocking the port.)
I read posts that I needed to revert to an earlier version of Erlang, and others which discussed SSL parameters to 'configure'.
I was under the impression that MacPorts would resolve these issues.  Other posts indicated people had CouchDB working
and when they upgraded to MacOsX 10.7.6, CouchDB stopped working.

Any ideas on what could be wrong?

Thanks in Advance,
-Dave