Hyperledger Fabric:无法执行交易:超时已过期

fir*_*hin 2 blockchain hyperledger-fabric

我一直在使用 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"
Run Code Online (Sandbox Code Playgroud)

类似的问题可以在这里找到。截至目前,我已尝试在core.yaml 中增加各种超时时间,但似乎没有任何效果。我想知道具体是哪个超时导致了这个问题以及如何解决这个问题?

Aks*_*ood 5

chaincode由于您chaincode的崩溃,您必须有错误。类似的案例也发生在我身上。通常,如果您的链码崩溃,您的交易将超时。

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

docker ps

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

docker attach <container-id> -f

再次执行调用/查询命令。如果发生崩溃,日志将打印在您执行的位置docker attach