Hyperledger Fabric:无法执行事务:超时已过期

时间:2018-10-11 08:13:59

标签: hyperledger-fabric blockchain

我一直在使用Hyperledger Fabric,而我的链码涉及一个复杂的计算,需要花费很多时间。我希望增加配置中的超时时间,以便事务可以正常工作。这是错误和之前的一些日志:

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 中的各种超时时间,但是似乎没有任何效果。我想知道是哪个超时导致了此问题,以及如何解决此问题?

1 个答案:

答案 0 :(得分:2)

您的chaincode崩溃了,您的chaincode中肯定有一个错误。我也发生过类似的情况。通常,如果您的链码崩溃,您的交易就会超时。

要调试,请通过以下方式列出所有docker容器:

docker ps

复制chaincode容器的ID,并执行以下命令:

docker attach <container-id> -f

再次执行invoke / query命令。 如果发生崩溃,将在您执行docker attach

的位置打印日志