0

I try to create application channel. I launch CLI containers for peers with this docker-compose file, for example:

version: '2'

networks:
  fabric-ca:

services:
  cli-org1:
    container_name: cli-org1
    image: hyperledger/fabric-tools:2.4
    tty: true
    stdin_open: true
    environment:
      - GOPATH=/opt/gopath
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_ID=cli-org1
      - CORE_PEER_ADDRESS=peer1-org1:7051
      - CORE_PEER_LOCALMSPID=org1MSP
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem
      - CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/org1/peer1/msp
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/org1
    command: sh
    volumes:
      - ./peer1:/tmp/hyperledger/org1/peer1
      - ./peer1/assets/chaincode:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode
      - ./admin:/tmp/hyperledger/org1/admin
    networks:
      - fabric-ca

Then I go to the container and run:

export CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/org1/admin/msp

peer channel create -c mychannel -f /tmp/hyperledger/org1/peer1/assets/channel.tx -o orderer1-org0:7050 --outputBlock /tmp/hyperledger/org1/peer1/assets/mychannel.block --tls true --cafile /tmp/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem

I receive this error:

InitCmd -> Cannot run peer because error when setting up MSP of type bccsp from directory /tmp/hyperledger/org1/admin/msp: administrators must be declared when no admin ou classification is set

I didn't set admin ou classification. Help me please to solve my problem.

Ivan
  • 303
  • 3
  • 13
  • 1
    If you don't declare OU in config.yaml, you need to specify the admin certificate in special folder name, i.e - admincerts. – Brajesh Singh Sep 07 '22 at 13:29
  • @BrajeshSingh Thanks. I have done it. But Now I have this error: Error: failed to create deliver client for orderer: orderer client failed to connect to orderer1-org0:7060: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer1-org0 on 127.0.0.11:53: no such host" – Ivan Sep 08 '22 at 08:20
  • it seems your orderer1-org0 is not accessible, you could point it in your /etc/hosts files. – Brajesh Singh Sep 12 '22 at 06:38

0 Answers0