docker - 无法运行对等体,因为从目录 /etc/hyperledger/fabric/msp 设置类型为 bccsp 的 MSP 时出错
问题描述
我正在学习使用 Hyperledger 结构创建应用程序。
创建了网络。启动网络时出现错误。
当我运行命令时:docker-compose -f ./docker-compose.yml up
得到错误:
无法运行对等体,因为从目录 /etc/hyperledger/fabric/msp 设置类型为 bccsp 的 MSP 时出错:无法从目录 /etc/hyperledger/fabric/msp/signcerts 加载有效的签名者证书:stat /etc/hyperledger/fabric /msp/signcerts: 没有这样的文件或目录
我已经在服务@docker-compose.yml 文件中添加了该CORE_PEER_MSPCONFIGPATH
属性CLI
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.pharma-network.com/users/Admin@manufacturer.pharma-network.com/msp
这是我的 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
这是 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
这是 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
请帮我。
解决方案
我认为您需要更改../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
. 这件事完全取决于你的目录结构
推荐阅读
- delphi - Delphi DX 10.3 VS Delphi 6 性能
- java - 如何将现有的字符串数组转移到二维数组
- mysql - MySQL查找打开时间和关闭时间之间的记录
- excel - 在新创建的动态表上用零填充空白
- node.js - NodeJs,如何访问模块内的变量
- c++ - 使用openGL帧缓冲区时如何获得相机运动
- bash - 使用 bash 脚本在多个文件中搜索用户名并打印如果它不存在
- highcharts - Highcharts 修改一个系列的工具提示
- javascript - CORS 策略已阻止访问从源“http://localhost:3000”获取
- python - 保存为 pdf 或 svg 时找不到 matplotlib pyplot.savefig 的模块(但 png ok)