Estou tentando configurar um cluster do CouchDB com 3 nós em minha máquina local. Estou usando a imagem oficial do docker aqui: link
Primeiro, eu crio 3 volumes de dados que serão usados pelos contêineres.
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
Em seguida, crie uma rede definida pelo usuário, para que esses três nós possam se comunicar entre si.
docker network create --driver bridge couch
Em seguida, inicie três contêineres, cada um deles executando um nós do CouchDB
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"
Em seguida, abro o link em cada um dos contêineres e configure o cluster
Para couchdbA
, adicionei os hosts
Para couchdbB
, adicionei os hosts
Para couchdbC
, adicionei os hosts
Tudo parece bem até agora, vejo bancos de dados do sistema são criados em todos os três nós.
Agora eu tento verificar por instalação clicando no botão "Verificar" e termina com um erro.
Amensagemdeerronãoestáclara,enãoconsigoencontrarnadadolog.
[debug]2016-12-19T12:33:[email protected]<0.846.0>0fbf5d2a41Successfulcookieauthas:"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
Estou fazendo algo errado?
Tags couchdb