在将bna部署到本地HLF后,无法连接回Bluemix HLF

时间:2017-04-21 23:37:48

标签: hyperledger-fabric hyperledger-composer

我在Bluemix自己的目录中创建了一个单独的connection.json文件,并将我的业务网络文件成功部署到Bluemix HLF,并且所有事务都可以通过CLI和Loopback API正常工作。然后我将相同的网络文件(bna)部署到本地Docker HLF,一切都运行了。但是现在我无法向Bluemix HLF发出任何CLI命令 - 我不断收到一条消息:“TypeError:无法读取未定义的属性'fail'”。我认为这是因为两个连接的用户和注册秘密是不同的。 .composer-credentials目录有一个member.WebAppAdmin文件(对应本地Docker HLF),但Bluemix HLF的用户是admin,我记得先前在.composer-credentials目录中看到了member.admin文件。它不在那里。

如果缺少的member.admin凭据文件确实是问题的根源,那么在连接到Bluemix HLF时如何创建正确的.composer-credentials文件?我使用CLI界面将bna文件部署/更新到HLF。我尝试了部署和更新命令,但继续得到“TypeError:无法读取未定义的属性'失败”错误。

1 个答案:

答案 0 :(得分:0)

You can edit your connection profiles to use different ~/.composer-credentials/ folders. You should use a different folder for each Fabric you want to connect to, otherwise the ECerts are going to get overwritten or intermingled.

E.g. a sample connection profile looks like this:

{ "type": "hlf", "membershipServicesURL": "grpc://localhost:7054", "peerURL": "grpc://localhost:7051", "eventHubURL": "grpc://localhost:7053", "keyValStore": "/Users/dselman/.composer-credentials", "deployWaitTime": "300", "invokeWaitTime": "100", "networks": { "digitalproperty-network": "cc2e7c63ebd68cc40425ca3b885c878183d3a3aa796f71154bc07955abd7e7d9", "vehicle-lifecycle-network": "ef7909bde9371c69ae9d6a2b3b7b74e532b3613b0eca1030607e46561e78e603" }

You can change the path for the keyValStore to ensure the certs for different connection profiles are in different locations on disk.