Couchdb Hyperledger编写器:ID为Y的集合中不存在ID为X的对象

Couchdb Hyperledger编写器:ID为Y的集合中不存在ID为X的对象,couchdb,hyperledger-fabric,hyperledger,hyperledger-composer,Couchdb,Hyperledger Fabric,Hyperledger,Hyperledger Composer,我启动Hyperledger Composer的业务网络,但在链码容器日志中我看到错误: Error: Object with ID 'Asset:org.hyperledger.composer.system.AssetRegistry' in collection with ID '$sysregistries' does not exist 2018-09-20T10:24:55.295Z [5570f8fe] ERROR :NodeDataCollection :ge

我启动Hyperledger Composer的业务网络,但在链码容器日志中我看到错误:

 Error: Object with ID 'Asset:org.hyperledger.composer.system.AssetRegistry' in collection with ID '$sysregistries' does not exist
2018-09-20T10:24:55.295Z [5570f8fe] ERROR    :NodeDataCollection       :get()                     Error: Object with ID 'Asset:org.hyperledger.composer.system.ParticipantRegistry' in collection with ID '$sysregistries' does not exist
2018-09-20T10:24:55.312Z [5570f8fe] ERROR    :NodeDataCollection       :get()                     Error: Object with ID 'Asset:org.hyperledger.composer.system.TransactionRegistry' in collection with ID '$sysregistries' does not exist
...
截图:

model.cto

namespace data.ru

transaction Transfer {
    o Double amount
    o String from
    o String to
    o String coin
    o String description
}
logic.js

/**
 * Track the token of a token from Project budget to workerWallet
 * @param {data.ru.Transfer} tx - the trade to be processed
 * @transaction
 */
async function Transfer(tx) {
    let foo = 'lol'
}
权限。acl

rule NetworkAdminUser {
     description: "Grant business network administrators full access to user resources"
     participant: "org.hyperledger.composer.system.NetworkAdmin"
     operation: ALL
     resource: "**"
     action: ALLOW
}
rule GrantSysAccess {
     description: "Grant access to all Participants to target system registries"
     participant: "org.hyperledger.composer.system.Participant"
     operation: ALL
     resource: "org.hyperledger.composer.system.**"
     action: ALLOW
}
发生了什么事

版本: 我尝试了Fabric v1.1+Composer v0.19.4、Fabric v1.2+Composer v0.20.0、Fabric v1.2+Composer v0.20.1

UPD1: 我更改了ACL,现在看到以下错误:

REST服务器未启动,
composer网络ping
抛出错误

UPD2: CouchDB容器具有以下状态读取错误:

****************************************************
WARNING: CouchDB is running in Admin Party mode.
         This will allow anyone with access to the
         CouchDB port to access your database. In
         Docker's default configuration, this is
         effectively any other container on the same
         system.
         Use "-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password"
         to set it in "docker run".
****************************************************
[os_mon] cpu supervisor port (cpu_sup): Error writing to Erlang
[info] 2018-09-25T18:05:05.018712Z nonode@nohost <0.7.0> -------- Application couch_log started on node nonode@nohost
[info] 2018-09-25T18:05:05.048838Z nonode@nohost <0.7.0> -------- Application folsom started on node nonode@nohost
[info] 2018-09-25T18:05:05.272179Z nonode@nohost <0.7.0> -------- Application couch_stats started on node nonode@nohost
[info] 2018-09-25T18:05:05.276028Z nonode@nohost <0.7.0> -------- Application khash started on node nonode@nohost
[info] 2018-09-25T18:05:05.312633Z nonode@nohost <0.7.0> -------- Application couch_event started on node nonode@nohost
[info] 2018-09-25T18:05:05.359547Z nonode@nohost <0.7.0> -------- Application ibrowse started on node nonode@nohost
[info] 2018-09-25T18:05:05.394067Z nonode@nohost <0.7.0> -------- Application ioq started on node nonode@nohost
[info] 2018-09-25T18:05:05.394480Z nonode@nohost <0.7.0> -------- Application mochiweb started on node nonode@nohost
[info] 2018-09-25T18:05:05.468773Z nonode@nohost <0.195.0> -------- Apache CouchDB 2.1.1 is starting.
2018-09-25T18:05:05.473169200Z 
[info] 2018-09-25T18:05:05.468889Z nonode@nohost <0.196.0> -------- Starting couch_sup
[notice] 2018-09-25T18:05:05.994312Z nonode@nohost <0.82.0> -------- config: [couchdb] uuid set to 06fcb3139f2556dea3ecb459701ef841 for reason nil
[info] 2018-09-25T18:05:06.196057Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _users
[info] 2018-09-25T18:05:06.666443Z nonode@nohost <0.195.0> -------- Apache CouchDB has started. Time to relax.
2018-09-25T18:05:06.666743100Z 
[info] 2018-09-25T18:05:06.666589Z nonode@nohost <0.195.0> -------- Apache CouchDB has started on http://127.0.0.1:5986/
[info] 2018-09-25T18:05:06.667295Z nonode@nohost <0.7.0> -------- Application couch started on node nonode@nohost
[info] 2018-09-25T18:05:06.667862Z nonode@nohost <0.7.0> -------- Application ets_lru started on node nonode@nohost
[info] 2018-09-25T18:05:06.787977Z nonode@nohost <0.7.0> -------- Application rexi started on node nonode@nohost
[info] 2018-09-25T18:05:06.924139Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _nodes
[warning] 2018-09-25T18:05:06.924214Z nonode@nohost <0.269.0> -------- creating missing database: _nodes
[info] 2018-09-25T18:05:07.123007Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _dbs
[warning] 2018-09-25T18:05:07.123047Z nonode@nohost <0.282.0> -------- creating missing database: _dbs
[warning] 2018-09-25T18:05:07.123103Z nonode@nohost <0.281.0> -------- creating missing database: _dbs
[info] 2018-09-25T18:05:07.197369Z nonode@nohost <0.7.0> -------- Application mem3 started on node nonode@nohost
[info] 2018-09-25T18:05:07.198244Z nonode@nohost <0.7.0> -------- Application fabric started on node nonode@nohost
[info] 2018-09-25T18:05:07.341215Z nonode@nohost <0.7.0> -------- Application chttpd started on node nonode@nohost
[notice] 2018-09-25T18:05:07.437433Z nonode@nohost <0.318.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:403) <= mem3_shards:load_shards_from_disk/1(line:378) <= mem3_shards:load_shards_from_disk/2(line:407) <= mem3_shards:for_docid/3(line:91) <= 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] 2018-09-25T18:05:07.438260Z nonode@nohost emulator -------- Error in process <0.319.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{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}]}]}
2018-09-25T18:05:07.438932100Z 
[info] 2018-09-25T18:05:07.463182Z nonode@nohost <0.7.0> -------- Application couch_index started on node nonode@nohost
[info] 2018-09-25T18:05:07.463880Z nonode@nohost <0.7.0> -------- Application couch_mrview started on node nonode@nohost
[info] 2018-09-25T18:05:07.465702Z nonode@nohost <0.7.0> -------- Application couch_plugins started on node nonode@nohost
[notice] 2018-09-25T18:05:07.727972Z nonode@nohost <0.82.0> -------- config: [features] scheduler set to true for reason nil
[info] 2018-09-25T18:05:07.878473Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _replicator
[notice] 2018-09-25T18:05:07.895340Z nonode@nohost <0.335.0> -------- creating replicator ddoc <<"_replicator">>
[info] 2018-09-25T18:05:07.946918Z nonode@nohost <0.7.0> -------- Application couch_replicator started on node nonode@nohost
[info] 2018-09-25T18:05:08.054017Z nonode@nohost <0.7.0> -------- Application couch_peruser started on node nonode@nohost
[info] 2018-09-25T18:05:08.158935Z nonode@nohost <0.7.0> -------- Application ddoc_cache started on node nonode@nohost
[info] 2018-09-25T18:05:08.277989Z nonode@nohost <0.7.0> -------- Application global_changes started on node nonode@nohost
[info] 2018-09-25T18:05:08.278081Z nonode@nohost <0.7.0> -------- Application jiffy started on node nonode@nohost
[info] 2018-09-25T18:05:08.332579Z nonode@nohost <0.7.0> -------- Application mango started on node nonode@nohost
[info] 2018-09-25T18:05:08.385098Z nonode@nohost <0.7.0> -------- Application setup started on node nonode@nohost
[info] 2018-09-25T18:05:08.385467Z nonode@nohost <0.7.0> -------- Application snappy started on node nonode@nohost
[notice] 2018-09-25T18:05:11.575347Z nonode@nohost <0.408.0> 6e22d58556 prod.couchdb0:5984 172.19.0.18 undefined GET / 200 ok 360
[notice] 2018-09-25T18:05:11.595380Z nonode@nohost <0.408.0> 5c382d8031 prod.couchdb0:5984 172.19.0.18 undefined GET /_users 404 ok 18
[notice] 2018-09-25T18:05:11.861220Z nonode@nohost <0.408.0> 1442f9e149 prod.couchdb0:5984 172.19.0.18 undefined PUT /_users 201 ok 262
[notice] 2018-09-25T18:05:11.878138Z nonode@nohost <0.408.0> 95214ad958 prod.couchdb0:5984 172.19.0.18 undefined GET /_replicator 404 ok 10
[notice] 2018-09-25T18:05:11.972074Z nonode@nohost <0.408.0> 166c792292 prod.couchdb0:5984 172.19.0.18 undefined PUT /_replicator 201 ok 93
[notice] 2018-09-25T18:05:11.977357Z nonode@nohost <0.408.0> b382ab14e2 prod.couchdb0:5984 172.19.0.18 undefined GET /_global_changes 404 ok 0
[notice] 2018-09-25T18:05:12.069778Z nonode@nohost <0.408.0> d418e5618a prod.couchdb0:5984 172.19.0.18 undefined PUT /_global_changes 201 ok 91
[notice] 2018-09-25T18:05:12.602754Z nonode@nohost <0.339.0> -------- couch_replicator_clustering : cluster stable
[notice] 2018-09-25T18:05:12.654492Z nonode@nohost <0.355.0> -------- Started replicator db changes listener <0.621.0>
[notice] 2018-09-25T18:05:12.812625Z nonode@nohost <0.621.0> -------- creating replicator ddoc <<"shards/80000000-9fffffff/_replicator.1537898711">>
[notice] 2018-09-25T18:05:36.789649Z nonode@nohost <0.259.0> -------- rexi_server : cluster stable
[notice] 2018-09-25T18:05:36.789816Z nonode@nohost <0.262.0> -------- rexi_buffer : cluster stable
[info] 2018-09-25T18:05:58.633694Z nonode@nohost <0.47.0> -------- alarm_handler: {set,{system_memory_high_watermark,[]}}
[notice] 2018-09-25T18:06:06.666377Z nonode@nohost <0.408.0> 95867339bc prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_ 404 ok 1
[notice] 2018-09-25T18:06:06.686838Z nonode@nohost <0.408.0> bea30c73cc prod.couchdb0:5984 172.19.0.18 undefined PUT /innochannel_ 201 ok 19
[notice] 2018-09-25T18:06:06.709583Z nonode@nohost <0.408.0> 71afb691d1 prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_ 200 ok 6
[notice] 2018-09-25T18:06:06.724057Z nonode@nohost <0.408.0> 872d7415cf prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_all_docs?include_docs=true 200 ok 11
[notice] 2018-09-25T18:06:06.756062Z nonode@nohost <0.408.0> 6056d80f3e prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_bulk_docs 201 ok 24
[notice] 2018-09-25T18:06:06.762868Z nonode@nohost <0.408.0> 400e31e2d1 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_ensure_full_commit 201 ok 0
[notice] 2018-09-25T18:06:06.768360Z nonode@nohost <0.408.0> cfee83e5b5 prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/statedb_savepoint?attachments=true 404 ok 2
[notice] 2018-09-25T18:06:06.780689Z nonode@nohost <0.408.0> a1b02dc611 prod.couchdb0:5984 172.19.0.18 undefined PUT /innochannel_/statedb_savepoint 201 ok 2
[notice] 2018-09-25T18:06:06.803853Z nonode@nohost <0.408.0> 9edfa0853e prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/resourcesconfigtx.CHANNEL_CONFIG_KEY?attachments=true 200 ok 18
[notice] 2018-09-25T18:06:06.893056Z nonode@nohost <0.1497.0> 7db3f676ba prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/_index/ 200 ok 124
[notice] 2018-09-25T18:06:48.139490Z nonode@nohost <0.1497.0> 4da3570f28 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_all_docs?include_docs=true 200 ok 3
[notice] 2018-09-25T18:06:48.165927Z nonode@nohost <0.1497.0> a72ed4fa85 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_bulk_docs 201 ok 5
[notice] 2018-09-25T18:06:48.207188Z nonode@nohost <0.408.0> 73d435932b prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/_index/ 200 ok 1
[notice] 2018-09-25T18:06:48.222438Z nonode@nohost <0.1497.0> 1f62357270 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_ensure_full_commit 201 ok 35
[notice] 2018-09-25T18:06:48.232136Z nonode@nohost <0.1497.0> f11bc6bcbc prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/statedb_savepoint?attachments=true 200 ok 8
[notice] 2018-09-25T18:06:48.253684Z nonode@nohost <0.1497.0> 49ddf1aa8f prod.couchdb0:5984 172.19.0.18 undefined PUT /innochannel_/statedb_savepoint 201 ok 19
[notice] 2018-09-25T18:06:58.500154Z nonode@nohost <0.1497.0> 2b3ee9a234 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_all_docs?include_docs=true 200 ok 2
[notice] 2018-09-25T18:06:58.510611Z nonode@nohost <0.1497.0> 95e5445017 prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_bulk_docs 201 ok 3
[notice] 2018-09-25T18:06:58.513963Z nonode@nohost <0.1497.0> 6495673a8b prod.couchdb0:5984 172.19.0.18 undefined POST /innochannel_/_ensure_full_commit 201 ok 0
[notice] 2018-09-25T18:06:58.517361Z nonode@nohost <0.1497.0> 5a1d2cf955 prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/_index/ 200 ok 1
[notice] 2018-09-25T18:06:58.519305Z nonode@nohost <0.408.0> ebbe7dcb7f prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_/statedb_savepoint?attachments=true 200 ok 2
[notice] 2018-09-25T18:06:58.521894Z nonode@nohost <0.408.0> 38f093125c prod.couchdb0:5984 172.19.0.18 undefined PUT /innochannel_/statedb_savepoint 201 ok 1
[notice] 2018-09-25T18:07:41.238723Z nonode@nohost <0.408.0> 10fa822614 prod.couchdb0:5984 172.19.0.18 undefined GET /innochannel_lscc 404 ok 1
[notice] 2018-09-25T18:07:41.304338Z nonode@nohost <0.408.0> c3b163c2c4 prod.couchdb0:5...
****************************************************
警告:CouchDB正在管理方模式下运行。
这将允许任何人访问
用于访问数据库的CouchDB端口。在里面
Docker的默认配置是
实际上,同一容器上的任何其他容器
系统。
使用“-e COUCHDB_USER=admin-e COUCHDB_PASSWORD=PASSWORD”
将其设置为“docker run”。
****************************************************
[os_-mon]cpu监视器端口(cpu_-sup):写入Erlang时出错
[信息]2018-09-25T18:05:05.018712Znonode@nohost----------已在节点上启动应用程序日志nonode@nohost
[信息]2018-09-25T18:05:05.048838Znonode@nohost-----已在节点上启动应用程序文件夹nonode@nohost
[信息]2018-09-25T18:05:05.272179Znonode@nohost----------节点上已启动应用程序统计信息nonode@nohost
[信息]2018-09-25T18:05:05.276028Znonode@nohost-----应用程序已在节点上启动nonode@nohost
[信息]2018-09-25T18:05:05.312633Znonode@nohost----------节点上已启动应用程序\u事件nonode@nohost
[信息]2018-09-25T18:05:05.359547Znonode@nohost-----已在节点上启动应用程序ibrowsenonode@nohost
[信息]2018-09-25T18:05:05.394067Znonode@nohost-----应用程序ioq已在节点上启动nonode@nohost
[信息]2018-09-25T18:05:05.394480Znonode@nohost-----已在节点上启动应用程序mochiwebnonode@nohost
[信息]2018-09-25T18:05:05.468773Znonode@nohost-----Apache CouchDB 2.1.1正在启动。
2018-09-25T18:05:05.473169200Z
[信息]2018-09-25T18:05:05.468889Znonode@nohost-----启动coach_sup
[通知]2018-09-25T18:05:05.994312Znonode@nohost-----配置:[couchdb]uuid设置为06fcb3139f2556dea3ecb459701ef841,原因为零
[信息]2018-09-25T18:05:06.196057Znonode@nohost----------为_用户打开_结果错误{未找到,没有_db_文件}
[信息]2018-09-25T18:05:06.666443Znonode@nohost-----Apache CouchDB已启动。是时候放松了。
2018-09-25T18:05:06.666743100Z
[信息]2018-09-25T18:05:06.666589Znonode@nohost-----Apache CouchDB已在上启动http://127.0.0.1:5986/
[信息]2018-09-25T18:05:06.667295Znonode@nohost-----已在节点上启动应用程序nonode@nohost
[信息]2018-09-25T18:05:06.667862Znonode@nohost-----应用程序ets\U lru已在节点上启动nonode@nohost
[信息]2018-09-25T18:05:06.787977Znonode@nohost-----已在节点上启动应用程序rexinonode@nohost
[信息]2018-09-25T18:05:06.924139Znonode@nohost----------打开\u节点的\u结果错误{未找到,没有\u db\u文件}
[警告]2018-09-25T18:05:06.924214Znonode@nohost-----正在创建缺少的数据库:\u节点
[信息]2018-09-25T18:05:07.123007Znonode@nohost----------打开\u dbs的\u结果错误{未找到,没有\u db\u文件}
[警告]2018-09-25T18:05:07.123047Znonode@nohost-----正在创建缺少的数据库:\u dbs
[警告]2018-09-25T18:05:07.123103Znonode@nohost-----正在创建缺少的数据库:\u dbs
[信息]2018-09-25T18:05:07.197369Znonode@nohost-----已在节点上启动应用程序mem3nonode@nohost
[信息]2018-09-25T18:05:07.198244Znonode@nohost----------已在节点上启动应用程序结构nonode@nohost
[信息]2018-09-25T18:05:07.341215Znonode@nohost-----已在节点上启动应用程序chttpdnonode@nohost

[通知]2018-09-25T18:05:07.437433Znonode@nohost-----chttpd_auth_cache changes侦听器死亡数据库_在mem3_shards中不存在:从_db/6(第403行)加载\u shards_在permissions.acl中添加以下内容

Allow network admins bound to NetworkAdmin participants have access to target resources

    rule NetworkAdminUser {
        description: "Grant business network administrators full access to user resources"
        participant: "org.hyperledger.composer.system.NetworkAdmin"
        operation: ALL
        resource: "**"
        action: ALLOW
      }
以下访问控制规则将允许所有参与者访问业务网络中的所有操作和命令,包括网络访问和业务网络访问

rule GrantSysAccess {
     description: "Grant access to all Participants to target system registries"
     participant: "org.hyperledger.composer.system.Participant"
     operation: ALL
     resource: "org.hyperledger.composer.system.**"
     action: ALLOW
   }

@david_k是对的,您不能注意链码容器中的此类错误。REST服务器没有启动,因为有必要替换REST(在card for REST中)使用的connection.json中的url key的值。

请参阅我更新的帖子(错误几乎相同),该消息不会影响它可以使用的链码的运行ignored@david_k不,它不起作用,因为当我启动Composer REST server时,我看到了这个错误:“错误:尝试ping时出错。错误:未能在截止日期之前连接到_checkRuntimeVersions.then.catch(/home/composer/.npm global/lib/node_modules/composer rest server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:806:34)”