3

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. enter image description here

The error message is unclear, and I can't find anything from log.

[debug] 2016-12-19T12:33:45.246054Z couchdb@couchdbA.couch <0.846.0> 0fbf5d2a41 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:45.246505Z couchdb@couchdbA.couch <0.2648.0> eabba5f813 no record of user root
[debug] 2016-12-19T12:33:45.246530Z couchdb@couchdbA.couch <0.2648.0> eabba5f813 timeout 6000
[debug] 2016-12-19T12:33:45.246547Z couchdb@couchdbA.couch <0.2648.0> eabba5f813 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:45.247127Z couchdb@couchdbA.couch <0.847.0> fdbd749b7a cache miss for root
[debug] 2016-12-19T12:33:45.247444Z couchdb@couchdbA.couch <0.847.0> fdbd749b7a no record of user root
[debug] 2016-12-19T12:33:45.247475Z couchdb@couchdbA.couch <0.847.0> fdbd749b7a timeout 6000
[debug] 2016-12-19T12:33:45.247495Z couchdb@couchdbA.couch <0.847.0> fdbd749b7a Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:45.248915Z couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <0.847.0> c06a5322af cache miss for root
[debug] 2016-12-19T12:33:45.260079Z couchdb@couchdbA.couch <0.847.0> c06a5322af no record of user root
[debug] 2016-12-19T12:33:45.260115Z couchdb@couchdbA.couch <0.847.0> c06a5322af timeout 6000
[debug] 2016-12-19T12:33:45.260137Z couchdb@couchdbA.couch <0.847.0> c06a5322af Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:45.263568Z couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <0.847.0> 26f439ef76 cache miss for root
[debug] 2016-12-19T12:33:47.652225Z couchdb@couchdbA.couch <0.846.0> ae16fb68d4 cache miss for root
[debug] 2016-12-19T12:33:47.652505Z couchdb@couchdbA.couch <0.847.0> 26f439ef76 no record of user root
[debug] 2016-12-19T12:33:47.652542Z couchdb@couchdbA.couch <0.847.0> 26f439ef76 timeout 6000
[debug] 2016-12-19T12:33:47.652562Z couchdb@couchdbA.couch <0.847.0> 26f439ef76 Successful cookie auth as: "root"
[debug] 2016-12-19T12:33:47.652626Z couchdb@couchdbA.couch <0.846.0> ae16fb68d4 no record of user root
[debug] 2016-12-19T12:33:47.652663Z couchdb@couchdbA.couch <0.846.0> ae16fb68d4 timeout 6000
[debug] 2016-12-19T12:33:47.653002Z couchdb@couchdbA.couch <0.846.0> ae16fb68d4 Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.653907Z couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <0.847.0> 095c417920 cache miss for root
[debug] 2016-12-19T12:33:47.660915Z couchdb@couchdbA.couch <0.847.0> 095c417920 no record of user root
[debug] 2016-12-19T12:33:47.660950Z couchdb@couchdbA.couch <0.847.0> 095c417920 timeout 6000
[debug] 2016-12-19T12:33:47.660969Z couchdb@couchdbA.couch <0.847.0> 095c417920 Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.711571Z couchdb@couchdbA.couch <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 couchdb@couchdbA.couch <0.846.0> 8ce6af042b cache miss for root
[debug] 2016-12-19T12:33:47.748104Z couchdb@couchdbA.couch <0.846.0> 8ce6af042b no record of user root
[debug] 2016-12-19T12:33:47.748281Z couchdb@couchdbA.couch <0.846.0> 8ce6af042b timeout 6000
[debug] 2016-12-19T12:33:47.748392Z couchdb@couchdbA.couch <0.846.0> 8ce6af042b Successful cookie auth as: "root"
[notice] 2016-12-19T12:33:47.750359Z couchdb@couchdbA.couch <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?

  • did you set a password for root? You may want to try this as admin (set a admin password in local.ini and restart couchdb) – awenkhh Dec 21 '16 at 7:59
  • Yes, I do indicate COUCHDB_PASSWORD in the docker environment according to the doc – Mr.Wang from Next Door Dec 21 '16 at 8:15
  • @Mr.WangfromNextDoor Solved this ? – Michael Laffargue Jun 2 '17 at 14:16
  • @MichaelLaffargue, No, I gave up CouchDB 2.0 – Mr.Wang from Next Door Jun 5 '17 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.