I am trying to setup a CouchDB cluster with 3 nodes in my local machine. I am using the official docker image from here: https://hub.docker.com/r/klaemo/couchdb/
First, I create 3 data volumes which will be used by the containers.
docker create -v /opt/couchdb/data --name couchdb_d1 klaemo/couchdb:2.0.0
docker create -v /opt/couchdb/data --name couchdb_d2 klaemo/couchdb:2.0.0
docker create -v /opt/couchdb/data --name couchdb_d3 klaemo/couchdb:2.0.0
Then create a user-defined network, so that these 3 nodes can communicate with each other.
docker network create --driver bridge couch
Then start three containers, each of them runs a CouchDB nodes
docker run -d --name couchdbA \
--net=couch \
--hostname couchdbA \
-p 5984:5984 \
-e NODENAME=couchdbA.couch \
-e COUCHDB_USER=root \
-e COUCHDB_PASSWORD=654321 \
-v /opt/couchdb/data \
--volumes-from couchdb_d1 \
"klaemo/couchdb:2.0.0"
docker run -d --name couchdbB \
--net=couch \
--hostname couchdbB \
-p 15984:5984 \
-e NODENAME=couchdbB.couch \
-e COUCHDB_USER=root \
-e COUCHDB_PASSWORD=654321 \
-v /opt/couchdb/data \
--volumes-from couchdb_d2 \
"klaemo/couchdb:2.0.0"
docker run -d --name couchdbC \
--net=couch \
--hostname couchdbC \
-p 25984:5984 \
-e NODENAME=couchdbC.couch \
-e COUCHDB_USER=root \
-e COUCHDB_PASSWORD=654321 \
-v /opt/couchdb/data \
--volumes-from couchdb_d3 \
"klaemo/couchdb:2.0.0"
Next, I open the http://xxx.xxx.xxx.xxx:yyyyy/_utils/#setup on each of the container, and configure the cluster.
For couchdbA
, I added the hosts
- couchdbB.couch:5984
- couchdbC.couch:5984
For couchdbB
, I added the hosts
- couchdbA.couch:5984
- couchdbC.couch:5984
For couchdbC
, I added the hosts
- couchdbA.couch:5984
- couchdbB.couch:5984
Everything looks fine so far, I see system databases are created in all three nodes.
Now I try to verify by installation by click the "Verify" button and it ends with an error.
The error message is unclear, and I can't find anything from log.
[debug] 2016-12-19T12:33:45.246054Z [email protected] <0.846.0> 0fbf5d2a41 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:45.246505Z [email protected] <0.2648.0> eabba5f813 no record of user root
[debug] 2016-12-19T12:33:45.246530Z [email protected] <0.2648.0> eabba5f813 timeout 6000
[debug] 2016-12-19T12:33:45.246547Z [email protected] <0.2648.0> eabba5f813 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:45.247127Z [email protected] <0.847.0> fdbd749b7a cache miss for root
[debug] 2016-12-19T12:33:45.247444Z [email protected] <0.847.0> fdbd749b7a no record of user root
[debug] 2016-12-19T12:33:45.247475Z [email protected] <0.847.0> fdbd749b7a timeout 6000
[debug] 2016-12-19T12:33:45.247495Z [email protected] <0.847.0> fdbd749b7a Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:45.248915Z [email protected] <0.2648.0> eabba5f813 10.0.5.96:5984 10.0.5.233 root GET /_users 200 ok 3
[notice] 2016-12-19T12:33:45.250319Z [email protected] <0.846.0> 0fbf5d2a41 10.0.5.96:5984 10.0.5.233 root GET /_replicator 200 ok 5
[notice] 2016-12-19T12:33:45.250486Z [email protected] <0.847.0> fdbd749b7a 10.0.5.96:5984 10.0.5.233 root GET /ts 200 ok 4
[debug] 2016-12-19T12:33:45.259598Z [email protected] <0.847.0> c06a5322af cache miss for root
[debug] 2016-12-19T12:33:45.260079Z [email protected] <0.847.0> c06a5322af no record of user root
[debug] 2016-12-19T12:33:45.260115Z [email protected] <0.847.0> c06a5322af timeout 6000
[debug] 2016-12-19T12:33:45.260137Z [email protected] <0.847.0> c06a5322af Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:45.263568Z [email protected] <0.847.0> c06a5322af 10.0.5.96:5984 10.0.5.233 root GET /_utils/dashboard.assets/img/couchdb-logo.png 200 ok 4
[debug] 2016-12-19T12:33:47.651581Z [email protected] <0.847.0> 26f439ef76 cache miss for root
[debug] 2016-12-19T12:33:47.652225Z [email protected] <0.846.0> ae16fb68d4 cache miss for root
[debug] 2016-12-19T12:33:47.652505Z [email protected] <0.847.0> 26f439ef76 no record of user root
[debug] 2016-12-19T12:33:47.652542Z [email protected] <0.847.0> 26f439ef76 timeout 6000
[debug] 2016-12-19T12:33:47.652562Z [email protected] <0.847.0> 26f439ef76 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:47.652626Z [email protected] <0.846.0> ae16fb68d4 no record of user root
[debug] 2016-12-19T12:33:47.652663Z [email protected] <0.846.0> ae16fb68d4 timeout 6000
[debug] 2016-12-19T12:33:47.653002Z [email protected] <0.846.0> ae16fb68d4 Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.653907Z [email protected] <0.846.0> ae16fb68d4 10.0.5.96:5984 10.0.5.233 undefined GET /verifytestdb_replicate 404 ok 2
[notice] 2016-12-19T12:33:47.654781Z [email protected] <0.847.0> 26f439ef76 10.0.5.96:5984 10.0.5.233 undefined GET /verifytestdb 404 ok 3
[debug] 2016-12-19T12:33:47.660531Z [email protected] <0.847.0> 095c417920 cache miss for root
[debug] 2016-12-19T12:33:47.660915Z [email protected] <0.847.0> 095c417920 no record of user root
[debug] 2016-12-19T12:33:47.660950Z [email protected] <0.847.0> 095c417920 timeout 6000
[debug] 2016-12-19T12:33:47.660969Z [email protected] <0.847.0> 095c417920 Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.711571Z [email protected] <0.847.0> 095c417920 10.0.5.96:5984 10.0.5.233 undefined PUT /verifytestdb 500 ok 51
[debug] 2016-12-19T12:33:47.746832Z [email protected] <0.846.0> 8ce6af042b cache miss for root
[debug] 2016-12-19T12:33:47.748104Z [email protected] <0.846.0> 8ce6af042b no record of user root
[debug] 2016-12-19T12:33:47.748281Z [email protected] <0.846.0> 8ce6af042b timeout 6000
[debug] 2016-12-19T12:33:47.748392Z [email protected] <0.846.0> 8ce6af042b Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.750359Z [email protected] <0.846.0> 8ce6af042b 10.0.5.96:5984 10.0.5.233 root GET /_utils/dashboard.assets/ZeroClipboard.swf?noCache=1482150820246 200 ok 4
Am I doing anything wrong?
0 Answers