douzhong5902 2016-06-11 16:09
浏览 49
已采纳

在启动具有安全性和隐私性的对等方时出错

When I try to start the peer using

peer node start

I get the following error

hyperledger@linux-box:/opt/gopath/src/github.com/hyperledger/fabric$ peer node start
20:42:02.999 [crypto] main -> INFO 001 Log level recognized 'info', set to INFO
20:42:03.017 [main] serve -> INFO 002 Security enabled status: true
20:42:03.017 [main] serve -> INFO 004 Privacy enabled status: true
20:42:03.017 [crypto] func1 -> INFO 005 Registering validator [vp] with name [vp]...
20:42:03.017 [eventhub_producer] start -> INFO 003 event processor started
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x8ad221]

goroutine 1 [running]:
panic(0xd43fe0, 0xc82000e120)
    /opt/go/src/runtime/panic.go:481 +0x3e6
github.com/hyperledger/fabric/core/crypto/utils.PEMtoPrivateKey(0x15409e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/utils/keys.go:117 +0x91
github.com/hyperledger/fabric/core/crypto.(*nodeImpl).retrieveEnrollmentData(0xc820226630, 0xc8201c35c8, 0x2, 0xc8201c35f0, 0xc, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/node_eca.go:120 +0xe55
github.com/hyperledger/fabric/core/crypto.(*nodeImpl).registerCryptoEngine(0xc820226630, 0xc8201c35c8, 0x2, 0xc8201c35f0, 0xc, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/node_crypto.go:49 +0x5d6
github.com/hyperledger/fabric/core/crypto.(*nodeImpl).register(0xc820226630, 0x2, 0xc8201c35c8, 0x2, 0x0, 0x0, 0x0, 0xc8201c35c8, 0x2, 0xc8201c35f0, ...)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/node_impl.go:114 +0x5b8
github.com/hyperledger/fabric/core/crypto.(*peerImpl).register(0xc820242840, 0x2, 0xc8201c35c8, 0x2, 0x0, 0x0, 0x0, 0xc8201c35c8, 0x2, 0xc8201c35f0, ...)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/peer_impl.go:177 +0x20a
github.com/hyperledger/fabric/core/crypto.(*validatorImpl).register(0xc8201fd600, 0xc8201c35c8, 0x2, 0x0, 0x0, 0x0, 0xc8201c35c8, 0x2, 0xc8201c35f0, 0xc, ...)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/validator_impl.go:147 +0x20a
github.com/hyperledger/fabric/core/crypto.RegisterValidator(0xc8201c35c8, 0x2, 0x0, 0x0, 0x0, 0xc8201c35c8, 0x2, 0xc8201c35f0, 0xc, 0x0, ...)
    /opt/gopath/src/github.com/hyperledger/fabric/core/crypto/validator.go:55 +0x55d
main.getSecHelper.func1()
    /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:360 +0x200
sync.(*Once).Do(0x1540ad8, 0xc8201fd768)
    /opt/go/src/sync/once.go:44 +0xe4
main.getSecHelper(0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:380 +0x7d
main.serve(0x15409e0, 0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:446 +0xc23
main.glob.func3(0x1503160, 0x15409e0, 0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:95 +0x41
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x1503160, 0x15409e0, 0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:497 +0x62c
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1502de0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:584 +0x46a
main.main()
    /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:314 +0x18d9

My core.yaml contains the default contents , with security and privacy enabled.

Is this a bug ?

  • 写回答

1条回答 默认 最新

  • duanleixun2439 2016-06-11 16:47
    关注

    Well I still think the fact that we panic is a bug, but my guess is that you have not built and/or started membership services which are required when security is enabled: https://github.com/hyperledger/fabric/blob/master/docs/API/SandboxSetup.md#security-setup-optional

    Edit: I originally missed something in the stack trace above. Looks like you are running on a very old version of the fabric code. For example github.com/hyperledger/fabric/core/crypto/utils/keys.go is no longer in the current code. I checked out your fork and it seems you are still pretty far behind. Not sure if you are building out of your fork or not, but looks like you definitely have old code and need to pull down upstream changes

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码