Can't connect to droplet couchdb server over the internet - connection has timed out

December 29, 2018 583 views
Databases DigitalOcean Ubuntu 16.04

I've set up a couchdb v 2.3.0 server on a new DO droplet. It's running. See the following from an ssh log:

skuilder@ubuntu-couchdb:~$ curl localhost:5984
{"couchdb":"Welcome","version":"2.3.0","git_sha":"07ea0c7","uuid":"843b432d607bc71c152acfce979e5d89","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

I'm also able to access the database and its web-based admin console via my on browser with ssh tunneling.

All good so far.

My droplet has a public ip at 159.203.60.117. I'm able to successfully ping this ip, so I assume that the droplet is internet-facing in some capacity. But I'm unable to hit the database at 159.203.60.117:5984, or the admin portal at 159.203.60.117:5984/_utils with the browser ("The connection has timed out The server at 159.203.60.117 is taking too long to respond.")

I've enabled CORS on the database.

Any suggestions for troubleshooting? A database that can only be accessed from its own local machine wasn't what I was intending.

NOTE: I did the initial ubuntu setup here, including the UFW firewall setup, which I assume is the problem. The database is serving from port 5984, and I've tried sudo ufw allow 5984, but no luck yet.

1 Answer
unixynet December 30, 2018
Accepted Answer

Hi

Can you make sure CouchDB is set to listen on the public IP like this:

bind_address = 0.0.0.0

Right now it's likely listening on the local loop 127.0.0.1 only.

Cheers

  • Thanks so much! I've been intermittently beating my head against the wall for about 3 days on this problem.

Have another answer? Share your knowledge.