&quot“订购器二进制”命令不在Docker-Compose中工作

发布于 2025-02-13 11:46:06 字数 4501 浏览 0 评论 0原文

我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

农村范ル 2025-02-20 11:46:07

因此,前几行,特别是

container_name: orderer.org.supplychain.com
image: hyperledger/fabric-peer:latest

您要启动订单器,您使用的是错误的映像,应该是Fabric-orderer

So the first few lines, specifically

container_name: orderer.org.supplychain.com
image: hyperledger/fabric-peer:latest

you are using the wrong image if you want to launch the orderer, it should be fabric-orderer

何其悲哀 2025-02-20 11:46:06

您需要使用订单器映像来运行订单器容器,并将容器图像更新为HyperLeDger/Fabric-orderer:2.4
您的订单器容器定义应该看起来像这样

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**

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**
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文