hyperledger fabric,无法通过 docker 启动排序器
hyperledger fabric, can`t start orderer via docker
我无法通过 docker 启动 fabric-orderer。
docker-撰写文件
// 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
并在/opt/hyperledger/org0/orderer floder中添加一个orderer.yaml,错误码为
* '' 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
那么,是否有启动织物订购程序的正确方法 docker?
非常感谢。
[你的第二个错误]
Admin 是一个无效的配置值。
需要改为通用。请参考下面的link
sampleconfig/orderer.yaml
[你的第一个错误]
尝试在 docker-compose.yaml 中添加 FABRIC_CFG_PATH
参数
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/
~~~
- 此外,检查 orderer.yaml 中的
GENERAL_GENESISFILE
值。
当你看到你写的配置时,在orderer.yaml. 中应该是这样写的
~~~
GenesisFile: /etc/hyperledger/orderer/orderer.genesis.block
~~~
我无法通过 docker 启动 fabric-orderer。 docker-撰写文件
// 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
并在/opt/hyperledger/org0/orderer floder中添加一个orderer.yaml,错误码为
* '' 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
那么,是否有启动织物订购程序的正确方法 docker?
非常感谢。
[你的第二个错误]
Admin 是一个无效的配置值。
需要改为通用。请参考下面的link
sampleconfig/orderer.yaml
[你的第一个错误]
尝试在 docker-compose.yaml 中添加 FABRIC_CFG_PATH
参数
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/
~~~
- 此外,检查 orderer.yaml 中的
GENERAL_GENESISFILE
值。 当你看到你写的配置时,在orderer.yaml. 中应该是这样写的
~~~
GenesisFile: /etc/hyperledger/orderer/orderer.genesis.block
~~~