我无法通过docker启动fabric-orderer。docker-compose文件
// code placeholder
networks:
fabric-ca:
external:
name: fabric-ca
services:
orderer1-org0:
container_name: orderer1-org0
image: hyperledger/fabric-orderer:2.2.1
environment:
- ORDERER_HOST=orderer1-org0
- ORDERER_GENERAL_PROFILE_ENABLED=false
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=org0MSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/org0/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/org0/orderer/tls-msp/keystore/key.pem
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/org0/orderer/tls-msp/signcerts/cert.pem
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/org0/orderer/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/etc/hyperledger/org0/orderer/tls-msp/signcerts/cert.pem
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/etc/hyperledger/org0/orderer/tls-msp/keystore/key.pem
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/etc/hyperledger/org0/orderer/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem]
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_DEBUG_BROADCASTTRACEDIR=data/logs
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- /opt/hyperledger/org0/orderer:/etc/hyperledger/org0/orderer/
- /opt/hyperledger/configtx/system-genesis-block/genesis.block:/etc/hyperledger/orderer/orderer.genesis.block
networks:
- fabric-ca
当我使用它启动docker时。错误代码是。
failed to parse config: Error reading configuration: Unsupported Config Type ""
但是当我将这条线添加到环境中时。
- FABRIC_CFG_PATH=/etc/hyperledger/org0/orderer
并将orderer.yaml添加到/ opt / hyperledger / org0 / orderer floder,错误代码为
* '' has invalid keys: admin
,当我删除
Admin:
# host and port for the admin server
ListenAddress: 127.0.0.1:9443 # TLS configuration for the admin endpoint
TLS:
# TLS enabled
Enabled: false # Certificate is the location of the PEM encoded TLS certificate
Certificate: # PrivateKey points to the location of the PEM-encoded key
PrivateKey: # Most admin service endpoints require client authentication when TLS
# is enabled. ClientAuthRequired requires client certificate authentication
# at the TLS layer to access all resources.
#
# NOTE: When TLS is enabled, the admin endpoint requires mutual TLS. The
# orderer will panic on startup if this value is set to false.
ClientAuthRequired: true # Paths to PEM encoded ca certificates to trust for client authentication
ClientRootCAs: []
阻止来自orderer.yaml
错误代码是
panic: Failed validating bootstrap block: initializing channelconfig failed: could not create channel Consortiums sub-group config: setting up the MSP manager failed: administrators must be declared when no admin ou classification is set
因此,有没有正确的方法来启动Fabric-Orderer泊坞窗?
非常感谢。
[你的第二个错误]
管理员是无效的配置值。
需要将其更改为“常规”。请参考下面的链接
sampleconfig / orderer.yaml
[你的第一个错误]
尝试FABRIC_CFG_PATH
在docker-compose.yaml中添加参数,FABRIC_CFG_PATH
该参数
是orderer.yaml文件所在的目录路径。
~~~
orderer1-org0:
container_name: orderer1-org0
image: hyperledger/fabric-orderer:2.2.1
environment:
- FABRIC_CFG_PATH=/etc/hyperledger/org0/orderer/
~~~
GENERAL_GENESISFILE
orderer.yaml中的值。当你看到已编写的配置时,应按以下格式在orderer.yaml中编写。~~~
GenesisFile: /etc/hyperledger/orderer/orderer.genesis.block
~~~
非常感谢 !我知道了。