我一直在使用Hyperledger织物,而我的链码需要花时间进行复杂的计算。我希望增加配置中的超时时间,以便事务能够工作。下面是错误和前面的一些日志:
2018-10-11 08:00:01.370 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-09-30 06:28:41 +0000 UTC
2018-10-11 08:00:01.370 UTC [msp] Validate -> DEBU 036 MSP Org1MSP validating identity
2018-10-11 08:00:01.372 UTC [grpc] DialContext -> DEBU 037 parsed scheme: ""
2018-10-11 08:00:01.372 UTC [grpc] DialContext -> DEBU 038 scheme "" not registered, fallback to default scheme
2018-10-11 08:00:01.372 UTC [grpc] watcher -> DEBU 039 ccResolverWrapper: sending new addresses to cc: [{peer0.org1.example.com:7051 0 <nil>}]
2018-10-11 08:00:01.373 UTC [grpc] switchBalancer -> DEBU 03a ClientConn switching balancer to "pick_first"
2018-10-11 08:00:01.373 UTC [grpc] HandleSubConnStateChange -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc4204286d0, CONNECTING
2018-10-11 08:00:01.378 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4204286d0, READY
2018-10-11 08:00:01.380 UTC [grpc] DialContext -> DEBU 03d parsed scheme: ""
2018-10-11 08:00:01.380 UTC [grpc] DialContext -> DEBU 03e scheme "" not registered, fallback to default scheme
2018-10-11 08:00:01.381 UTC [grpc] watcher -> DEBU 03f ccResolverWrapper: sending new addresses to cc: [{peer0.org1.example.com:7051 0 <nil>}]
2018-10-11 08:00:01.381 UTC [grpc] switchBalancer -> DEBU 040 ClientConn switching balancer to "pick_first"
2018-10-11 08:00:01.381 UTC [grpc] HandleSubConnStateChange -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc42037da40, CONNECTING
2018-10-11 08:00:01.384 UTC [grpc] HandleSubConnStateChange -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc42037da40, READY
2018-10-11 08:00:01.386 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-10-11 08:00:01.391 UTC [msp/identity] Sign -> DEBU 044 Sign: plaintext: 0AAC070A6808031A0C088186FCDD0510...63756C61746576616C75650A01350A00
2018-10-11 08:00:01.391 UTC [msp/identity] Sign -> DEBU 045 Sign: digest: 2BC62EB10423C00D8C9FAD8D8FE7B7C38157D6AA675064BC23BC0E191DD7F2AE
Error: endorsement failure during query. response: status:500 message:"failed to execute transaction f6e70bc375aa475eed82d2f31877286d52827aa22208ead7e51d2e01118a04f7: error sending: timeout expired while executing transaction"类似的问题可以找到here。到目前为止,我已经尝试在core.yaml中增加各种超时时间,但是似乎没有什么效果。我想知道哪个超时是导致这个问题的具体原因,以及如何解决这个问题?
发布于 2018-10-11 08:20:53
您的chaincode中一定有一个错误,因为它导致chaincode崩溃。类似的情况也发生在我身上。通常,如果您的链码崩溃,您的事务将超时。
若要调试,请按以下方法列出所有停靠容器:
docker ps
复制chaincode容器的id并执行以下命令:
docker attach <container-id> -f
再次执行invoke/query命令。如果出现崩溃,将打印执行docker attach的日志。
https://stackoverflow.com/questions/52755302
复制相似问题