Назад | Перейти на главную страницу

Установка CouchDB 2.0 Cluster

Я пытаюсь настроить кластер CouchDB с 3 узлами на моем локальном компьютере. Я использую официальный образ докера отсюда: https://hub.docker.com/r/klaemo/couchdb/

Сначала я создаю 3 тома данных, которые будут использоваться контейнерами.

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

Затем создайте определяемую пользователем сеть, чтобы эти 3 узла могли связываться друг с другом.

docker network create --driver bridge couch

Затем запустите три контейнера, каждый из которых запускает узлы 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" 

Затем я открываю http://xxx.xxx.xxx.xxx:yyyyy/_utils/#setup на каждом контейнере и настройте кластер.

Для couchdbA, Я добавил хостов

Для couchdbB, Я добавил хостов

Для couchdbC, Я добавил хостов

Пока все выглядит нормально, я вижу, что системные базы данных созданы на всех трех узлах.

Теперь пытаюсь проверить установкой, нажав кнопку «Проверить», и это заканчивается ошибкой.

Сообщение об ошибке неясное, и я ничего не могу найти в журнале.

[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

Я что-то не так делаю?