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

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

我开始通过阅读 user guide and following along with a Docker container run off the official CouchDB image(使用标签 latest,CouchDB 2.3.1)来学习 CouchDB。我在本地使用一个容器 运行ning。使用默认选项通过 Fauxton 设置页面配置为单个节点(例如 bind address 设置为 0.0.0.0)。

当我 运行 Fauxton 的验证安装工具时,前 5 个检查通过,但复制检查失败并显示消息:

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

同样,当我尝试将示例数据库复制到同一节点上的另一个数据库时,它失败了:

$ 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/"}

我注意到在这两种情况下,错误都是 any 而不是 0.0.0.0,但我不知道这是否重要。

我也尝试过 运行通过 docker run --name loveseat -p 5984:5984 -d couchdb:latest 安装一个新容器,完成 Fauxton 设置,然后立即单击在 Fauxton 中验证安装,我发现了同样的错误。

有什么问题/我遗漏了什么吗?

更新

我在以下 Docker 个图像标签上尝试了相同的程序:

结果都一样。

如果您在 Config 中使用 Fauxton -> Main config 将您的 httpd bind_addressany 切换到 0.0.0.0

我认为这是 this question

的重复

下面是我使用的 local.ini 文件的一部分。

[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