导入业务网卡失败 [英] Failed to import the business network card
问题描述
当我尝试使用命令"composer card import -f PeerAdmin@byfn-network-org1-only.card"导入商务网卡时,显示以下错误消息.
When I tried to import a business network card using the command "composer card import -f PeerAdmin@byfn-network-org1-only.card" it shows the following error message.
无法导入名片
关键字:必填
dataPath:
schemaPath:#/必填
参数:
missingProperty:x型
消息:应该具有必需的属性"x-type"
关键字:必填
dataPath:
schemaPath:#/必填
参数:
missingProperty:客户端
消息:应具有必需的属性客户端"
关键字:必填
dataPath:
schemaPath:#/必填
参数:
missingProperty:certificateAuthorities
消息:应具有必需的属性"certificateAuthorities"
关键字:必填
dataPath:
schemaPath:#/必填
参数:
missingProperty:渠道
消息:应该具有必需的属性渠道"
关键字:类型
dataPath:.orderers
schemaPath:#/类型
参数:
类型:对象
消息:应该是对象
关键字:类型
dataPath:.peers
schemaPath:#/类型
参数:
类型:对象
消息:应该是对象
错误:在卡的连接配置文件中发现错误
命令失败
Failed to import the business network card
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: x-type
message: should have required property 'x-type'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: client
message: should have required property 'client'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: certificateAuthorities
message: should have required property 'certificateAuthorities'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: channels
message: should have required property 'channels'
keyword: type
dataPath: .orderers
schemaPath: #/type
params:
type: object
message: should be object
keyword: type
dataPath: .peers
schemaPath: #/type
params:
type: object
message: should be object
Error: Errors found in the connection profile in the card
Command failed
我的FABRIC_VERSION设置如下
FABRIC_VERSION = hlfv11
My FABRIC_VERSION is set as following
FABRIC_VERSION=hlfv11
composer版本为v0.19.5
composer version is v0.19.5
connection.json的内容如下所示.
The content of connection.json is shown below.
{
"name": "byfn-network-org1-only",
"type": "hlfv11",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpcs://localhost:7051",
"eventURL": "grpcs://localhost:7053",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "peer0.org1.example.com"
},
{
"requestURL": "grpcs://localhost:8051",
"eventURL": "grpcs://localhost:8053",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "peer1.org1.example.com"
}
],
"ca": {
"url": "https://localhost:7054",
"name": "ca-org1",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpcs://localhost:7050",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt",
"hostnameOverride": "orderer.example.com"
}
],
"channel": "mychannel",
"timeout": 300
}
这是什么问题?
基于此连接文件格式,我应该更改哪些支持卡?如果我将连接格式更改为旧版本,则可以使用.但是如何使用相同的格式?
What is the issue here?
What should I change to support cards based on this connection file format? If I change the connection format to older version, it will work. But how can I use the same format?
推荐答案
您必须写"x-type": "hlfv11"
而不是"type": "hlfv11"
.
这篇关于导入业务网卡失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!