Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 2 down vote accepted

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.)

[httpd]
    # ... snip other stuff ...
    bind_address = 127.0.0.1

Change to:

[httpd]
    bind_address = 0.0.0.0

And restart couch. Did that help?

share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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