&quot“订购器二进制”命令不在Docker-Compose中工作
我正在尝试使用Docker-Compose启动我的HyperLeDger Fabric网络,该组合在Docker-Compose文件的环境部分中具有所有“订购器和同行”配置。
但是,当我使用“ docker-compose -f docker-compose.yaml up -d”启动docker-compose文件时,我会遇到此错误:
“无法启动service ordering ordering order.org.com:无法创建shim shim :oci运行时创建失败:runc create失败:无法启动容器流程:exec:“ orderer”:$ path中找不到可执行文件:
知道我已经导出了所有人必要的环境变量,例如“导出路径= bin:$ path和Fabric_cfg_path”。
没有遇到相同的
- 此外,在同一docker-compose文件****
中,我在同一docker-compose文件中
:
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**
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**
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
因此,前几行,特别是
您要启动订单器,您使用的是错误的映像,应该是
Fabric-orderer
So the first few lines, specifically
you are using the wrong image if you want to launch the orderer, it should be
fabric-orderer
您需要使用订单器映像来运行订单器容器,并将容器图像更新为
HyperLeDger/Fabric-orderer:2.4
。您的订单器容器定义应该看起来像这样
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