Dylan L
Dylan L

Reputation: 79

Error: could not resolve http://any:5984/verifytestdb/ in CouchDB Docker container

I'm starting to learn CouchDB by reading through the user guide and following along with a Docker container run off the official CouchDB image (using tag latest, CouchDB 2.3.1). I'm using one container, running locally. configured as a single node via the Fauxton Setup page using default options (e.g. bind address set to 0.0.0.0).

When I run Fauxton's Verify Installation tool, the first 5 checks pass, but the replication check fails with message:

Error: could not resolve http://any:5984/verifytestdb/

Similarly, when I try to replicate a sample database to another database on the same node, it fails:

$ curl http://localhost:5984/_all_dbs
["_global_changes","_replicator","_users","albums","albums-replica"]

$ curl http://localhost:5984/_replicate \
-d '{"source": "albums", "target": "albums-replica"}' \
-H "Content-Type: application/json"
{"error":"nxdomain","reason":"could not resolve http://any:5984/albums/"}

I notice in both cases the errors say any rather than 0.0.0.0, but I don't know if that's significant.

I have also tried running a new container via docker run --name loveseat -p 5984:5984 -d couchdb:latest, completing Fauxton setup, and immediately clicking Verify Install in Fauxton, and I observe the same error.

Any ideas what's wrong / what I'm missing?

Update

I have tried the same procedure on the following Docker image tags:

All with the same result.

Upvotes: 2

Views: 903

Answers (1)

Eric
Eric

Reputation: 837

If you're using Fauxton in Config -> Main config switch your httpd bind_address from any to 0.0.0.0

I think this is a repeat of this question

Part of the local.ini file I use is below.

[chttpd]
bind_address = 0.0.0.0
port = 5984
; When this option is set to true, no requests are allowed from anonymous users. Everyone must be authenticated.
require_valid_user = false

[cluster]
n = 1

[httpd]
enable_cors = true
bind_address = 0.0.0.0

Upvotes: 4

Related Questions