I recently started an EC2 instance to test some couchdb projects, but for some reason I cannot seem to access the database.

Port 5984 is open on both RHEL and in the security group, but I get cannot connect issues both remotely and locally

Netstat also shows nothing listening on port 5984, even though couchdb is running and configured to listen on port 5984. The service is running, but it is like it isn't doing anything.

Any thoughts?

  • Can you please confirm that 5984 is allowed in the EC2 security policy? – jhs Jul 4 '11 at 3:30
  • Sorry! Obviously you already answered this question. I read it wrong. Check my answer below about the listen address. – jhs Jul 4 '11 at 3:33

Check your local.ini file, for the bind address. Perhaps the port is correct but the address is wrong. (By default, CouchDB only listens for local connections.)

    # ... snip other stuff ...
    bind_address =

Change to:

    bind_address =

And restart couch. Did that help?

  • If this answer is incorrect (I am nervous because you say local connections are also down), then would you mind updating your question indicating whether or not the logs show any information at all. The logs may have errors or not, but either way, that is a clue. – jhs Jul 4 '11 at 3:36
  • I have tried changing the bind_address in the local.ini, I will check the logs in the morning – Andrew Guenther Jul 5 '11 at 7:51
  • So I just booted up a new instance and the first thing I did was install couch and change the local.ini file, no idea what the issue was on the other instance, but it works now. Thank you so much! (So much for going to bed an hour ago) – Andrew Guenther Jul 5 '11 at 8:47

I had the same problem: service "running" but not logging anything and no port opened. The cause is the following: I tried running couchdb as root directly after installing and before running it as a service. It created the log and db files with owner set to root, so when it was run as the proper service it couldn't access the files and couldn't even log about the problem. I deleted the /var/log/couchdb/couch.log and cleared /var/lib/couchdb and it seems to work now.

Maybe it was not the cause in your case, but the symptoms look pretty similar.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.