gpt4 book ai didi

docker - Fabric v1.2教程调用失败:build your first network

转载 作者:IT老高 更新时间:2023-10-28 21:41:17 25 4
gpt4 key购买 nike

当我按照 fabric(v1.2) (link here) 的教程执行调用以下命令时

peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]

我收到一个错误。

root@3e241e56114d:/opt/gopath/src/github.com/hyperledger/fabric/peer# 
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:<status:200 > payload:"\n \310\335\t\270\014\205Ie\022\0334R\237\025{\0107\230\317c\247\250\206&\242\306n\326\340\263\214\365\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement:<endorser:"\n\007Org1MSP\022\252\006-----BEGIN CERTIFICATE-----\nMIICKDCCAc6gAwIBAgIQBRhp5NBFLjyIpZGuVWWRyjAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xODA3MjQwMjU1MTJaFw0yODA3MjEwMjU1MTJa\nMGoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMQ0wCwYDVQQLEwRwZWVyMR8wHQYDVQQDExZwZWVyMC5vcmcx\nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBuEO2QW6RHxg\nX7t6yFWz+P+7+oGlo29oqeJ5FElI2UiSrXFIOZPlZva/XmVZRlEs1ApIRG5/6C6a\n/yej1AEFEaNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0j\nBCQwIoAgiTLQaCWgadDTWC+Hg5sK2dgqyLfssOp3ICw6Nc+JedIwCgYIKoZIzj0E\nAwIDSAAwRQIhAJYGk42WKfaJ9PeGlynVs58EAykvo/ct7JKGXBbCpqYAAiBj68QP\nHmrLnqRDUMaRoBxPHDaJwIi3wO+LuKBAa2kDSw==\n-----END CERTIFICATE-----\n" signature:"0D\002 \036\031lf\322l\331\0018c)\263a\334V\204\210\366\006\320NU\265\326\205)\306\210\2757\231\022\002 U\"\022&e</)\036\254qC\353H\377\377\322R\215\334I\003\362\301\277R\310p'\rn\303" >

orderer 容器也会打印如下的日志消息:

2018-07-24 03:26:59.429 UTC [orderer/common/broadcast] Handle -> WARN 020 Error reading from 172.18.0.7:35366: rpc error: code = Canceled desc = context cancele

最佳答案

我在使用这个“构建你的第一个网络教程”时遇到了类似的问题(在 Fabric v1.2 中使用 Invoke)。
在运行查询和调用命令之前在 org2 上安装 mycc 链代码为我解决了这个问题。
因此,您可以尝试将环境变量更改为 org2,然后再次运行 peer chaincode install 命令(这次将针对 org2)。之后,您应该能够运行查询并调用命令。

总之,试着用这个单线再去吧:
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp CORE_PEER_ADDRESS=peer0.org2.example .com:7051 CORE_PEER_LOCALMSPID="Org2MSP"CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt peer chaincode install -n mycc -v 1.0 -p github.com/chaincode/chaincode_example02/go/

关于docker - Fabric v1.2教程调用失败:build your first network,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51490272/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com