Question

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

Posted December 29, 2018 1.5k views
DigitalOceanUbuntu 16.04Databases

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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 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

Submit an Answer