无法从 Hyperledger Composer Playground 下载卡片
Cannot download card from Hyperledger Composer Playground
我正在尝试从 Playground UI 导出我的网络管理卡,但导出图标被禁用。此外,我在 Chrome 控制台中看到以下错误:
错误:必须激活名称为 'admin' 且标识符为 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb' 的当前身份。
如何从 Playground 导出网络管理员卡?
这是完整的 Firefox 日志:
Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ModelManager :addSystemModels() [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :<ResourceManager>() Binding in the tx names and impl
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : IdentityManager :validateIdentity() Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED)
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : Engine :query() Caught error, rethrowing [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :validateIdentity() Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED)
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :<ResourceManager>() Binding in the tx names and impl
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ModelManager :addSystemModels() [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848811
connected
main.d12285adf00f2401cf60.bundle.js:1:61666
您可以通过composer-cli
创建管理卡。
composer card create
-p connection.json
-u PeerAdmin -c Admin@org1.example.com-cert.pem
-k 114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk
-r PeerAdmin -r ChannelAdmin
添加 connection.json
文件如下:
{
"name": "fabric-network",
"type": "hlfv1",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
}
],
"ca": {
"url": "http://localhost:7054",
"name": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpc://localhost:7050"
}
],
"channel": "composerchannel",
"timeout": 300
}
证书文件可以在 signcerts 子目录 (fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
) 中找到并命名为 Admin@org1.example.com-cert.pem
.
私钥文件可以在keystore子目录中找到。私钥文件的名字是一个很长的十六进制字符串,后缀为_sk,例如114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk
。
Hyperledger Composer 提供分步教程
教程 @ https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.
这是我在GitHub上得到的答案:
The reason that the export is greyed out is because you are using the
bluemix staged Playground that is in the 'web-connector' mode. In
order to meaningfully export a business network card, you will need to
create a connection to Hyperledger Fabric. The steps you outline above
will not create a business network in Hyperledger Fabric, but within a
web connector.
If you follow the developer tutorial
(https://hyperledger.github.io/composer/tutorials/developer-tutorial)
you will be taken through the process of creating a (local) Fabric,
from which you can connect Playground and export business network
cards.
我正在尝试从 Playground UI 导出我的网络管理卡,但导出图标被禁用。此外,我在 Chrome 控制台中看到以下错误:
错误:必须激活名称为 'admin' 且标识符为 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb' 的当前身份。
如何从 Playground 导出网络管理员卡?
这是完整的 Firefox 日志:
Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ModelManager :addSystemModels() [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :<ResourceManager>() Binding in the tx names and impl
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver :resolveRelationship() Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : IdentityManager :validateIdentity() Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED)
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : Engine :query() Caught error, rethrowing [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :validateIdentity() Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED)
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager :<ResourceManager>() Binding in the tx names and impl
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions :createHistorianRecord() created historian record
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ModelManager :addSystemModels() [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848811
connected
main.d12285adf00f2401cf60.bundle.js:1:61666
您可以通过composer-cli
创建管理卡。
composer card create
-p connection.json
-u PeerAdmin -c Admin@org1.example.com-cert.pem
-k 114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk
-r PeerAdmin -r ChannelAdmin
添加 connection.json
文件如下:
{
"name": "fabric-network",
"type": "hlfv1",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
}
],
"ca": {
"url": "http://localhost:7054",
"name": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpc://localhost:7050"
}
],
"channel": "composerchannel",
"timeout": 300
}
证书文件可以在 signcerts 子目录 (fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
) 中找到并命名为 Admin@org1.example.com-cert.pem
.
私钥文件可以在keystore子目录中找到。私钥文件的名字是一个很长的十六进制字符串,后缀为_sk,例如114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk
。
Hyperledger Composer 提供分步教程 教程 @ https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.
这是我在GitHub上得到的答案:
The reason that the export is greyed out is because you are using the bluemix staged Playground that is in the 'web-connector' mode. In order to meaningfully export a business network card, you will need to create a connection to Hyperledger Fabric. The steps you outline above will not create a business network in Hyperledger Fabric, but within a web connector.
If you follow the developer tutorial (https://hyperledger.github.io/composer/tutorials/developer-tutorial) you will be taken through the process of creating a (local) Fabric, from which you can connect Playground and export business network cards.