hyperledger-fabric peer0 environment

I am very new to this subject and I have to go through a fabric-sample. But at this point I have problem Environment variables

# Environment variables for PEER0

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
CORE_PEER_LOCALMSPID="Org1MSP"
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

But my docker-compose-base.yaml file has the following lines

environment:
      - CORE_PEER_ID=peer0.org1.example.com
      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
      - CORE_PEER_LOCALMSPID=Org1MSP

When I run this command

peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

I have this error message

INFO 004 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/config.yaml: no such file or directory]

I am sure this error message cased by the missing/different lines in my docker-compose-base.yaml

What could I do in this case? Just put these lines in my file? Or something has gone wrong at some point what I did not realize?

Please bear with me as I just have started.

Thank you

edit: I have this error message

Error: Got unexpected status: BAD_REQUEST
Usage:
  peer channel create [flags]

enter image description here

Upvotes: 0

Views: 404

Answers (1)

yacovm
yacovm

Reputation: 5140

That's not an error message, but an INFO one. an MSP can be configured to have an OU by having that config file with the following fields in it:

OrganizationalUnitIdentifiers:
  - Certificate: "cacerts/cacert.pem"
OrganizationalUnitIdentifier: "COP"

It's perfectly fine not to have this file and to see this INFO message.

Upvotes: 3

Related Questions