解决方法:hyperledger fabric实例化智能合约找不到网络

错误提示:API error(404) : {"message":"network xxx can not found"}

解决方法:

在base/peer-base.yaml文件中(或者docker-compose.yaml文件中,根据实际情况)

  • CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=指定你自己的网络名称

例如:
networks:
standalone:

peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_standalone
- FABRIC_LOGGING_SPEC=INFO

你可能感兴趣的:(解决方法:hyperledger fabric实例化智能合约找不到网络)