0

I want to run the docker daemon with user namespace enabled. But, I am getting below error when starting docker daemon with "userns-remap":"default" option in daemon.json file.

2023-02-24 08:05:59.051 UTC [main] InitCmd -> ERRO 001 Cannot run peer because error when setting up MSP of type bccsp from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.MSP/msp: KeyMaterial not found in SigningIdentityInfo

My docker-compose file is as follows.

version: '3.9'

networks:
  basic:

services:
  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
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic
      - FABRIC_LOGGING_SPEC=DEBUG
      - CORE_CHAINCODE_LOGGING_LEVEL=INFO
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/run/secrets/server.crt
      - CORE_PEER_TLS_KEY_FILE=/run/secrets/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/run/secrets/ca.crt
      - CORE_PEER_LOCALMSPID=Org1MSP
      - CORE_PEER_ID=peer0.org1.example.com
      - CORE_PEER_ADDRESS=peer0.org1.example.com:8050
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    secrets:
      - server.crt
      - server.key
      - ca.crt
    volumes:
      - /var/run/docker.sock:/host/var/run/docker.sock
      - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
    ports:
      - 8050:8050
    command: peer node start
    depends_on:
      - orderer0.consortiumorderer.example.com
    networks:
      - basic

secrets:
      server.crt:
              file: ./server.crt
      server.key:
              file: ./server.key
      ca.crt:
              file: ./ca.crt

However, when I run the same code without userns-remap file in /etc/docker/daemon.json file it is working fine.

Satya Narayana
  • 454
  • 6
  • 20

0 Answers0