I'm trying to launch my hyperledger fabric network using docker-compose which has all the "orderer and peer" configs in the environment section of the docker-compose file.
But When I launch the docker-compose file using "docker-compose -f docker-compose.yaml up -d", I get this error as result :
" cannot start service orderer.org.com: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: exec: "orderer": executable file not found in $PATH: unknown".
knowing that I exported all the necessary environment variables such as "export the PATH=bin:$PATH and the FABRIC_CFG_PATH".
Moreover, I did not get the same error with the peer binary in the same docker-compose file
**this is the configuration part of my orderer in the docker-compose file
orderer.supplychain.com:
container_name: orderer.org.supplychain.com
image: hyperledger/fabric-peer:latest
labels:
service: hyperledger-fabric
environment:
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_LOGLEVEL=INFO
- FABRIC_LOGGING_SPEC=INFO
- FABRIC_CFG_PATH=/var/hyperledger/config
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
#- ORDERER_GENERAL_GENESISMETHOD=none
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_BOOTSTRAPFILE=/var/hyperledger/orderer/orderer-genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_VERBOSE=true
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_METRICS_PROVIDER=prometheus
- ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
command: orderer //notworking
volumes:
- ${PWD}/config/orderer:/var/hyperledger/config
- ./artifacts-channels/supply-genesis.block:/var/hyperledger/orderer/orderer-supply-genesis.block
- ./crypto-material/organizations/ordererOrganizations/orderer.supplychain.com/orderers/orderer.supplychain.com/msp/:/var/hyperledger/orderer/msp
- ./crypto-material/organizations/ordererOrganizations/orderer.supplychain.com/orderers/orderer.supplychain.com/tls/:/var/hyperledger/orderer/tls
- orderer.org.supplychain.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
- 8443:8443
networks:
- supplychain**
this is the part of peers
**peer0.productionlaborg.supplychain.com:
container_name: peer0.productionlaborganisation.supplychain.com
image: hyperledger/fabric-peer:latest
labels:
service: hyperledger-fabric
environment:
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
#- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
- CORE_PEER_ID=peer0.productionlaborg.supplychain.com
- CORE_PEER_ADDRESS=peer0.productionlaborg.supplychain.com:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.productionlaborg.supplychain.com:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.productionlaborg.supplychain.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.productionlaborg.supplychain.com::7051
- CORE_PEER_LOCALMSPID=ProductionLabOrg
- FABRIC_LOGGING_SPEC=INFO
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
volumes:
- /var/run/:/host/var/run/
- ./crypto-material/organizations/peerOrganizations/productionlaborg.supplychain.com/peers/peer0.productionlaborg.supplychain.com/msp:/etc/hyperledger/fabric/msp
- ./crypto-material/organizations/peerOrganizations/productionlaborg.supplychain.com/peers/peer0.productionlaborg.supplychain.com/tls:/etc/hyperledger/fabric/tls
- peer0.productionlaborg.supplychain.com:/var/hyperledger/production
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peers
command: peer node start
depends_on:
#- couchdb1
- orderer.org.supplychain.com
ports:
- 7051:7051
networks:
- supplychain**
You need to use the orderer image to run the orderer container, and update your container image to hyperledger/fabric-orderer:2.4
.
Your orderer container definition should look like this
container_name: orderer.org.supplychain.com
image: hyperledger/fabric-orderer:2.4
labels:
service: hyperledger-fabric
environment:
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_LOGLEVEL=INFO
- FABRIC_LOGGING_SPEC=INFO
- FABRIC_CFG_PATH=/var/hyperledger/config
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
#- ORDERER_GENERAL_GENESISMETHOD=none
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_BOOTSTRAPFILE=/var/hyperledger/orderer/orderer-genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_VERBOSE=true
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_METRICS_PROVIDER=prometheus
- ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
command: orderer //notworking
volumes:
- ${PWD}/config/orderer:/var/hyperledger/config
- ./artifacts-channels/supply-genesis.block:/var/hyperledger/orderer/orderer-supply-genesis.block
- ./crypto-material/organizations/ordererOrganizations/orderer.supplychain.com/orderers/orderer.supplychain.com/msp/:/var/hyperledger/orderer/msp
- ./crypto-material/organizations/ordererOrganizations/orderer.supplychain.com/orderers/orderer.supplychain.com/tls/:/var/hyperledger/orderer/tls
- orderer.org.supplychain.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
- 8443:8443
networks:
- supplychain**