gpt4 book ai didi

java - Hyperledger Fabcar : Error: could not assemble transaction, err 提案响应不成功

转载 作者:行者123 更新时间:2023-11-29 04:06:17 24 4
gpt4 key购买 nike

我正在尝试在我的本地机器上运行最新的 Fabric 1.4 Fabcar。我安装了清理 docker 镜像的先决条件并运行以下命令

fabric-samples/fabcar: ./startFabric.sh java

我可以看到正在对等节点上安装链代码,但是一旦它到达 channel ,我就会收到以下错误

`错误:无法组装交易,错误提议响应不成功,错误代码 500,消息链码注册失败:容器以 254 退出

我也试过

./startFabric.sh javascript and ./startFabric.sh

但我得到了相同的结果。我能够运行并查询 '''first-network''' ok,但无法启动 Fabcar :(

此外,如果我从 java 应用程序中进行 mvn 测试,我会得到

Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: 
org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock
for channel mychannel failed with peer peer0.org1.example.com. Status
FAILURE, details: Channel Channel{id: 1, name: mychannel} Sending
proposal with transaction:
e545101510caaf0cbb9ff5e193b648308a93e53a459599c2d85f2cd9d4f181bc to
Peer{ id: 2, name: peer0.org1.example.com, channelName: mychannel, url:
grpcs://localhost:7051, mspid: Org1MSP} failed because of: gRPC
failure=Status{code=UNKNOWN, description=access denied: channel
[mychannel] creator org [Org1MSP], cause=null}

感谢任何帮助

启动日志

Installing smart contract on peer1.org2.example.com
+ docker exec -e CORE_PEER_LOCALMSPID=Org2MSP -e CORE_PEER_ADDRESS=peer1.org2.example.com:10051 -e CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp -e 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 cli peer chaincode install -n fabcar -v 1.0 -p /opt/gopath/src/github.com/chaincode/fabcar/java -l java
2019-10-21 19:59:41.619 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-10-21 19:59:41.619 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-10-21 19:59:42.006 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
+ echo 'Instantiating smart contract on mychannel'
Instantiating smart contract on mychannel
+ docker exec -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n fabcar -l java -v 1.0 -c '{"Args":[]}' -P 'AND('\''Org1MSP.member'\'','\''Org2MSP.member'\'')' --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --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
2019-10-21 19:59:42.387 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-10-21 19:59:42.388 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1```

docker ps -a

```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
44d6dd0274cb hyperledger/fabric-tools:latest "/bin/bash" 6 minutes ago Up 6 minutes cli
ff7b5068437e hyperledger/fabric-peer:latest "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:7051->7051/tcp peer0.org1.example.com
5806c85ba8b7 hyperledger/fabric-peer:latest "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:9051->9051/tcp peer0.org2.example.com
fd722bc9df2d hyperledger/fabric-peer:latest "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:10051->10051/tcp peer1.org2.example.com
9031600fe52a hyperledger/fabric-peer:latest "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:8051->8051/tcp peer1.org1.example.com
69c4f20893e8 hyperledger/fabric-orderer:latest "orderer" 6 minutes ago Up 6 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
8325f89e702a hyperledger/fabric-couchdb "tini -- /docker-ent…" 6 minutes ago Up 6 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0
7d83b2cff3c3 hyperledger/fabric-couchdb "tini -- /docker-ent…" 6 minutes ago Up 6 minutes 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdb3
0a94844d9fe4 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 6 minutes ago Up 6 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1
1da63403427f hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 6 minutes ago Up 6 minutes 7054/tcp, 0.0.0.0:8054->8054/tcp ca_peerOrg2
9e3ece2b615a hyperledger/fabric-couchdb "tini -- /docker-ent…" 6 minutes ago Up 6 minutes 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdb2
91e08de9c145 hyperledger/fabric-couchdb "tini -- /docker-ent…" 6 minutes ago Up 6 minutes 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb1```

最佳答案

失败的原因可能有很多,要么路径设置不正确,要么安装的链代码对等节点可能无法访问。

你能尝试使用这些命令并尝试再次旋转吗

docker kill $(docker ps -q)docker rm $(docker ps -aq)docker rmi $(docker images dev-* -q)

关于java - Hyperledger Fabcar : Error: could not assemble transaction, err 提案响应不成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58476422/

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