我一直在使用 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 中的各种超时时间,但似乎没有任何效果。我想知 Prop 体是哪个超时导致了这个问题以及如何解决这个问题?
最佳答案
您的 chaincode
中一定有错误由于您的chaincode
正在崩溃。我身上也发生过类似的情况。通常,如果您的链代码崩溃,您的交易将会超时。
要调试,请按以下方式列出所有 docker 容器:
docker ps
复制您的 ID chaincode
容器并执行此命令:
docker attach <container-id> -f
再次执行调用/查询命令。
如果发生崩溃,日志将打印在您执行 docker attach
的位置
关于hyperledger-fabric - super 账本结构 : failed to execute transaction: timeout expired,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52755302/