我需要在没有genesis块的情况下启动orderer,因为我在orderer引导时没有关于联盟的信息。
有办法吗?
根据
orderer.yaml
文件,我们可以设置
ORDERER_GENERAL_GENESISMETHOD=none
orderer.example.com | 2020-05-30 16:46:03.446 UTC [orderer.common.server] initializeServerConfig -> INFO 003 Starting orderer with TLS enabled
orderer.example.com | 2020-05-30 16:46:04.246 UTC [fsblkstorage] NewProvider -> INFO 004 Creating new file ledger directory at /var/hyperledger/production/orderer/chains
orderer.example.com | panic: unable to bootstrap orderer. Error reading genesis block file: open /etc/hyperledger/fabric/genesisblock: no such file or directory
orderer.example.com |
orderer.example.com | goroutine 1 [running]:
orderer.example.com | github.com/hyperledger/fabric/orderer/common/bootstrap/file.(*fileBootstrapper).GenesisBlock(0xc00038e400, 0xc00038e400)
orderer.example.com | /go/src/github.com/hyperledger/fabric/orderer/common/bootstrap/file/bootstrap.go:39 +0x1c0
orderer.example.com | github.com/hyperledger/fabric/orderer/common/server.extractBootstrapBlock(0xc0001c2d80, 0xc0001249c0)
orderer.example.com | /go/src/github.com/hyperledger/fabric/orderer/common/server/main.go:595 +0x139
orderer.example.com | github.com/hyperledger/fabric/orderer/common/server.Main()
orderer.example.com | /go/src/github.com/hyperledger/fabric/orderer/common/server/main.go:128 +0x129a
orderer.example.com | main.main()
orderer.example.com | /go/src/github.com/hyperledger/fabric/cmd/orderer/main.go:15 +0x20
我试着在没有联合体信息的情况下生成genesis块。但它在生成创世纪块时给了我一个警告。
警告007 Genesis块不包含联合体组定义。此块不能用于订购程序引导
2020-05-30 21:26:01.892 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-05-30 21:26:01.897 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 Orderer.Addresses unset, setting to [127.0.0.1:7050]
2020-05-30 21:26:01.897 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: etcdraft
2020-05-30 21:26:01.897 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 004 Orderer.EtcdRaft.Options unset, setting to tick_interval:"500ms" election_tick:10 heartbeat_tick:1 max_inflight_blocks:5 snapshot_interval_size:16777216
2020-05-30 21:26:01.897 IST [common.tools.configtxgen.localconfig] Load -> INFO 005 Loaded configuration: /home/nitish/work/hyperledger/research-network/configtx.yaml
2020-05-30 21:26:01.898 IST [common.tools.configtxgen] doOutputBlock -> INFO 006 Generating genesis block
2020-05-30 21:26:01.898 IST [common.tools.configtxgen] doOutputBlock -> WARN 007 Genesis block does not contain a consortiums group definition. This block cannot be used for orderer bootstrap.
2020-05-30 21:26:01.898 IST [common.tools.configtxgen] doOutputBlock -> INFO 008 Writing genesis block
---
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: ./ordererorganization/msp
Policies:
Readers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Writers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Admins:
Type: Signature
Rule: "OR('OrdererMSP.admin')"
OrdererEndpoints:
- orderer.example.com:7050
Capabilities:
Channel: &ChannelCapabilities
V2_0: true
Orderer: &OrdererCapabilities
V2_0: true
Application: &ApplicationCapabilities
V2_0: true
Application: &ApplicationDefaults
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
LifecycleEndorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Endorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Capabilities:
<<: *ApplicationCapabilities
Orderer: &OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer.example.com
Port: 7050
ClientTLSCert: ./ordererorganization/orderers/orderer.example.com/tls/server.crt
ServerTLSCert: ./ordererorganization/orderers/orderer.example.com/tls/server.crt
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 512 KB
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
TwoOrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
我知道有某种方法可以实现这一点,因为我看到一些HLF区块链服务提供商推出了样本订购服务,后来又加入了一个联盟。但我找不到任何证明人。我真的很感激你的帮助。我陷入了僵局。