如何在多台主机的Hyperledger Fabric上部署.bna文件

时间:2018-07-30 06:19:03

标签: hyperledger-fabric

我已遵循多主机上的Hyperledger Fabric教程 由Wahab https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f。 现在,我正在尝试部署自己的.bna文件而不是chaincode。任何人都可以帮助如何部署它。我无法安装卡。 Connection.json

{
    "name": "fabric-network",
    "x-type": "hlfv1",
    "version": "1.0.0",
    "peers": {
        "peer0.org1.example.com": {
            "url": "grpc://localhost:7051",
            "eventUrl": "grpc://localhost:7053"
        },
        "peer1.org1.example.com": {
            "url": "grpc://192.168.64.82:7051",
            "eventUrl": "grpc://192.168.64.82:7053"
        }
    },
    "certificateAuthorities": {
        "ca.example.com": {
            "url": "http://localhost:7054",
            "caName": "ca.example.com"
        }
    },
    "orderers": {
        "orderer.example.com": {
            "url": "grpc://localhost:7050"
        }
    },
    "organizations": {
        "Org1": {
            "mspid": "Org1MSP",
            "peers": [
                "peer0.org1.example.com",
                "peer1.org1.example.com"
            ],
            "certificateAuthorities": [
                "ca.example.com"
            ]
        }
    },
    "channels": {
        "mychannel": {
            "orderers": [
                "orderer.example.com"
            ],
            "peers": {
                "peer0.org1.example.com": {
                    "endorsingPeer": true,
                    "chaincodeQuery": true,
                    "eventSource": true
                },
                "peer1.org1.example.com": {
                    "endorsingPeer": true,
                    "chaincodeQuery": true,
                    "eventSource": true
                 }
               
            }
        }
    },
    "client": {
        "organization": "Org1",
        "connection": {
            "timeout": {
                "peer": {
                    "endorser": "300",
                    "eventHub": "300",
                    "eventReg": "300"
                },
                "orderer": "300"
            }
        }
    }
}

2 个答案:

答案 0 :(得分:0)

我建议您遵循official tutorial of Hyperledger Composer

还说明了如何配置卡的连接配置文件。

答案 1 :(得分:0)

我一直在处理相同的问题,使用相同的教程。好吧,我设法配置了连接配置文件以使其能够连接,但是在授权和其他方面出现了其他问题。

我认为您的端口不正确,请尝试以下方法(对我有用):

 "peer0.org1.example.com": {
        "url": "grpc://localhost:8051",
        "eventUrl": "grpc://localhost:8053"
    },
    "peer1.org1.example.com": {
        "url": "grpc://192.168.64.82:9051",
        "eventUrl": "grpc://192.168.64.82:9053"