Reputation: 958
Problem:
I am very new to Hyperledger fabric stuff. I tried to build a network from scratch with docker. Everything work fine and network was up successfully. But when I was trying to create a channel it gave me this error.
2019-01-18 09:34:00.275 UTC [msp] getMspConfig -> WARN 001 Intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/intermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/intermediatecerts: no such file or directory]
2019-01-18 09:34:00.288 UTC [msp] getMspConfig -> WARN 002 TLS intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/tlsintermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/tlsintermediatecerts: no such file or directory]
2019-01-18 09:34:00.289 UTC [msp] getMspConfig -> WARN 003 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/crls]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/crls: no such file or directory]
2019-01-18 09:34:00.291 UTC [msp] getMspConfig -> INFO 004 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/config.yaml: no such file or directory]
Error: Error connecting due to rpc error: code = Unavailable desc = grpc: the connection is unavailable
This is my docker-compose-cli.yaml file.
version: "2"
volumes:
orderer.trafficfine.com:
peer0.Mp.trafficfine.com:
peer1.Mp.trafficfine.com:
peer0.Policedepartment.trafficfine.com:
peer1.Policedepartment.trafficfine.com:
peer0.AE.trafficfine.com:
peer1.AE.trafficfine.com:
networks:
byfn:
services:
orderer.trafficfine.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.trafficfine.com
container_name: orderer.trafficfine.com
networks:
- byfn
peer0.Mp.trafficfine.com:
container_name: peer0.Mp.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer0.Mp.trafficfine.com
networks:
- byfn
peer1.Mp.trafficfine.com:
container_name: peer1Mp.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer1.Mp.trafficfine.com
networks:
- byfn
peer0.Policedepartment.trafficfine.com:
container_name: peer0.Policedepartment.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer0.Policedepartment.trafficfine.com
networks:
- byfn
peer1.Policedepartment.trafficfine.com:
container_name: peer1.Policedepartment.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer1.Policedepartment.trafficfine.com
networks:
- byfn
peer0.AE.trafficfine.com:
container_name: peer0.AE.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer0.AE.trafficfine.com
networks:
- byfn
peer1.AE.trafficfine.com:
container_name: peer1.AE.trafficfine.com
extends:
file: base/docker-compose-base.yaml
service: peer1.AE.trafficfine.com
networks:
- byfn
cli:
container_name: cli
image: hyperledger/fabric-tools:x86_64-1.0.0-rc1
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
#- CORE_LOGGING_LEVEL=DEBUG
- CORE_LOGGING_LEVEL=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.Msp.trafficfine.com:7051
- CORE_PEER_LOCALMSPID=MpMSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Mp.trafficfine.com/peers/peer0.Mp.trafficfine.com/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Mp.trafficfine.com/peers/peer0.Mp.trafficfine.com/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/peers/peer0.Policedepartment.trafficfine.com/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.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/chaincode
- ./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:
- orderer.trafficfine.com
- peer0.Mp.trafficfine.com
- peer1.Mp.trafficfine.com
- peer0.Policedepartment.trafficfine.com
- peer1.Policedepartment.trafficfine.com
- peer0.AE.trafficfine.com
- peer1.AE.trafficfine.com
networks:
- byfn
I looked for solutions on the Internet but I was unable to find a good solution for my problem. Can someone help me to solve my problem?. Thank you!
Upvotes: 1
Views: 540
Reputation: 1405
@dwp, As per your volume mounts your source directory in your machine ("./crypto-config") was mounted to your container ("/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/")...
And the error says (let's take first one) ==> Intermediate certs folder not found at /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/intermediatecerts
means there is no directory "./crypto-config/peerOrganizations/Policedepartment.trafficfine.com/users/Admin@Policedepartment.trafficfine.com/msp/intermediatecerts"..
So try to change the volume mount source and targets according to your crypto-config files..
To debug more into cli container use,
docker exec -it cli bash
Upvotes: 1
Reputation: 558
Did you generate the new crypto material? Try this:
docker container exec -it cli bash
And search for the crypto directory, the error says that not found your crypto material files in your container, and you need it to make transactions over the network.
Upvotes: 0