Hyperledger fabric 对等获取崩溃:运行时错误:无效内存地址或零指针取消引用

Hyperledger fabric 对等获取崩溃:运行时错误:无效内存地址或零指针取消引用,hyperledger-fabric,hyperledger,hyperledger-chaincode,Hyperledger Fabric,Hyperledger,Hyperledger Chaincode,很久以后,每当我遇到下面的错误时,我的同伴都会崩溃 高频版本:1.4.2 go版本go1.12.6 linux/amd64 ubuntu TLS 16.04 free -m total used free shared buff/cache available Mem: 257611 11125 151795 2657 94689 241076 Swa

很久以后,每当我遇到下面的错误时,我的同伴都会崩溃 高频版本:1.4.2 go版本go1.12.6 linux/amd64 ubuntu TLS 16.04

free -m
              total        used        free      shared  buff/cache   available
Mem:         257611       11125      151795        2657       94689      241076
Swap:           976           0         976
对等日志

2019-11-28 17:29:53.646 UTC [deliveryClient] try -> WARN de55 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:53.829 UTC [deliveryClient] try -> WARN de56 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:55.826 UTC [deliveryClient] try -> WARN de57 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaed020]

goroutine 136 [running]:
github.com/hyperledger/fabric/protos/gossip.(*SecretEnvelope).InternalEndpoint(0x0, 0x40c4c3, 0x7f849226ddc8)
    /opt/gopath/src/github.com/hyperledger/fabric/protos/gossip/extensions.go:480 +0x40
github.com/hyperledger/fabric/gossip/discovery.newAliveMsgStore.func4(0x1243280, 0xc00254ab10)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/discovery/discovery_impl.go:1032 +0xfd
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expireMessages(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:212 +0x34c
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expirationRoutine(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:253 +0x141
created by github.com/hyperledger/fabric/gossip/gossip/msgstore.NewMessageStoreExpirable
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:53 +0xb2
2019/11/27 10:04:13 This complaintno already exists: 1709157484903969657
2019-11-28 17:44:50.198 UTC [shim] chatWithPeer -> ERRO 001 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing
receive failed
github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:362
github.com/hyperledger/fabric/core/chaincode/shim.Start
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:156
main.main
    /chaincode/input/src/github.com/chaincode/complaints/complaintchaincode.go:134
runtime.main
    /opt/go/src/runtime/proc.go:201
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:1333
2019/11/28 17:44:50 Error starting Complaint chaincode: receive failed: rpc error: code = Unavailable desc = transport is closing
链码日志

2019-11-28 17:29:53.646 UTC [deliveryClient] try -> WARN de55 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:53.829 UTC [deliveryClient] try -> WARN de56 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:55.826 UTC [deliveryClient] try -> WARN de57 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaed020]

goroutine 136 [running]:
github.com/hyperledger/fabric/protos/gossip.(*SecretEnvelope).InternalEndpoint(0x0, 0x40c4c3, 0x7f849226ddc8)
    /opt/gopath/src/github.com/hyperledger/fabric/protos/gossip/extensions.go:480 +0x40
github.com/hyperledger/fabric/gossip/discovery.newAliveMsgStore.func4(0x1243280, 0xc00254ab10)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/discovery/discovery_impl.go:1032 +0xfd
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expireMessages(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:212 +0x34c
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expirationRoutine(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:253 +0x141
created by github.com/hyperledger/fabric/gossip/gossip/msgstore.NewMessageStoreExpirable
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:53 +0xb2
2019/11/27 10:04:13 This complaintno already exists: 1709157484903969657
2019-11-28 17:44:50.198 UTC [shim] chatWithPeer -> ERRO 001 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing
receive failed
github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:362
github.com/hyperledger/fabric/core/chaincode/shim.Start
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:156
main.main
    /chaincode/input/src/github.com/chaincode/complaints/complaintchaincode.go:134
runtime.main
    /opt/go/src/runtime/proc.go:201
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:1333
2019/11/28 17:44:50 Error starting Complaint chaincode: receive failed: rpc error: code = Unavailable desc = transport is closing

我很长一段时间都在面对这个错误,但无法调试它。

可能有很多原因,但我也经历过一些类似的恶作剧,这些恶作剧都是通过升级docker版本(当然还有重新启动docker服务)解决的.

您遇到了一个在1.4.2中引入、在1.4.3中出现的错误

对等的1.4.2中有一个错误,请尝试升级到最新的1.4.4并尝试