[我开始通过阅读user guide开始学习CouchDB,并跟随从official CouchDB image运行的Docker容器(使用标签latest
,CouchDB 2.3.1)。我正在使用一个在本地运行的容器。使用默认选项(例如bind address
设置为0.0.0.0
)在Fauxton设置页面上配置为单个节点。
当我运行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中验证安装”,然后观察到相同的错误。
任何想法出了什么问题/我想念什么?
如果您在Config
中使用Fauxton-> Main config
将httpd
bind_address
从any
切换到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