Open jzp-cn opened 3 years ago
开始创建通道...... Create channel and join error: Create channel error: error should be nil for SaveChannel of orgchannel: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1 到最后一步失败,不知道为什么,能不能讲解一下
真实主机也失败了
root@ubuntu-s-1vcpu-2gb-sgp1-01:~/go/src/fabric-go-sdk# ./fabric-go-sdk
开始创建通道...... Create channel and join error: Create channel error: error should be nil for SaveChannel of orgchannel: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1 root@ubuntu-s-1vcpu-2gb-sgp1-01:~/go/src/fabric-go-sdk# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 405b09b77e13 dev-peer1.org1.example.com-simplecc_1.0.0-a0cdc697d3e6c3a55d58e5903b2da9b5e2417ec92dabef073ad2fa717a3a8b23-6e2e0d00b920a86e423d409e364ec39476b27319b19f1531b681424e9a1fd8f8 "chaincode -peer.add…" 4 hours ago Up 4 hours dev-peer1.org1.example.com-simplecc_1.0.0-a0cdc697d3e6c3a55d58e5903b2da9b5e2417ec92dabef073ad2fa717a3a8b23 333fd97b06af dev-peer0.org1.example.com-simplecc_1.0.0-a0cdc697d3e6c3a55d58e5903b2da9b5e2417ec92dabef073ad2fa717a3a8b23-1f4c62a78c81290dabf00a2065b8bad4a5dbb835029f7a21a7374fbe12f362d1 "chaincode -peer.add…" 4 hours ago Up 4 hours dev-peer0.org1.example.com-simplecc_1.0.0-a0cdc697d3e6c3a55d58e5903b2da9b5e2417ec92dabef073ad2fa717a3a8b23 613d2ae67690 hyperledger/fabric-peer:2.2 "peer node start" 4 hours ago Up 4 hours 0.0.0.0:7051->7051/tcp, :::7051->7051/tcp peer0.org1.example.com cc0e128f0db0 hyperledger/fabric-peer:2.2 "peer node start" 4 hours ago Up 4 hours 7051/tcp, 0.0.0.0:9051->9051/tcp, :::9051->9051/tcp peer1.org1.example.com ba8a916ecc89 hyperledger/fabric-ca:1.4.9 "sh -c 'fabric-ca-se…" 4 hours ago Up 4 hours 0.0.0.0:7054->7054/tcp, :::7054->7054/tcp ca.org1.example.com 516a95f1226e hyperledger/fabric-couchdb:latest "tini -- /docker-ent…" 4 hours ago Up 4 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp, :::5984->5984/tcp couchdb0 802cc63d1401 hyperledger/fabric-couchdb:latest "tini -- /docker-ent…" 4 hours ago Up 4 hours 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp, :::7984->5984/tcp couchdb1 8e5e08dfd1cb hyperledger/fabric-orderer:2.2 "orderer" 4 hours ago Up 4 hours 0.0.0.0:7050->7050/tcp, :::7050->7050/tcp orderer.example.com
create chaincode lifecycle error: %v queryApprovedCC error: Org Org1 Peer peer0.org1.example.com:7051 NewInvoker error: Test status Code: (12) UNKNOWN. Description: LifecycleQueryApprovedCC returned error: querying for installed chaincode failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'QueryApprovedChaincodeDefinition': could not fetch approved chaincode definition (name: 'simplecc', sequence: '1') on channel 'mychannel'
请问有人遇到这个问题吗?
开始创建通道...... Create channel and join error: Create channel error: error should be nil for SaveChannel of orgchannel: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1 到最后一步失败,不知道为什么,能不能讲解一下
这个应该是通道已经创建了 不过在上一次运行的时候由于没有设置 orderer.example.com 的DNS 映射 没有找到相应的节点 可以先 docker-compose down 关闭网络 随后在 /etc/hosts/ 中添加 127.0.0.1 orderer.example.com 其他节点的域名需要同样处理,希望能解决你的问题
开始创建通道...... Create channel and join error: Create channel error: error should be nil for SaveChannel of orgchannel: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1 到最后一步失败,不知道为什么,能不能讲解一下
通道被重复创建了,可以cd到fixtures文件夹里,运行命令docker-compose down --volumes --remove-orphans 再重新启动docker-compose就可以,当然后面这一步还是需要(在 /etc/hosts/ 中添加 127.0.0.1 orderer.example.com)
具体参考链接https://blog.csdn.net/weixin_46085718/article/details/127442643?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-127442643-blog-124097000.235%5Ev36%5Epc_relevant_default_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-127442643-blog-124097000.235%5Ev36%5Epc_relevant_default_base3&utm_relevant_index=3
create chaincode lifecycle error: %v queryApprovedCC error: Org Org1 Peer peer0.org1.example.com:7051 NewInvoker error: Test status Code: (12) UNKNOWN. Description: LifecycleQueryApprovedCC returned error: querying for installed chaincode failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'QueryApprovedChaincodeDefinition': could not fetch approved chaincode definition (name: 'simplecc', sequence: '1') on channel 'mychannel'
请问有人遇 我遇到了这个问题,请问你解决了吗?
create chaincode lifecycle error: %v queryApprovedCC error: Org Org1 Peer peer0.org1.example.com:7051 NewInvoker error: Test status Code: (12) UNKNOWN. Description: LifecycleQueryApprovedCC returned error: querying for installed chaincode failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'QueryApprovedChaincodeDefinition': could not fetch approved chaincode definition (name: 'simplecc', sequence: '1') on channel 'mychannel' 请问有人遇 我遇到了这个问题,请问你解决了吗?
这个问题是安装链码成功之后组织批准的问题,在另一个问题里有大佬解决了,我也遇到了这个问题,具体原因go版本过高,是我使用的go1.22这个版本,通过gvm将版本降低到go1.17.4这个问题就解决了,至于为什么是1.17,因为前面大佬解决的时候用这个版本跑通了,我就跟着实验了确实没问题
cd /fabric-go-sdk/fixtures/ && docker-compose up -d
应该是 cd ./fabric-go-sdk/fixtures/ && docker-compose up -d
还有,我用的虚拟机,默认关闭防火墙,docker启动失败, ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-71c3b7ab98c2 -j RETURN: iptables: No chain/target/match by that name. 得重新打开防火墙才行