我正在尝试使用docker-compose启动我的超级分类账结构网络,其中包含所有的"orderer"one_answers"peer"。在docker-compose文件的环境部分配置。
但是当我使用"docker-compose -f docker-compose启动docker-compose文件时。,我得到这个错误的结果:
"无法启动服务orderer.org.com:创建shim失败:OCI运行时创建失败:runc创建失败:无法启动容器进程:exec: "orderer":可执行文件不在$PATH: unknown".
知道我导出了所有必要的环境变量,例如"export the PATH=bin:$PATH"one_answers"fabric_cfg_path"。
此外,在相同的docker-compose文件
中,我没有得到相同的错误。- * * * *:
**这是我在docker-compose文件中order的配置部分
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**
这是对等体的一部分
* * 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**
您需要使用orderer映像来运行orderer容器,并将容器映像更新为hyperledger/fabric-orderer:2.4
。您的orderer容器定义应该如下所示
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**
前几行,特别是
container_name: orderer.org.supplychain.com
image: hyperledger/fabric-peer:latest
你使用了错误的图片,如果你想启动定序者,应该是fabric-orderer