在 openshift 平台上部署 fabric-couch 失败
Failed deploy fabric-couch on openshift platform
我正在尝试在 Openshift 平台上部署 hyperledger/fabric-couchdb: x86_64-1.0.1。
我的环境的详细信息:
openshift v3.4.1.44
kubernetes v1.4.0+776c994
我已经使用以下 yaml 脚本部署了 fabric-couchDB。
我正在 运行ning yaml 与管理员 user.This 用户在 openshift 中的访问权限受限。
apiVersion: v1
items:
#creating Shared PVC
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: shared-pvc
name: shared-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
#creating ImageStream couchdb
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
name: couchdb
spec:
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/fabric-couchdb:x86_64-1.0.1
generation: null
importPolicy: {}
name: x86_64-1.0.1
status:
dockerImageRepository: ""
#Creating couchdb POD
- apiVersion: v1
kind: Pod
metadata:
name: couchdb
spec:
containers:
- env:
- name: DB_URL
value: http://localhost:5984/member_db
- name: COUCHDB_USER
value: admin
- name: COUCHDB_PASSWORD
value: password
- name: CORE_LOGGING_LEVEL
value: DEBUG
image: hyperledger/fabric-couchdb:x86_64-1.0.1
imagePullPolicy: IfNotPresent
name: couchdb
ports:
- containerPort: 5984
resources: {}
volumeMounts:
- mountPath: /opt/couchdb/etc/local.d
name: couchdb-claim0
- mountPath: /opt/couchdb/data
name: couchdb-claim1
restartPolicy: Always
volumes:
- name: couchdb-claim0
persistentVolumeClaim:
claimName: shared-pvc
- name: couchdb-claim1
emptyDir: {}
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- couchdb
from:
kind: ImageStreamTag
name: couchdb:x86_64-1.0.1
type: ImageChange
kind: List
metadata: {}
使用此脚本创建 POD 并成功 运行。
以下终端日志已生成。
[info] 2017-08-23T06:24:51.030925Z nonode@nohost <0.7.0> -------- Application couch_log started on node nonode@nohost
[info] 2017-08-23T06:24:51.035923Z nonode@nohost <0.7.0> -------- Application folsom started on node nonode@nohost
[info] 2017-08-23T06:24:51.074775Z nonode@nohost <0.7.0> -------- Application couch_stats started on node nonode@nohost
[info] 2017-08-23T06:24:51.074892Z nonode@nohost <0.7.0> -------- Application khash started on node nonode@nohost
[info] 2017-08-23T06:24:51.084266Z nonode@nohost <0.7.0> -------- Application couch_event started on node nonode@nohost
[info] 2017-08-23T06:24:51.090430Z nonode@nohost <0.7.0> -------- Application ibrowse started on node nonode@nohost
[info] 2017-08-23T06:24:51.096120Z nonode@nohost <0.7.0> -------- Application ioq started on node nonode@nohost
[info] 2017-08-23T06:24:51.096256Z nonode@nohost <0.7.0> -------- Application mochiweb started on node nonode@nohost
[info] 2017-08-23T06:24:51.096382Z nonode@nohost <0.7.0> -------- Application oauth started on node nonode@nohost
[info] 2017-08-23T06:24:51.105579Z nonode@nohost <0.198.0> -------- Apache CouchDB 2.0.0 is starting.
[info] 2017-08-23T06:24:51.105638Z nonode@nohost <0.199.0> -------- Starting couch_sup
[notice] 2017-08-23T06:24:51.140601Z nonode@nohost <0.82.0> -------- config: [admins] admin set to -pbkdf2-ea9beb38474607c1ffb9304d288ba2ff93e2f38a,3ecf788116d8c27020f5012f72114bed,10 for reason nil
[notice] 2017-08-23T06:24:51.173160Z nonode@nohost <0.82.0> -------- config: [couchdb] uuid set to 5b92249aebb2e742f2a86b0cfaeca017 for reason nil
[info] 2017-08-23T06:24:51.219024Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _users
[info] 2017-08-23T06:24:51.284558Z nonode@nohost <0.198.0> -------- Apache CouchDB has started. Time to relax.
[info] 2017-08-23T06:24:51.284667Z nonode@nohost <0.198.0> -------- Apache CouchDB has started on http://127.0.0.1:5986/
[info] 2017-08-23T06:24:51.284794Z nonode@nohost <0.7.0> -------- Application couch started on node nonode@nohost
[info] 2017-08-23T06:24:51.284944Z nonode@nohost <0.7.0> -------- Application ets_lru started on node nonode@nohost
[info] 2017-08-23T06:24:51.293670Z nonode@nohost <0.7.0> -------- Application rexi started on node nonode@nohost
[info] 2017-08-23T06:24:51.304787Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _nodes
[info] 2017-08-23T06:24:51.326838Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _dbs
[error] 2017-08-23T06:24:51.327172Z nonode@nohost emulator -------- Error in process <0.287.0> with exit value:
{{badmatch,file_exists},[{mem3_shards,fold,2,[{file,"src/mem3_shards.erl"},{line,156}]},{mem3_sync,initial_sync,1,[{file,"src/mem3_sync.erl"},{line,241}]}]}
[info] 2017-08-23T06:24:51.332055Z nonode@nohost <0.7.0> -------- Application mem3 started on node nonode@nohost
[info] 2017-08-23T06:24:51.332224Z nonode@nohost <0.7.0> -------- Application fabric started on node nonode@nohost
[info] 2017-08-23T06:24:51.345163Z nonode@nohost <0.7.0> -------- Application chttpd started on node nonode@nohost
[notice] 2017-08-23T06:24:51.352322Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:24:51.352374Z nonode@nohost emulator -------- Error in process <0.326.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[info] 2017-08-23T06:24:51.355973Z nonode@nohost <0.7.0> -------- Application couch_index started on node nonode@nohost
[info] 2017-08-23T06:24:51.356033Z nonode@nohost <0.7.0> -------- Application couch_mrview started on node nonode@nohost
[info] 2017-08-23T06:24:51.356059Z nonode@nohost <0.7.0> -------- Application couch_plugins started on node nonode@nohost
[info] 2017-08-23T06:24:51.364246Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _replicator
[notice] 2017-08-23T06:24:51.369132Z nonode@nohost <0.344.0> -------- creating replicator ddoc
[info] 2017-08-23T06:24:51.383827Z nonode@nohost <0.7.0> -------- Application couch_replicator started on node nonode@nohost
[info] 2017-08-23T06:24:51.383960Z nonode@nohost <0.7.0> -------- Application couch_peruser started on node nonode@nohost
[info] 2017-08-23T06:24:51.401242Z nonode@nohost <0.7.0> -------- Application ddoc_cache started on node nonode@nohost
[info] 2017-08-23T06:24:51.417532Z nonode@nohost <0.7.0> -------- Application global_changes started on node nonode@nohost
[info] 2017-08-23T06:24:51.417678Z nonode@nohost <0.7.0> -------- Application jiffy started on node nonode@nohost
[info] 2017-08-23T06:24:51.429375Z nonode@nohost <0.7.0> -------- Application mango started on node nonode@nohost
[info] 2017-08-23T06:24:51.434651Z nonode@nohost <0.7.0> -------- Application setup started on node nonode@nohost
[info] 2017-08-23T06:24:51.434778Z nonode@nohost <0.7.0> -------- Application snappy started on node nonode@nohost
[notice] 2017-08-23T06:24:56.352930Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:24:56.353035Z nonode@nohost emulator -------- Error in process <0.452.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:01.354009Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:01.354101Z nonode@nohost emulator -------- Error in process <0.549.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:06.354952Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:06.355051Z nonode@nohost emulator -------- Error in process <0.614.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:11.355838Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:11.355906Z nonode@nohost emulator -------- Error in process <0.711.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:16.356958Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:16.357344Z nonode@nohost emulator -------- Error in process <0.776.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:21.357853Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:21.358180Z nonode@nohost emulator -------- Error in process <0.873.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:26.358993Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:26.359290Z nonode@nohost emulator -------- Error in process <0.938.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:31.359967Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:31.360380Z nonode@nohost emulator -------- Error in process <0.1019.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:36.360980Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:36.361417Z nonode@nohost emulator -------- Error in process <0.1100.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
以下是我的观察:
1. CouchDB 使用 nonode@nohost 创建节点
2. CouchDB 默认数据库 _nodes , _dbs, _replicator 未创建。
我需要任何特定的配置/许可吗?
我试图分析 couchDB 源但没有成功:(
fabric-couchDB 映像创建了 couchDB 容器,这些容器应该作为 Hyperledger Fabric 对等点的 stateDB 持有者,因此每个沙发容器应该与对等点一对一连接。您可以查看 docker-compose 示例 here in the official doc.
也就是说,这里的错误看起来很正常,因为沙发上需要一些初始设置来创建一些默认数据库。(Fabric peers 将其作为 statedb 建立例程的一部分)请参阅官方 couch config setup doc here.
我正在尝试在 Openshift 平台上部署 hyperledger/fabric-couchdb: x86_64-1.0.1。 我的环境的详细信息: openshift v3.4.1.44 kubernetes v1.4.0+776c994
我已经使用以下 yaml 脚本部署了 fabric-couchDB。 我正在 运行ning yaml 与管理员 user.This 用户在 openshift 中的访问权限受限。
apiVersion: v1
items:
#creating Shared PVC
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: shared-pvc
name: shared-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
#creating ImageStream couchdb
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
name: couchdb
spec:
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/fabric-couchdb:x86_64-1.0.1
generation: null
importPolicy: {}
name: x86_64-1.0.1
status:
dockerImageRepository: ""
#Creating couchdb POD
- apiVersion: v1
kind: Pod
metadata:
name: couchdb
spec:
containers:
- env:
- name: DB_URL
value: http://localhost:5984/member_db
- name: COUCHDB_USER
value: admin
- name: COUCHDB_PASSWORD
value: password
- name: CORE_LOGGING_LEVEL
value: DEBUG
image: hyperledger/fabric-couchdb:x86_64-1.0.1
imagePullPolicy: IfNotPresent
name: couchdb
ports:
- containerPort: 5984
resources: {}
volumeMounts:
- mountPath: /opt/couchdb/etc/local.d
name: couchdb-claim0
- mountPath: /opt/couchdb/data
name: couchdb-claim1
restartPolicy: Always
volumes:
- name: couchdb-claim0
persistentVolumeClaim:
claimName: shared-pvc
- name: couchdb-claim1
emptyDir: {}
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- couchdb
from:
kind: ImageStreamTag
name: couchdb:x86_64-1.0.1
type: ImageChange
kind: List
metadata: {}
使用此脚本创建 POD 并成功 运行。 以下终端日志已生成。
[info] 2017-08-23T06:24:51.030925Z nonode@nohost <0.7.0> -------- Application couch_log started on node nonode@nohost
[info] 2017-08-23T06:24:51.035923Z nonode@nohost <0.7.0> -------- Application folsom started on node nonode@nohost
[info] 2017-08-23T06:24:51.074775Z nonode@nohost <0.7.0> -------- Application couch_stats started on node nonode@nohost
[info] 2017-08-23T06:24:51.074892Z nonode@nohost <0.7.0> -------- Application khash started on node nonode@nohost
[info] 2017-08-23T06:24:51.084266Z nonode@nohost <0.7.0> -------- Application couch_event started on node nonode@nohost
[info] 2017-08-23T06:24:51.090430Z nonode@nohost <0.7.0> -------- Application ibrowse started on node nonode@nohost
[info] 2017-08-23T06:24:51.096120Z nonode@nohost <0.7.0> -------- Application ioq started on node nonode@nohost
[info] 2017-08-23T06:24:51.096256Z nonode@nohost <0.7.0> -------- Application mochiweb started on node nonode@nohost
[info] 2017-08-23T06:24:51.096382Z nonode@nohost <0.7.0> -------- Application oauth started on node nonode@nohost
[info] 2017-08-23T06:24:51.105579Z nonode@nohost <0.198.0> -------- Apache CouchDB 2.0.0 is starting.
[info] 2017-08-23T06:24:51.105638Z nonode@nohost <0.199.0> -------- Starting couch_sup
[notice] 2017-08-23T06:24:51.140601Z nonode@nohost <0.82.0> -------- config: [admins] admin set to -pbkdf2-ea9beb38474607c1ffb9304d288ba2ff93e2f38a,3ecf788116d8c27020f5012f72114bed,10 for reason nil
[notice] 2017-08-23T06:24:51.173160Z nonode@nohost <0.82.0> -------- config: [couchdb] uuid set to 5b92249aebb2e742f2a86b0cfaeca017 for reason nil
[info] 2017-08-23T06:24:51.219024Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _users
[info] 2017-08-23T06:24:51.284558Z nonode@nohost <0.198.0> -------- Apache CouchDB has started. Time to relax.
[info] 2017-08-23T06:24:51.284667Z nonode@nohost <0.198.0> -------- Apache CouchDB has started on http://127.0.0.1:5986/
[info] 2017-08-23T06:24:51.284794Z nonode@nohost <0.7.0> -------- Application couch started on node nonode@nohost
[info] 2017-08-23T06:24:51.284944Z nonode@nohost <0.7.0> -------- Application ets_lru started on node nonode@nohost
[info] 2017-08-23T06:24:51.293670Z nonode@nohost <0.7.0> -------- Application rexi started on node nonode@nohost
[info] 2017-08-23T06:24:51.304787Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _nodes
[info] 2017-08-23T06:24:51.326838Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _dbs
[error] 2017-08-23T06:24:51.327172Z nonode@nohost emulator -------- Error in process <0.287.0> with exit value:
{{badmatch,file_exists},[{mem3_shards,fold,2,[{file,"src/mem3_shards.erl"},{line,156}]},{mem3_sync,initial_sync,1,[{file,"src/mem3_sync.erl"},{line,241}]}]}
[info] 2017-08-23T06:24:51.332055Z nonode@nohost <0.7.0> -------- Application mem3 started on node nonode@nohost
[info] 2017-08-23T06:24:51.332224Z nonode@nohost <0.7.0> -------- Application fabric started on node nonode@nohost
[info] 2017-08-23T06:24:51.345163Z nonode@nohost <0.7.0> -------- Application chttpd started on node nonode@nohost
[notice] 2017-08-23T06:24:51.352322Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:24:51.352374Z nonode@nohost emulator -------- Error in process <0.326.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[info] 2017-08-23T06:24:51.355973Z nonode@nohost <0.7.0> -------- Application couch_index started on node nonode@nohost
[info] 2017-08-23T06:24:51.356033Z nonode@nohost <0.7.0> -------- Application couch_mrview started on node nonode@nohost
[info] 2017-08-23T06:24:51.356059Z nonode@nohost <0.7.0> -------- Application couch_plugins started on node nonode@nohost
[info] 2017-08-23T06:24:51.364246Z nonode@nohost <0.204.0> -------- open_result error {not_found,no_db_file} for _replicator
[notice] 2017-08-23T06:24:51.369132Z nonode@nohost <0.344.0> -------- creating replicator ddoc
[info] 2017-08-23T06:24:51.383827Z nonode@nohost <0.7.0> -------- Application couch_replicator started on node nonode@nohost
[info] 2017-08-23T06:24:51.383960Z nonode@nohost <0.7.0> -------- Application couch_peruser started on node nonode@nohost
[info] 2017-08-23T06:24:51.401242Z nonode@nohost <0.7.0> -------- Application ddoc_cache started on node nonode@nohost
[info] 2017-08-23T06:24:51.417532Z nonode@nohost <0.7.0> -------- Application global_changes started on node nonode@nohost
[info] 2017-08-23T06:24:51.417678Z nonode@nohost <0.7.0> -------- Application jiffy started on node nonode@nohost
[info] 2017-08-23T06:24:51.429375Z nonode@nohost <0.7.0> -------- Application mango started on node nonode@nohost
[info] 2017-08-23T06:24:51.434651Z nonode@nohost <0.7.0> -------- Application setup started on node nonode@nohost
[info] 2017-08-23T06:24:51.434778Z nonode@nohost <0.7.0> -------- Application snappy started on node nonode@nohost
[notice] 2017-08-23T06:24:56.352930Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:24:56.353035Z nonode@nohost emulator -------- Error in process <0.452.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:01.354009Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:01.354101Z nonode@nohost emulator -------- Error in process <0.549.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:06.354952Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:06.355051Z nonode@nohost emulator -------- Error in process <0.614.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:11.355838Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:11.355906Z nonode@nohost emulator -------- Error in process <0.711.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:16.356958Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:16.357344Z nonode@nohost emulator -------- Error in process <0.776.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:21.357853Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:21.358180Z nonode@nohost emulator -------- Error in process <0.873.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:26.358993Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:26.359290Z nonode@nohost emulator -------- Error in process <0.938.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:31.359967Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:31.360380Z nonode@nohost emulator -------- Error in process <0.1019.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
[notice] 2017-08-23T06:25:36.360980Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:327) <= mem3_shards:load_shards_from_disk/1(line:315) <= mem3_shards:load_shards_from_disk/2(line:331) <= mem3_shards:for_docid/3(line:87) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-08-23T06:25:36.361417Z nonode@nohost emulator -------- Error in process <0.1100.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}
以下是我的观察: 1. CouchDB 使用 nonode@nohost 创建节点 2. CouchDB 默认数据库 _nodes , _dbs, _replicator 未创建。
我需要任何特定的配置/许可吗? 我试图分析 couchDB 源但没有成功:(
fabric-couchDB 映像创建了 couchDB 容器,这些容器应该作为 Hyperledger Fabric 对等点的 stateDB 持有者,因此每个沙发容器应该与对等点一对一连接。您可以查看 docker-compose 示例 here in the official doc.
也就是说,这里的错误看起来很正常,因为沙发上需要一些初始设置来创建一些默认数据库。(Fabric peers 将其作为 statedb 建立例程的一部分)请参阅官方 couch config setup doc here.