Je travaille sur la blockchain hyperledger. Je dirige un réseau de 4 organisations, j'ai développé un fichier docker-compose.yml. Quand est start docker-compose tous les conteneurs démarrent mais le conteneur orderer.example.com ne démarre pas, c'est-à-dire que le conteneur se termine avec le code 2.
Vous trouverez ci-dessous les détails et les journaux de la configuration de docker-compose orderer.example.com du conteneur orderer.example.com.
détails de configuration de docker-compose
2019-10-18 07:49:44.841 UTC [orderer.common.server] Main -> ERRO 001 failed to parse config: Error reading configuration: Unsupported Config Type ""
Journaux d'erreurs du conteneur orderer.example.com
environment: - OERDERER_GENERAL_GENESISFILE=/etc/hyperledger/fabric/genesis.block volumes: - ./channel-artifacts/:/etc/hyperledger/fabric
Lorsque j'ai eu cette erreur, j'ai apporté des modifications au code ci-dessous:
2019-10-18 08:08:51.429 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0 2019-10-18 08:08:51.556 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values: General.LedgerType = "file" General.ListenAddress = "0.0.0.0" General.ListenPort = 7050 General.TLS.Enabled = false General.TLS.PrivateKey = "/etc/hyperledger/fabric/tls/server.key" General.TLS.Certificate = "/etc/hyperledger/fabric/tls/server.crt" General.TLS.RootCAs = [/etc/hyperledger/fabric/tls/ca.crt] General.TLS.ClientAuthRequired = false General.TLS.ClientRootCAs = [] General.Cluster.ListenAddress = "" General.Cluster.ListenPort = 0 General.Cluster.ServerCertificate = "" General.Cluster.ServerPrivateKey = "" General.Cluster.ClientCertificate = "" General.Cluster.ClientPrivateKey = "" General.Cluster.RootCAs = [] General.Cluster.DialTimeout = 5s General.Cluster.RPCTimeout = 7s General.Cluster.ReplicationBufferSize = 20971520 General.Cluster.ReplicationPullTimeout = 5s General.Cluster.ReplicationRetryTimeout = 5s General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s General.Cluster.ReplicationMaxRetries = 12 General.Cluster.SendBufferSize = 10 General.Cluster.CertExpirationWarningThreshold = 168h0m0s General.Cluster.TLSHandshakeTimeShift = 0s General.Keepalive.ServerMinInterval = 1m0s General.Keepalive.ServerInterval = 2h0m0s General.Keepalive.ServerTimeout = 20s General.ConnectionTimeout = 0s General.GenesisMethod = "file" General.GenesisProfile = "SampleInsecureSolo" General.SystemChannel = "test-system-channel-name" General.GenesisFile = "/etc/hyperledger/fabric/genesisblock" General.Profile.Enabled = false General.Profile.Address = "0.0.0.0:6060" General.LocalMSPDir = "/etc/hyperledger/msp/orderer/msp" General.LocalMSPID = "OrdererMSP" General.BCCSP.ProviderName = "SW" General.BCCSP.SwOpts.SecLevel = 256 General.BCCSP.SwOpts.HashFamily = "SHA2" General.BCCSP.SwOpts.Ephemeral = false General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/etc/hyperledger/msp/orderer/msp/keystore" General.BCCSP.SwOpts.DummyKeystore = General.BCCSP.SwOpts.InmemKeystore = General.BCCSP.PluginOpts = General.Authentication.TimeWindow = 15m0s General.Authentication.NoExpirationChecks = false FileLedger.Location = "/var/hyperledger/production/orderer" FileLedger.Prefix = "hyperledger-fabric-ordererledger" RAMLedger.HistorySize = 1000 Kafka.Retry.ShortInterval = 5s Kafka.Retry.ShortTotal = 10m0s Kafka.Retry.LongInterval = 5m0s Kafka.Retry.LongTotal = 12h0m0s Kafka.Retry.NetworkTimeouts.DialTimeout = 10s Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s Kafka.Retry.Metadata.RetryMax = 3 Kafka.Retry.Metadata.RetryBackoff = 250ms Kafka.Retry.Producer.RetryMax = 3 Kafka.Retry.Producer.RetryBackoff = 100ms Kafka.Retry.Consumer.RetryBackoff = 2s Kafka.Verbose = false Kafka.Version = 0.10.2.0 Kafka.TLS.Enabled = false Kafka.TLS.PrivateKey = "" Kafka.TLS.Certificate = "" Kafka.TLS.RootCAs = [] Kafka.TLS.ClientAuthRequired = false Kafka.TLS.ClientRootCAs = [] Kafka.SASLPlain.Enabled = false Kafka.SASLPlain.User = "" Kafka.SASLPlain.Password = "" Kafka.Topic.ReplicationFactor = 3 Debug.BroadcastTraceDir = "" Debug.DeliverTraceDir = "" Consensus = map[WALDir:/var/hyperledger/production/orderer/etcdraft/wal SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot] Operations.ListenAddress = "127.0.0.1:8443" Operations.TLS.Enabled = false Operations.TLS.PrivateKey = "" Operations.TLS.Certificate = "" Operations.TLS.RootCAs = [] Operations.TLS.ClientAuthRequired = false Operations.TLS.ClientRootCAs = [] Metrics.Provider = "disabled" Metrics.Statsd.Network = "udp" Metrics.Statsd.Address = "127.0.0.1:8125" Metrics.Statsd.WriteInterval = 30s Metrics.Statsd.Prefix = "" panic: unable to bootstrap orderer. Error reading genesis block file: open /etc/hyperledger/fabric/genesisblock: no such file or directory goroutine 1 [running]: github.com/hyperledger/fabric/orderer/common/bootstrap/file.(*fileBootstrapper).GenesisBlock(0xc0002bb2b0, 0xc0002bb2b0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/bootstrap/file/bootstrap.go:39 +0x1d0 github.com/hyperledger/fabric/orderer/common/server.extractBootstrapBlock(0xc000444900, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:532 +0x1bd github.com/hyperledger/fabric/orderer/common/server.Start(0x1018e03, 0x5, 0xc000444900) /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:96 +0x43 github.com/hyperledger/fabric/orderer/common/server.Main() /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:91 +0x1ce main.main() /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20
Mais j'ai eu la même erreur ci-dessous, ce sont les journaux d'erreurs:
########################################### # Orderer Docker Container Config ########################################### orderer.example.com: container_name: orderer.example.com image: hyperledger/fabric-orderer environment: - ORDERER_GENERAL_LOGLEVEL=debug - FABRIC_LOGGING_SPEC=info - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - OERDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer command: orderer ports: - 7050:7050 volumes: - ./channel-artifacts/:/etc/hyperledger/configtx - ./crypto-config/ordererOrganizations/example.com/orderers/OrdererPeer.example.com/:/etc/hyperledger/msp/orderer - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1/peer0 - ./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/msp/peerOrg2/peer0 - ./crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/:/etc/hyperledger/msp/peerOrg3/peer0 - ./crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/:/etc/hyperledger/msp/peerOrg4/peer0 networks: - basic
Veuillez m'aider avec ce problème. veuillez ignorer s'il y a une erreur d'indentation
4 Réponses :
C'est étrange,
Selon votre manifeste yaml
Le chemin fourni est: - OERDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
Statistiques du journal des erreurs:
Error reading genesis block file: open /etc/hyperledger/fabric/genesisblock: no such file or directory
Il vous manque quelque chose, veuillez télécharger la configuration sur github pour que je jette un coup d'œil
Dans votre volume, vous devez spécifier votre chemin vers block.genesis Et vous devez donner le même lien dans l'environnement chemin du fichier de genesis environnement: - OERDERER_GENERAL_GENESISFILE = / var / hyperledger / orderer / orderer.genesis.pb volumes: - ./channel -artifacts /: / etc / hyperledger / fabric - ./orderer/genesis_block.pb:/var/hyperledger/orderer/orderer.genesis.pb
Veuillez vérifier le chemin du bloc de genèse. Docker ne parvient pas à localiser le fichier
ORDER_GENERAL_GENESISFILE >> ORDERER_GENERAL_GENESISFILE
On dirait que le bloc genesis n'est pas présent dans le répertoire channel-artifacts
@NarendranathReddy oui, le fichier genesis.block est présent, je l'ai vérifié