WeBankBlockchain/WeCross

sendTransaction payment.fabric.sacc fabric_user1 set a 66 ->http request timeout

MirSu0429 opened this issue · 13 comments

执行:sendTransaction payment.fabric.sacc fabric_user1 set a 66
日志:
WeCrossRPCService() - request: Request{version='1', path='payment.fabric.sacc', method='sendTransaction', accountName='fabric_user1', data=TransactionRequest{method='set', args=[a, 666], options={}}}; url: https://192.168.1.39:8250/payment/fabric/sacc/sendTransaction
这里不知咋就成https的请求了 我配置的内网主机ip
fabric在另外一个主机上部署
直接命令行执行 query和invoke都正常

这里没问题,这个日志是控制台(sdk)与router通信的日志,走的https

[WeCross]> sendTransaction payment.fabric.sacc fabric_user1 set a 66
Error: http request timeout

[WeCross]> call payment.fabric.sacc fabric_user1 get a
Result: [66]
返回超时,但是却是执行成功了的

检查一下router的日志

这里没问题,这个日志是控制台(sdk)与router通信的日志,走的https

你好,URIHandlerDispatcher 这个类并没有找到这个sendTransaction接口的handler。 router是如何接受这个请求呢?

在后面几行

        ResourceURIHandler resourceURIHandler = new ResourceURIHandler(host);
        registerURIHandler(RESOURCE_URIMETHOD, resourceURIHandler);

检查一下router的日志

router 的 info日志
PeerEventServiceClient{id: 4994, channel: mychannel, peerName: peer1, url: grpcs://192.168.1.11:9051} PeerEventServiceClient{id: 4994, channel: mychannel, peerName: peer1, url: grpcs://192.168.1.11:9051} attempts 2490 Status returned failure code 400 (BAD_REQUEST) during peer service event registration
grps 400,ip可以ping同,端口可以 telnet通

ip可以ping同,端口可以 telnet通,是router所在机器么?
另外,7051的endorser是通的?

endorser

局域网:router在 39,fabric在11,虚拟机裸跑,无任何网络策略
telnet 192.168.1.11 7051
Trying 192.168.1.11...
Connected to 192.168.1.11.
Escape character is '^]'.

检查一下router的日志

router 的 info日志
PeerEventServiceClient{id: 4994, channel: mychannel, peerName: peer1, url: grpcs://192.168.1.11:9051} PeerEventServiceClient{id: 4994, channel: mychannel, peerName: peer1, url: grpcs://192.168.1.11:9051} attempts 2490 Status returned failure code 400 (BAD_REQUEST) during peer service event registration
grps 400,ip可以ping同,端口可以 telnet通

如果是上面这样,7051也能找到类似的日志。怀疑是不是7051是通的,而9051不通?

如果是上面这样,7051也能找到类似的日志。怀疑是不是7051是通的,而9051不通?

[endorser] ProcessProposal -> ERRO e84c [mychannel][eb76d903] simulateProposal() resulted in chaincode name:"WeCrossProxy" response status 500 for txid: eb76d903ec7563abbdb0fe7992ee071c514b832bf347b2768a7b8e5046fd34ea
[endorser] ProcessProposal -> ERRO e850 [mychannel][013f8d9b] simulateProposal() resulted in chaincode name:"sacc" response status 500 for txid: 013f8d9b6c1d61c33a0994b846a669f8e7ccefa9f16a28953407da4aeda2d423
unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=192.168.1.39:55302 grpc.code=OK grpc.call_duration=1.84837ms
2020-08-25 18:58:31.300 UTC [endorser] callChaincode -> INFO e84e [mychannel][013f8d9b] Entry chaincode: name:"sacc"
2020-08-25 18:58:31.301 UTC [endorser] callChaincode -> INFO e84f [mychannel][013f8d9b] Exit chaincode: name:"sacc" (1ms)

[mychannel][5d4c124a] failed to invoke chaincode name:"mycc" , error: invalid deployment spec: open /var/hyperledger/production/chaincodes/mycc.1.0: no such file or directory
could not get chaincode code
github.com/hyperledger/fabric/core/scc/lscc.(*LifeCycleSysCC).ChaincodeContainerInfo
/opt/gopath/src/github.com/hyperledger/fabric/core/scc/lscc/lscc.go:180
....

mycc 这个不是在脚本里安装的测试链码吗?我看脚本有删除这个链码容器

另外,上面的两个错误也很奇怪,一直在刷,
命令:
[root@localhost ~]# docker exec cli peer chaincode invoke -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/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 --channelID mychannel -n sacc -c '{"Args":["set","a","200000"]}'
2020-08-25 19:05:12.368 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 payload:"200000"
执行结果正常

mycc 这个不是在脚本里安装的测试链码吗?我看脚本有删除这个链码容器

demo里面用sacc,更加典型一些,所以删了mycc,部署了sacc

另外,上面的两个错误也很奇怪,一直在刷

目前的版本中确实会一直刷这个ERROR

mycc 这个不是在脚本里安装的测试链码吗?我看脚本有删除这个链码容器

demo里面用sacc,更加典型一些,所以删了mycc,部署了sacc

另外,上面的两个错误也很奇怪,一直在刷

目前的版本中确实会一直刷这个ERROR

这个能排查到问题所在吗?
怎么才能解决呀

mycc 这个不是在脚本里安装的测试链码吗?我看脚本有删除这个链码容器

demo里面用sacc,更加典型一些,所以删了mycc,部署了sacc

另外,上面的两个错误也很奇怪,一直在刷

目前的版本中确实会一直刷这个ERROR

这个能排查到问题所在吗?
怎么才能解决呀

目前实现机制造成的,router需要定时去判断chaincode是否还在。不影响使用,后续会优化掉