2021-09-11T09:01:44.057551180Z 2021-09-11 09:01:44.056919 I | http: TLS handshake error from 10.0.7.12:63563: tls: failed to verify client certificate: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "bsnca")
加入通道失败:
genesis block retrieval failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [order2.23x.orderglobalnode.bsnbase.com:17052]: waiting for connection failed: context deadline exceeded
===》 重新发送报文
- 链码审批失败:
sending approve transaction proposal failed: Transaction processing for endorser [peer1.orgbnode.bsnbase.com:10051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1.orgbnode.bsnbase.com:10051]: connection is in TRANSIENT_FAILURE
=====》
- 查询通道失败
could not get chConfig cache reference: QueryBlockConfig failed: no channel peers configured for channel [netchannel])!
===>需要在config.ymal中配置通道netchannel信息
Received error response from txn proposal processing: Transaction processing for endorser [peer2.orgbnode.bsnbase.com:20051]: Chaincode status Code: (404) UNKNOWN. Description: namespace hllcc000001 is not defined
===》 通道块高不同步导致的,(查看通道块高, 节点时间不能相差15分钟)
6. ```text
sending approve transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer1.orgbnode.bsnbase.com:10051]: Chaincode status Code: (500) UNKNOWN. Description: Failed to authorize invocation due to failed ACL check: Failed deserializing proposal creator during channelless check policy with policy [Admins]: [expected MSP ID OrgbNodeMSP, received OrgaNodeMSP] - Transaction processing for endorser [peer2.orgbnode.bsnbase.com:20051]: Chaincode status Code: (500) UNKNOWN. Description: Failed to authorize invocation due to failed ACL check: Failed deserializing proposal creator during channelless check policy with policy [Admins]: [expected MSP ID OrgbNodeMSP, received OrgaNodeMSP]]
===>
Transaction processing for endorser [10.0.51.156:10051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'InstallChaincode': chaincode already successfully installed
==> 对链码tar.gz hash256后的值相同,导致的
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
8. ```text
Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to redefine uncommitted sequence (2) for namespace cc_app0003202110201900559583399_01 with unchanged content
==>存在当前最新的合约没有commit,无法进行新的approve,只需要将最新的commit后再进行这次新的approve即可。
failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: Attempted to include member NanjingtxyNodeMSP which is not in the
consortium
==> 在创世块genenis.blok文件中没有包含NanjingtxyNodeMSP组织
10. ```text
"create channel failed: create channel failed: SendEnvelope failed: calling orderer 'order2.23x.orderglobalnode.bsnbase.com:17052' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error validating channel creation transaction for new channel 'hllgj', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied"
==> admin证书不对
11 ```text
bash-5.1# peer lifecycle chaincode approveformyorg --tls true --cafile certs/ordererOrganizations/ordernode.bsnbase.com/orderers/order1.23x.ordernode.bsnbase.com/tls/server.crt --channelID app0001202110231510201337440 --name cc_app0001202110231510201337440_01 --version 1.0.0.1 --package-id cc_app0001202110231510201337440_01:262bdbe25aa9258565912d1f9103444023e901f71ba01e63ad6bf6663f2b59c2 --sequence 1
2021-10-23 08:24:07.955 UTC [cli.lifecycle.chaincode] setOrdererClient -> INFO 001 Retrieved channel (app0001202110231510201337440) orderer endpoint: order1.23x.ordernode.bsnbase.com:17051
Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': could not serialize chaincode parameters to state: could not deserialize metadata for namespace namespaces/cc_app0001202110231510201337440_01#1: could not query metadata for namespace namespaces/cc_app0001202110231510201337440_01#1: GET_STATE failed: transaction ID: ce539e689920198ea328d9cb7c90782ca945126721c89ed9bc3ec3591d20dbb1: private data matching public hash version is not available. Public hash version = {BlockNum: 1, TxNum: 0}, Private data version = <nil>
===》 需要配置 引导节点
- CORE_PEER_GOSSIP_USELEADERELECTION=false
- CORE_PEER_GOSSIP_ORGLEADER=true
- CORE_PEER_GOSSIP_BOOTSTRAP=peer2.23x.organode.bsnbase.com:20051
12: 启动链码时报错:
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction 33881b9768ec4836ea5c243e536b0ab47f896b831b5570c57a8fbc5582c06fce: could not launch chaincode basic_1.0:3f11e6bf3bd16a30a6b434e227c679df6593537c1a48cbf3f61b0b33ad83a4b5: error starting container: error starting container: API error (404): network peer_default not found"
CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE值需要改为当前目录
- 2022-04-15 06:52:55.516 UTC [orderer.common.server] Main -> PANI 005 Failed validating bootstrap block: initializing channelconfig failed:
could not create channel Consortiums sub-group config: setting up the MSP manager failed: CA Certificate is not valid,
(SN: 271246016204178110621990395059041613998044757805): could not obtain certification chain: the supplied identity is not valid: x509:
certificate has expired or is not yet valid: current time 2022-04-15T06:52:55Z is before 2022-04-15T07:49:00Z
==> - CORE_PEER_GOSSIP_USELEADERELECTION=false
- CORE_PEER_GOSSIP_ORGLEADER=true
14 bash-5.1# peer channel create -o orderer1.orderer.czw444555566222.bsnbase.com:7050 -c asdsad -f /opt/blocktx/asdsad.tx --tls true --cafile /certs/ordererOrganizations/orderer.czw444555566222.bsnbase.com/orderers/orderer1.orderer.czw444555566222.bsnbase.com/tls/tlscacerts/tls-ca-orderer-czw444555566222-bsnbase-com-7054.pem
2022-04-18 11:07:40.686 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'asdsad': 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
==> 通道重复创建
- fabric 链码审批阶段报: MVCC_READ_CONFLICT
确认:
export CORE_PEER_GOSSIP_USELEADERELECTION=true
export CORE_PEER_GOSSIP_ORGLEADER=false
16:
order节点共识出问题:
Rejecting broadcast of config message from 10.233.65.3:39858 with SERVICE_UNAVAILABLE: rejected by Configure: no Raft leader
解决办法:
order之间通讯有问题,检查
17:
提交链码是报错:
sending commit transaction proposal failed: Transaction processing for endorser [peer2.node2.default.bsnbase.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (Node2MSP)
- 2021-11-03 15:01:27 [EROR] [RedNGWMS/services/fabricR1MgmService/core/nodemgmt/nodemgmt.go:120] create channel failed: SendEnvelope failed: calling orderer 'order2.ordernode.bsnbase.com:17052' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'app0001202111031402362936334': 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
===> 究其原因:还是通道重复创建,但也可能是order 通讯有问题,可重启order
19:
newChannel end : {"code":0,"msg":"create channel failed:org.hyperledger.fabric.sdk.exception.TransactionException: Channel app0001202301160843140396277, send transaction failed on orderer OrdererClient{id: 131, channel: app0001202301160843140396277, name: order1.ordernode.lnjzbsn.com, url: grpcs://192.168.30.26:17051}. Reason: Channel app0001202301160843140396277 orderer order1.ordernode.lnjzbsn.com status returned failure code 400 (BAD_REQUEST) during orderer next"}============
==>时间peer和order不同步
20:安装链码
Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'InstallChaincode': chaincode already successfully installed
==》链码唯一性是通过 Label+hash256(源码) 来确认的
1.检查节点上是否安装:peer lifecycle chaincode queryinstalled
2. 检查链码包中的metadata.json中的信息
21: order节点启动时报: panic: Error opening leveldb: resource temporarily unavailable
==》order 节点所使用的/var/hyperledger/production 被其他应用占用
-
安装链码时,节点上报错:
==》
23: order节点日志报: 2023-06-06 02:57:14.051 UTC [common.deliver] deliverBlocks -> WARN 1192 [channel: syschannel] Client 192.168.0.1:33910 is not authorized: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
==》说明当前请求的组织,没有访问权限,检查order的Policies 策略是否是只能order自己进行reader
将msp目录改为order的msp目录即可
24.问题
+fabric2.5 error validating proposal: access denied: channel [] creator org unknown, creator is malformed
==》 可能是节点没有获取到节点msp证书,
在启动脚本里加上 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
25,Peer Identity cannot be validated. No MSP found able to do that.
=》出现这个问题, 一般是锚节点未加入到通道的原因
- 问题:Error: Failed sending proposal, got rpc error: code = Unknown desc = error validating proposal: access denied: channel [] creator org unknown, creator is malformed
==>一般是没有正确配置MSP路径导致的。检查CORE_PEER_MSPCONFIGPATH
27:
问题: gRPC Transport Status Code: (2) Unknown Description: error validating proposal: access denied: channel [ar120412137881] creator org [Node1MSP]
==》 问题一般是由于客户端 使用证书不对导致的, 检查客户端证书链是否正确、查看证书的Subject属性的是否是OU=client以及其他
28: 安装链码时失败:
peer lifecycle chaincode install test.tar.gz
2023-09-01 09:56:20.938 CST [comm.grpc.server] 1 -> INFO8392e9b unary call completed grpc.service=discovery.Diseovery grpc.method=Discover grpc.request_deadline=2023-09-01T09:56:35.925+08:
2ms
2023-09-01 09:56:20.986 CST [chaincode.platform] funcl -ERRO 8392e9c docker build failed: Error returned frombpuild: 1 "main.go:4:2: cannot find package "." in
main.go:6:2: cannot find package "." in:
/chaincode/input/src/chaincode/chaincode
/chaincode/input/src/chaincode/vendor/github.com/hyperledger/fabric-contract-api-go/contractapi
2023-09-01 09:56:20.986 CST (dockercontroller) buildimage -> ERRO 8392e9d Error building image: docker build failled: Error returned from build: 1 "main.go:4:2: cannot find package
main.go:6:2: cannot find package "." in:
/chaincode/input/src/chaincode/chaincode
/chaincode/input/src/chaincode/vendor/github.com/hyperledger/fabric-contract-api-go/contractapi
2023-09-01 09:56:20.987 CST (dockercontroller) buildimage -> ERR10 8392e9e Build Output:
2023-09-01 09:56:20.989 CST [endorser] callChaincode ->INFO 8392e9f finished chaincode:_lifecycle duration:1606ms channel txID=6ba80df3
2023-09-01 09:56:20.989 CST (comm.grpc.server) 1 -> INFO8392ea0 unary call completed grpc.service=protos.Endorseer grpc.method=ProcessProposal grpc.request_deadline=202309-01T09:59:19.311+
266032s
问题原因是:安装链码时,给点的链码包 test.tar.gz, 不符合规范,main函数必须在项目中所有链码的上级或同级,打包路径为main函数所在同级文件夹,具体请查看https://hyperledger-fabric.readthedocs.io/zh_CN/latest/chaincode_lifecycle.html?highlight=code.tar.gz#null, 查看打包完后的包和规定是否一致
-
安装链码时:mkdir /tmp/go-build3540660860: permission denied
==》 是由于ccenv的问题,删掉image重新拉取