havvg's playground

Developing Software is Fun!

couchdb on ubuntu Karmic Koala

Toni Uebernickel

Connection refused

I need couchdb 0.10.0 as it provides JSONP support, so I installed the bleeding edge ubuntu Karmic Koala development branch, which ships couchdb 0.10.0. But when doing a simple curl request on the couchdb server, the connection was refused.

$ curl -vX GET
* About to connect() to port 5984 (#0)
*   Trying Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

To check what’s wrong use this command.

$ sudo -u couchdb couchdb
=ERROR REPORT==== 19-Oct-2009::21:49:09 ===
file:path_eval([".","/root"],".erlang"): permission denied
Apache CouchDB 0.10.0 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.1.0>] Apache CouchDB has started on

What’s important on this output is the permission denied error. In order to get this solved, you can either change the log section in your /etc/couchdb/local.ini to a logfile couchdb is allowed to write to or you add the directory and the file with correct permissions that is defined in the /etc/couchdb/default.ini as follows.

$ mkdir -p /var/log/couchdb/0.10.0/
$ touch /var/log/couchdb/0.10.0/couch.log 
$ chown -R couchdb:adm /var/log/couchdb/

Now the logfile is setup correctly and you may request couchdb.

$ curl -X GET
$ curl -X GET

Thanks to a lot of mail archives, that pointed me to what could be wrong (and finally I got it :D).

blog comments powered by Disqus
Written by

Toni Uebernickel

Software Engineer and Architect, Symfony evangelist with some Ducati bikes.

Support & Share
You should subscribe to my feed!
All content copyright Toni Uebernickel © 2018 • All rights reserved.