简体   繁体   English

无法运行对等体,因为从目录 /etc/hyperledger/fabric/msp 设置类型为 bccsp 的 MSP 时出错

[英]Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp

I am learning to create an application using Hyperledger fabrics.我正在学习使用 Hyperledger 结构创建应用程序。

Created the network.创建了网络。 I got an error when starting the network.启动网络时出现错误。

When I run command: docker-compose -f./docker-compose.yml up当我运行命令时: docker-compose -f./docker-compose.yml up

Getting error:得到错误:

Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: could not load a valid signer certificate from directory /etc/hyperledger/fabric/msp/signcerts: stat /etc/hyperledger/fabric/msp/signcerts: no such file or directory无法运行对等体,因为从目录 /etc/hyperledger/fabric/msp 设置类型为 bccsp 的 MSP 时出错:无法从目录 /etc/hyperledger/fabric/msp/signcerts 加载有效的签名者证书:stat /etc/hyperledger/fabric /msp/signcerts: 没有这样的文件或目录

I have already added the CORE_PEER_MSPCONFIGPATH property in CLI service @docker-compose.yml file我已经在CLI服务 @docker-compose.yml 文件中添加了CORE_PEER_MSPCONFIGPATH属性

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/msp

This is my docker-compose.yml file.这是我的 docker-compose.yml 文件。

version: '2'

volumes:
  orderer.pharma-network.com:
  peer0.manufacturer.pharma-network.com:
  peer1.manufacturer.pharma-network.com:
  peer0.distributor.pharma-network.com:
  peer1.distributor.pharma-network.com:
  peer0.retailer.pharma-network.com:
  peer1.retailer.pharma-network.com:
  peer0.consumer.pharma-network.com:
  peer1.consumer.pharma-network.com:
  peer0.transporter.pharma-network.com:
  peer1.transporter.pharma-network.com:

networks:
  pharma:

services:

  ca.manufacturer.pharma-network.com:
    image: hyperledger/fabric-ca:latest
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.manufacturer.pharma-network.com
      - FABRIC_CA_SERVER_TLS_ENABLED=false
      #- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.manufacturer.pharma-network.com-cert.pem
      #- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/754fccf4ad3f6a483161cf597b79fbdbdadaf1ee2f024e79da8c8e9b8bfb6dcb_sk
    ports:
      - "7054:7054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d' # --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.registrar.property-registration-network.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/754fccf4ad3f6a483161cf597b79fbdbdadaf1ee2f024e79da8c8e9b8bfb6dcb_sk
    volumes:
      - ./crypto-config/peerOrganizations/manufacturer.pharma-network.com/ca/:/etc/hyperledger/fabric-ca-server-config
    container_name: ca.manufacturer.pharma-network.com
    networks:
      - pharma

  ca.distributor.pharma-network.com:
    image: hyperledger/fabric-ca:latest
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.distributor.pharma-network.com
      - FABRIC_CA_SERVER_TLS_ENABLED=false
      # - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem
      # - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
    ports:
      - "8054:7054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d' # --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
    volumes:
      - ./crypto-config/peerOrganizations/distributor.pharma-network.com/ca/:/etc/hyperledger/fabric-ca-server-config
    container_name: ca.distributor.pharma-network.com
    networks:
      - pharma

  ca.retailer.pharma-network.com:
      image: hyperledger/fabric-ca:latest
      environment:
        - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
        - FABRIC_CA_SERVER_CA_NAME=ca.retailer.pharma-network.com
        - FABRIC_CA_SERVER_TLS_ENABLED=false
        # - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem
        # - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
      ports:
        - "9054:7054"
      command: sh -c 'fabric-ca-server start -b admin:adminpw -d' # --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
      volumes:
        - ./crypto-config/peerOrganizations/retailer.pharma-network.com/ca/:/etc/hyperledger/fabric-ca-server-config
      container_name: ca.retailer.pharma-network.com
      networks:
        - pharma

  ca.consumer.pharma-network.com:
      image: hyperledger/fabric-ca:latest
      environment:
        - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
        - FABRIC_CA_SERVER_CA_NAME=ca.consumer.pharma-network.com
        - FABRIC_CA_SERVER_TLS_ENABLED=false
        
      ports:
        - "1054:7054"
      command: sh -c 'fabric-ca-server start -b admin:adminpw -d' # --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
      volumes:
        - ./crypto-config/peerOrganizations/consumer.pharma-network.com/ca/:/etc/hyperledger/fabric-ca-server-config
      container_name: ca.consumer.pharma-network.com
      networks:
        - pharma

  ca.transporter.pharma-network.com:
      image: hyperledger/fabric-ca:latest
      environment:
        - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
        - FABRIC_CA_SERVER_CA_NAME=ca.transporter.pharma-network.com
        - FABRIC_CA_SERVER_TLS_ENABLED=false
        # - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem
        # - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
      ports:
        - "2054:7054"
      command: sh -c 'fabric-ca-server start -b admin:adminpw -d' # --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.users.property-registration-network.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/69f46c1ef51a71ee0aaadc9cef23aef7b44df2b1e84dad62484980170c01aa22_sk
      volumes:
        - ./crypto-config/peerOrganizations/transporter.pharma-network.com/ca/:/etc/hyperledger/fabric-ca-server-config
      container_name: ca.transporter.pharma-network.com
      networks:
        - pharma

  orderer.pharma-network.com:
    extends:
      file:   docker-base/docker-compose-base.yaml
      service: orderer.pharma-network.com
    container_name: orderer.pharma-network.com
    networks:
      - pharma

  peer0.manufacturer.pharma-network.com:
    container_name: peer0.manufacturer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer0.manufacturer.pharma-network.com
    networks:
      - pharma

  peer1.manufacturer.pharma-network.com:
    container_name: peer1.manufacturer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer1.manufacturer.pharma-network.com
    networks:
      - pharma

  peer0.distributor.pharma-network.com:
    container_name: peer0.distributor.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer0.distributor.pharma-network.com
    networks:
      - pharma

  peer1.distributor.pharma-network.com:
    container_name: peer1.distributor.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer1.distributor.pharma-network.com
    networks:
      - pharma

  peer0.retailer.pharma-network.com:
    container_name: peer0.retailer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer0.retailer.pharma-network.com
    networks:
      - pharma

  peer1.retailer.pharma-network.com:
    container_name: peer1.retailer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer1.retailer.pharma-network.com
    networks:
      - pharma

  peer0.consumer.pharma-network.com:
    container_name: peer0.consumer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer0.consumer.pharma-network.com
    networks:
      - pharma

  peer1.consumer.pharma-network.com:
    container_name: peer1.consumer.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer1.consumer.pharma-network.com
    networks:
      - pharma

  peer0.transporter.pharma-network.com:
    container_name: peer0.transporter.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer0.transporter.pharma-network.com
    networks:
      - pharma

  peer1.transporter.pharma-network.com:
    container_name: peer1.transporter.pharma-network.com
    extends:
      file:  docker-base/docker-compose-base.yaml
      service: peer1.transporter.pharma-network.com
    networks:
      - pharma

  cli:
    container_name: cli
    image: hyperledger/fabric-tools:latest
    tty: true
    stdin_open: true
    environment:
      - GOPATH=/opt/gopath
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - FABRIC_LOGGING_SPEC=INFO
      - CORE_PEER_ID=cli
      - CORE_PEER_ADDRESS=peer0.manufacturer.pharma-network.com:7051
      - CORE_PEER_LOCALMSPID=manufacturerMSP
      - CORE_PEER_TLS_ENABLED=false
      - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/tls/ca.crt
      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/msp
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: /bin/bash
    volumes:
      - /var/run/:/host/var/run/
      - ./../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/
      - ./../chaincode-advanced/:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode-advanced/
      - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
      - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
      - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
    depends_on:
      - ca.manufacturer.pharma-network.com
      - ca.distributor.pharma-network.com
      - ca.retailer.pharma-network.com
      - ca.consumer.pharma-network.com
      - ca.transporter.pharma-network.com
      - orderer.pharma-network.com
      - peer0.manufacturer.pharma-network.com
      - peer1.manufacturer.pharma-network.com
      - peer0.distributor.pharma-network.com
      - peer1.distributor.pharma-network.com
      - peer0.retailer.pharma-network.com
      - peer1.retailer.pharma-network.com
      - peer0.consumer.pharma-network.com
      - peer1.consumer.pharma-network.com
      - peer0.transporter.pharma-network.com
      - peer1.transporter.pharma-network.com

    networks:
      - pharma

  chaincode:
    container_name: chaincode
    image: hyperledger/fabric-ccenv:latest
    tty: true
    environment:
      - GOPATH=/opt/gopath
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - FABRIC_LOGGING_SPEC=INFO
      - CORE_PEER_ID=chaincode
      - CORE_PEER_ADDRESS=peer0.manufacturer.pharma-network.com:7051
      - CORE_PEER_LOCALMSPID=manufacturerMSP
      - CORE_PEER_TLS_ENABLED=false
      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/msp
      - CORE_TLS_CLIENT_KEY_PATH=/opt/gopath/src/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/tls/client.key
      - CORE_TLS_CLIENT_CERT_PATH=/opt/gopath/src/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/tls/client.crt
      - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/tls/ca.crt
    working_dir: /opt/gopath/src/chaincode
    command: /bin/bash -c 'sleep 6000000'
    volumes:
      - /var/run/:/host/var/run/
      - ./../chaincode:/opt/gopath/src/chaincode
      - ./../chaincode-advanced:/opt/gopath/src/chaincode-advanced
      - ./crypto-config:/opt/gopath/src/crypto
    networks:
      - pharma

This is docker-compose-base.yaml.这是 docker-compose-base.yaml。


services:

  orderer.pharma-network.com:
    container_name: orderer.pharma-network.com
    image: hyperledger/fabric-orderer:latest
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enable TLS
      - ORDERER_GENERAL_TLS_ENABLED=false
      - 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]
      #- GODEBUG=netdns=go
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
    - ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
    - ../crypto-config/ordererOrganizations/pharma-network.com/orderers/orderer.pharma-network.com/msp:/var/hyperledger/orderer/msp
    - ../crypto-config/ordererOrganizations/pharma-network.com/orderers/orderer.pharma-network.com/tls/:/var/hyperledger/orderer/tls
    - orderer.pharma-network.com:/var/hyperledger/production/orderer
    ports:
      - 7050:7050

  peer0.manufacturer.pharma-network.com:
    container_name: peer0.manufacturer.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer0.manufacturer.pharma-network.com
      - CORE_PEER_ADDRESS=peer0.manufacturer.pharma-network.com:7051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:7051
      - CORE_PEER_CHAINCODEADDRESS=peer0.manufacturer.pharma-network.com:7053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7053
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.manufacturer.pharma-network.com:8051
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.manufacturer.pharma-network.com:7051
      - CORE_PEER_LOCALMSPID=manufacturerMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer0.manufacturer.pharma-network.com:/var/hyperledger/production
    ports:
      - 7051:7051
      - 7053:7053

  peer1.manufacturer.pharma-network.com:
    container_name: peer1.manufacturer.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer1.manufacturer.pharma-network.com
      - CORE_PEER_ADDRESS=peer1.manufacturer.pharma-network.com:8051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:8051
      - CORE_PEER_CHAINCODEADDRESS=peer0.manufacturer.pharma-network.com:8053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8053
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.manufacturer.pharma-network.com:8051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.manufacturer.pharma-network.com:7051
      - CORE_PEER_LOCALMSPID=manufacturerMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer1.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer1.manufacturer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer1.manufacturer.pharma-network.com:/var/hyperledger/production

    ports:
      - 8051:8051
      - 8053:8053

  peer0.distributor.pharma-network.com:
    container_name: peer0.distributor.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer0.distributor.pharma-network.com
      - CORE_PEER_ADDRESS=peer0.distributor.pharma-network.com:9051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:9051
      - CORE_PEER_CHAINCODEADDRESS=peer0.distributor.pharma-network.com:9053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9053
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.distributor.pharma-network.com:9051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.distributor.pharma-network.com:10051
      - CORE_PEER_LOCALMSPID=distributorMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/distributor.pharma-network.com/peers/peer0.distributor.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/distributor.pharma-network.com/peers/peer0.distributor.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer0.distributor.pharma-network.com:/var/hyperledger/production
    ports:
      - 9051:9051
      - 9053:9053

  peer1.distributor.pharma-network.com:
    container_name: peer1.distributor.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer1.distributor.pharma-network.com
      - CORE_PEER_ADDRESS=peer1.distributor.pharma-network.com:10051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:10051
      - CORE_PEER_CHAINCODEADDRESS=peer0.distributor.pharma-network.com:10053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10053
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.distributor.pharma-network.com:10051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.distributor.pharma-network.com:9051
      - CORE_PEER_LOCALMSPID=distributorMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/distributor.pharma-network.com/peers/peer1.distributor.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/distributor.pharma-network.com/peers/peer1.distributor.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer1.distributor.pharma-network.com:/var/hyperledger/production
    ports:
      - 10051:10051
      - 10053:10053

  peer0.retailer.pharma-network.com:
    container_name: peer0.retailer.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer0.retailer.pharma-network.com
      - CORE_PEER_ADDRESS=peer0.retailer.pharma-network.com:11051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:11051
      - CORE_PEER_CHAINCODEADDRESS=peer0.retailer.pharma-network.com:11053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11053
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.retailer.pharma-network.com:11051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.retailer.pharma-network.com:9051
      - CORE_PEER_LOCALMSPID=retailerMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/retailer.pharma-network.com/peers/peer0.retailer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/retailer.pharma-network.com/peers/peer0.retailer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer0.retailer.pharma-network.com:/var/hyperledger/production
    ports:
      - 11051:11051
      - 11053:11053

  peer1.retailer.pharma-network.com:
     container_name: peer1.retailer.pharma-network.com
     extends:
       file: docker-compose-peer.yaml
       service: peer-base
     environment:
       - CORE_PEER_ID=peer1.retailer.pharma-network-network.com
       - CORE_PEER_ADDRESS=peer1.retailer.pharma-network-network.com:11051
       - CORE_PEER_LISTENADDRESS=0.0.0.0:11051
       - CORE_PEER_CHAINCODEADDRESS=peer0.retailer.pharma-network-network.com:11053
       - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11053
       - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.retailer.pharma-network-network.com:11051
       - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.retailer.pharma-network.com:12051
       - CORE_PEER_LOCALMSPID=upgradMSP
     volumes:
         - /var/run/:/host/var/run/
         - ../crypto-config/peerOrganizations/retailer.pharma-network.com/peers/peer0.retailer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
         - ../crypto-config/peerOrganizations/retailer.pharma-network.com/peers/peer0.retailer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
         - peer0.retailer.pharma-network.com:/var/hyperledger/production
     ports:
       - 12051:12051
       - 12053:12053

  peer0.consumer.pharma-network.com:
    container_name: peer0.consumer.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
     - CORE_PEER_ID=peer0.consumer.pharma-network.com
     - CORE_PEER_ADDRESS=peer0.consumer.pharma-network.com:12051
     - CORE_PEER_LISTENADDRESS=0.0.0.0:12051
     - CORE_PEER_CHAINCODEADDRESS=peer0.consumer.pharma-network.com:12053
     - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12053
     - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.consumer.pharma-network.com:12051
     - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.consumer.pharma-network.com:11051
     - CORE_PEER_LOCALMSPID=consumerMSP
    volumes:
       - /var/run/:/host/var/run/
       - ../crypto-config/peerOrganizations/consumer.pharma-network.com/peers/peer0.consumer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
       - ../crypto-config/peerOrganizations/consumer.pharma-network.com/peers/peer0.consumer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
       - peer0.consumer.pharma-network.com:/var/hyperledger/production
    ports:
      - 13051:13051
      - 13053:13053

  peer1.consumer.pharma-network.com:
    container_name: peer1.consumer.pharma-network.com
    extends:
     file: docker-compose-peer.yaml
     service: peer-base
    environment:
     - CORE_PEER_ID=peer1.consumer.pharma-network.com
     - CORE_PEER_ADDRESS=peer1.consumer.pharma-network.com:12052
     - CORE_PEER_LISTENADDRESS=0.0.0.0:12052
     - CORE_PEER_CHAINCODEADDRESS=peer1.consumer.pharma-network.com:12054
     - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12054
     - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.consumer.pharma-network.com:12052
     - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.consumer.pharma-network.com:11052
     - CORE_PEER_LOCALMSPID=consumerMSP
    volumes:
     - /var/run/:/host/var/run/
     - ../crypto-config/peerOrganizations/consumer.pharma-network.com/peers/peer1.consumer.pharma-network.com/msp:/etc/hyperledger/fabric/msp
     - ../crypto-config/peerOrganizations/consumer.pharma-network.com/peers/peer1.consumer.pharma-network.com/tls:/etc/hyperledger/fabric/tls
     - peer1.consumer.pharma-network.com:/var/hyperledger/production
    ports:
     - 14052:14052
     - 14054:14054

  peer0.transporter.pharma-network.com:
    container_name: peer0.transporter.pharma-network.com
    extends:
     file: docker-compose-peer.yaml
     service: peer-base
    environment:
     - CORE_PEER_ID=peer0.transporter.pharma-network.com
     - CORE_PEER_ADDRESS=peer0.transporter.pharma-network.com:15051
     - CORE_PEER_LISTENADDRESS=0.0.0.0:15051
     - CORE_PEER_CHAINCODEADDRESS=peer0.transporter.pharma-network.com:15053
     - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:15053
     - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.transporter.pharma-network.com:15051
     - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.transporter.pharma-network.com:16051
     - CORE_PEER_LOCALMSPID=transporterMSP
    volumes:
      - /var/run/:/host/var/run/
      - ../crypto-config/peerOrganizations/transporter.pharma-network.com/peers/peer0.transporter.pharma-network.com/msp:/etc/hyperledger/fabric/msp
      - ../crypto-config/peerOrganizations/transporter.pharma-network.com/peers/peer0.transporter.pharma-network.com/tls:/etc/hyperledger/fabric/tls
      - peer0.transporter.pharma-network.com:/var/hyperledger/production
    ports:
      - 15051:15051
      - 15053:15053

  peer1.transporter.pharma-network.com:
    container_name: peer1.transporter.pharma-network.com
    extends:
      file: docker-compose-peer.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer1.transporter.pharma-network.com
      - CORE_PEER_ADDRESS=peer1.transporter.pharma-network.com:16051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:16051
      - CORE_PEER_CHAINCODEADDRESS=peer1.transporter.pharma-network.com:16053
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:16053
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.transporter.pharma-network.com:16051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.transporter.pharma-network.com:15051
      - CORE_PEER_LOCALMSPID=transporterMSP
    volumes:
        - /var/run/:/host/var/run/
        - ../crypto-config/peerOrganizations/transporter.pharma-network.com/peers/peer1.transporter.pharma-network.com/msp:/etc/hyperledger/fabric/msp
        - ../crypto-config/peerOrganizations/transporter.pharma-network.com/peers/peer1.transporter.pharma-network.com/tls:/etc/hyperledger/fabric/tls
        - peer1.transporter.pharma-network.com:/var/hyperledger/production
    ports:
      - 16051:16051
      - 16053:16053

This is docker-compose-peer.yaml.这是 docker-compose-peer.yaml。


services:
  peer-base:
    image: hyperledger/fabric-peer:latest
    environment:
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=network_pharma  #changed this from network_certification
      - FABRIC_LOGGING_SPEC=INFO
      - CORE_PEER_TLS_ENABLED=false
      - 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:
      - ../crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start --peer-chaincodedev=true

Please help me.请帮我。

I think you need you change ../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp to ./crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp .我认为您需要将../crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp更改为./crypto-config/peerOrganizations/manufacturer.pharma-network.com/peers/peer0.manufacturer.pharma-network.com/msp:/etc/hyperledger/fabric/msp This thing totally depends on your directory structure这件事完全取决于你的目录结构

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法运行对等体,因为设置 MSP 时出错 - Cannot run peer because error when setting up MSP Hyperledger Fabric:定义docker-compose时要使用的MSP目录 - Hyperledger Fabric: MSP directory to be used while defining docker-compose CRIT 002无法初始化本地MSP:无法从目录/ var / hyperledger / orderer / msp / signcerts加载有效的签署者证书 - CRIT 002 Failed to initialize local MSP: could not load a valid signer certificate from directory /var/hyperledger/orderer/msp/signcerts 设置 Hyperledger Fabric 的开发模式时出现端口错误 - Port error when setting up Dev mode of Hyperledger Fabric 设置 Hyperledger Fabric 开发环境时出现路由错误 - route error when setting up Hyperledger Fabric dev environment Hyperledger Fabric 1.4 ./byfn.sh up 在 peer0_Org2 连接到通道时出错 - Hyperledger fabric 1.4 ./byfn.sh up is giving error when peer0_Org2 connecting to channel Hyperledger Fabric对等容器不可用 - Hyperledger Fabric peer container not coming up 当我尝试在 test-network 目录中执行 ./network.sh up 时出现 Hyperledger Fabric 错误 - Hyperledger Fabric error when I try to do ./network.sh up in test-network directory Hyperledger Fabric CA 服务器 - 初始化 BCCSP PKCS11 库时出错 - Hyperledger Fabric CA server - getting error while initializing BCCSP PKCS11 library Hyperledger Fabric-从其他主机加入对等 - Hyperledger Fabric - Join peer from another host
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM