Hyperledger fabric 无法导入业务网卡

Hyperledger fabric 无法导入业务网卡,hyperledger-fabric,hyperledger-composer,Hyperledger Fabric,Hyperledger Composer,当我试图使用命令composer card import-f导入一张商业网卡时PeerAdmin@byfn-network-org1-only.card它显示以下错误消息 无法导入业务网卡 关键词:必选 数据路径: schemaPath:/必选 参数: missingProperty:x-type 消息:应具有必需的属性“x-type” 关键词:必选 数据路径: schemaPath:/必选 参数: 丢失属性:客户端 消息:应具有必需的属性“客户端” 关键词:必选 数据路径: schemaPat

当我试图使用命令composer card import-f导入一张商业网卡时PeerAdmin@byfn-network-org1-only.card它显示以下错误消息

无法导入业务网卡 关键词:必选 数据路径: schemaPath:/必选 参数: missingProperty:x-type 消息:应具有必需的属性“x-type” 关键词:必选 数据路径: schemaPath:/必选 参数: 丢失属性:客户端 消息:应具有必需的属性“客户端” 关键词:必选 数据路径: schemaPath:/必选 参数: 丢失属性:certificateAuthorities 消息:应具有必需的属性“certificateAuthorities” 关键词:必选 数据路径: schemaPath:/必选 参数: 丢失属性:频道 消息:应具有必需的属性“通道” 关键词:类型 数据路径:。订购者 schemaPath:/type 参数: 类型:对象 消息:应该是对象 关键词:类型 数据路径:。对等点 schemaPath:/type 参数: 类型:对象 消息:应该是对象 错误:在卡的连接配置文件中发现错误 命令失败

我的FABRIC_版本设置如下 结构版本=hlfv11

编写器版本为v0.19.5

connection.json的内容如下所示

{
"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
}

这里的问题是什么?
基于此连接文件格式,我应该更改什么以支持卡?如果我将连接格式更改为旧版本,它将正常工作。但是如何使用相同的格式?

您必须编写x-type:hlfv11而不是type:hlfv11。

此处显示的连接配置文件的格式是Composer 0.16.x格式,并且由于没有受支持的hlfv11类型,因此有点不正确

当您尝试使用较新版本的Composer时,需要以新格式定义连接配置文件。可在此处找到该格式的参考

Composer教程还提供了有关连接配置文件的更多信息