title: Docker-Compose ParserError: while parsing a block mapping
body: <p>I'm building Multi-org fabric but when I run command <code>docker-compose up -d</code>
  it gives below error</p>
  
  <pre><code>ERROR: yaml.parser.ParserError: while parsing a block mapping
    in "./docker-compose.yml", line 6, column 1
  expected &lt;block end&gt;, but found '&lt;block mapping start&gt;'
    in "./docker-compose.yml", line 130, column 3
  </code></pre>
  
  <p>Below is the <code>docker-compose.yaml</code>. </p>
  
  <pre><code>version: '2'
  
  networks:
    basic:
  
  services:
    ca.main.tcloud.kpn.org:
      image: hyperledger/fabric-ca: x86_64-1.0.6
      environment:
        - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
        - FABRIC_CA_SERVER_CA_NAME=ca.main.tcloud.kpn.org
        - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.crm.main.tcloud.kpn.org-cert.pem
        - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/c59a4aad4207795c6ccaf6301425732c287b976bcc291e3e398c9d74f0eb4774_sk
      ports:
        - "7054:7054"
      command: sh -c 'fabric-ca-server start -b admin:adminpw'
      volumes:
        - ./crypto-config/peerOrganizations/crm.main.tcloud.kpn.org/ca/:/etc/hyperledger/fabric-ca-server-config
      container_name: ca.main.tcloud.kpn.org
      networks:
        - basic
  
    orderer.main.tcloud.kpn.org:
      container_name: orderer.main.tcloud.kpn.org
      image: hyperledger/fabric-orderer: x86_64-1.0.6
      environment:
        - ORDERER_GENERAL_LOGLEVEL=info
        - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
        - ORDERER_GENERAL_GENESISMETHOD=file
        - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
        - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
        - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
      working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
      command: orderer
      ports:
        - 7050:7050
      volumes:
          - ./config/:/etc/hyperledger/configtx
          - ./crypto-config/ordererOrganizations/main.tcloud.kpn.org/orderers/orderer.main.tcloud.kpn.org/:/etc/hyperledger/msp/orderer
          - ./crypto-config/peerOrganizations/crm.main.tcloud.kpn.org/peers/peer0.crm.main.tcloud.kpn.org/:/etc/hyperledger/msp/peerCrm
          - ./crypto-config/peerOrganizations/ebs.main.tcloud.kpn.org/peers/peer0.ebs.main.tcloud.kpn.org/:/etc/hyperledger/msp/peerEbs
          - ./crypto-config/peerOrganizations/lsp.main.tcloud.kpn.org/peers/peer0.lsp.main.tcloud.kpn.org/:/etc/hyperledger/msp/peerLsp
          - ./crypto-config/peerOrganizations/delivery.main.tcloud.kpn.org/peers/peer0.delivery.main.tcloud.kpn.org/:/etc/hyperledger/msp/peerDelivery
          - ./channel-artifacts/genesis.block:/etc/hyperledger/configtx/genesis.block
      networks:
        - basic
  
    peer0.crm.main.tcloud.kpn.org:
      container_name: peer0.crm.main.tcloud.kpn.org
      image: hyperledger/fabric-peer: x86_64-1.0.6
      environment:
        - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        - CORE_PEER_ID=peer0.crm.main.tcloud.kpn.org
        - CORE_LOGGING_PEER=info
        - CORE_CHAINCODE_LOGGING_LEVEL=info
        - CORE_PEER_LOCALMSPID=crmMSP
        - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
        - CORE_PEER_ADDRESS=peer0.crm.main.tcloud.kpn.org:7051
        # # 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=${COMPOSE_PROJECT_NAME}_basic
        - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
        - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbcrm:5984
        # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
        # provide the credentials for ledger to connect to CouchDB.  The username and password must
        # match the username and password set for the associated CouchDB.
        - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
        - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
      working_dir: /opt/gopath/src/github.com/hyperledger/fabric
      command: peer node start
      # command: peer node start --peer-chaincodedev=true
      ports:
        - 7051:7051
        - 7053:7053
      volumes:
          - /var/run/:/host/var/run/
          - ./crypto-config/peerOrganizations/crm.main.tcloud.kpn.org/peers/peer0.crm.main.tcloud.kpn.org/msp:/etc/hyperledger/msp/peer
          - ./crypto-config/peerOrganizations/crm.main.tcloud.kpn.org/users:/etc/hyperledger/msp/users
          - ./config:/etc/hyperledger/configtx
      depends_on:
        - orderer.main.tcloud.kpn.org
        - couchdbcrm
      networks:
        - basic
    peer0.ebs.main.tcloud.kpn.org:
      container_name: peer0.ebs.main.tcloud.kpn.org
      image: hyperledger/fabric-peer: x86_64-1.0.6
      environment:
        - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        - CORE_PEER_ID=peer0.ebs.main.tcloud.kpn.org
        - CORE_LOGGING_PEER=info
        - CORE_CHAINCODE_LOGGING_LEVEL=info
        - CORE_PEER_LOCALMSPID=ebsMSP
        - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
        - CORE_PEER_ADDRESS=peer0.ebs.main.tcloud.kpn.org:7051
        # # 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=kpn_basic
        - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
        - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbebs:5984
        # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
        # provide the credentials for ledger to connect to CouchDB.  The username and password must
        # match the username and password set for the associated CouchDB.
        - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
        - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
      working_dir: /opt/gopath/src/github.com/hyperledger/fabric
      command: peer node start
      # command: peer node start --peer-chaincodedev=true
      ports:
        - 8051:7051
        - 8053:7053
      volumes:
          - /var/run/:/host/var/run/
          - ./crypto-config/peerOrganizations/ebs.main.tcloud.kpn.org/peers/peer0.ebs.main.tcloud.kpn.org/msp:/etc/hyperledger/msp/peer
          - ./crypto-config/peerOrganizations/ebs.main.tcloud.kpn.org/users:/etc/hyperledger/msp/users
          - ./config:/etc/hyperledger/configtx
      depends_on:
        - orderer.main.tcloud.kpn.org
        - couchdbebs
      networks:
        - basic
  
    peer0.lsp.main.tcloud.kpn.org:
      container_name: peer0.lsp.main.tcloud.kpn.org
      image: hyperledger/fabric-peer: x86_64-1.0.6
      environment:
        - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        - CORE_PEER_ID=peer0.lsp.main.tcloud.kpn.org
        - CORE_LOGGING_PEER=info
        - CORE_CHAINCODE_LOGGING_LEVEL=info
        - CORE_PEER_LOCALMSPID=lspMSP
        - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
        - CORE_PEER_ADDRESS=peer0.lsp.main.tcloud.kpn.org:7051
        # # 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=kpn_basic
        - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
        - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdblsp:5984
        # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
        # provide the credentials for ledger to connect to CouchDB.  The username and password must
        # match the username and password set for the associated CouchDB.
        - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
        - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
      working_dir: /opt/gopath/src/github.com/hyperledger/fabric
      command: peer node start
      # command: peer node start --peer-chaincodedev=true
      ports:
        - 9051:7051
        - 9053:7053
      volumes:
         - /var/run/:/host/var/run/
         - ./crypto-config/peerOrganizations/lsp.main.tcloud.kpn.org/peers/peer0.lsp.main.tcloud.kpn.org/msp:/etc/hyperledger/msp/peer
         - ./crypto-config/peerOrganizations/lsp.main.tcloud.kpn.org/users:/etc/hyperledger/msp/users
         - ./config:/etc/hyperledger/configtx
      depends_on:
        - orderer.main.tcloud.kpn.org
        - couchdblsp
      networks:
        - basic
  
    peer0.delivery.main.tcloud.kpn.org:
      container_name: peer0.delivery.main.tcloud.kpn.org
      image: hyperledger/fabric-peer: x86_64-1.0.6
      environment:
        - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        - CORE_PEER_ID=peer0.delivery.main.tcloud.kpn.org
        - CORE_LOGGING_PEER=info
        - CORE_CHAINCODE_LOGGING_LEVEL=info
        - CORE_PEER_LOCALMSPID=deliveryMSP
        - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
        - CORE_PEER_ADDRESS=peer0.delivery.main.tcloud.kpn.org:7051
        # # 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_basic
        - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
        - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbdelivery:5984
        # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
        # provide the credentials for ledger to connect to CouchDB.  The username and password must
        # match the username and password set for the associated CouchDB.
        - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
        - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
      working_dir: /opt/gopath/src/github.com/hyperledger/fabric
      command: peer node start
      # command: peer node start --peer-chaincodedev=true
      ports:
        - 10051:7051
        - 10053:7053
      volumes:
        - /var/run/:/host/var/run/
        - ./crypto-config/peerOrganizations/delivery.main.tcloud.kpn.org/peers/peer0.delivery.main.tcloud.kpn.org/msp:/etc/hyperledger/msp/peer
        - ./crypto-config/peerOrganizations/delivery.main.tcloud.kpn.org/users:/etc/hyperledger/msp/users
        - ./config:/etc/hyperledger/configtx
      depends_on:
        - orderer.main.tcloud.kpn.org
        - couchdbdelivery
      networks:
        - basic
  
    couchdbcrm:
      container_name: couchdbcrm
      image: hyperledger/fabric-couchdb: x86_64-1.0.6
      # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
      # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
      environment:
        - COUCHDB_USER=
        - COUCHDB_PASSWORD=
      ports:
        - 5984:5984
      networks:
        - basic
    couchdbebs:
      container_name: couchdbebs
      image: hyperledger/fabric-couchdb: x86_64-1.0.6
      # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
      # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
      environment:
        - COUCHDB_USER=
        - COUCHDB_PASSWORD=
      ports:
        - 5985:5984
      networks:
        - basic
    couchdblsp:
      container_name: couchdblsp
      image: hyperledger/fabric-couchdb: x86_64-1.0.6
      # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
      # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
      environment:
        - COUCHDB_USER=
        - COUCHDB_PASSWORD=
      ports:
        - 5986:5984
      networks:
        - basic
  
    couchdbdelivery:
      container_name: couchdbdelivery
      image: hyperledger/fabric-couchdb: x86_64-1.0.6
      # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
      # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
      environment:
        - COUCHDB_USER=
        - COUCHDB_PASSWORD=
      ports:
        - 5987:5984
      networks:
        - basic
  
    cli:
      container_name: cli
      image: hyperledger/fabric-tools: x86_64-1.0.6
      tty: true
      environment:
        - GOPATH=/opt/gopath
        - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        - CORE_LOGGING_LEVEL=info
        - CORE_PEER_ID=cli
        - CORE_PEER_ADDRESS=peer0.crm.main.tcloud.kpn.org:7051
        - CORE_PEER_LOCALMSPID=crmMSP
        - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/crm.main.tcloud.kpn.org/users/Admin@crm.main.tcloud.kpn.org/msp
        - CORE_CHAINCODE_KEEPALIVE=10
      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/
          - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
          - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
      networks:
          - basic
      depends_on:
        - orderer.main.tcloud.kpn.org
        - peer0.crm.main.tcloud.kpn.org
        - peer0.ebs.main.tcloud.kpn.org
        - peer0.lsp.main.tcloud.kpn.org
        - peer0.delivery.main.tcloud.kpn.org
  </code></pre>
  
  <p>I have also validated online with YAML validator but it's showing correct YAML so I'm not sure where its going wrong. I have checked if there are any tabs present or not but there is not tab. </p>