hyperledger / fabric-samples

Samples for Hyperledger Fabric
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
2.76k stars 3.36k forks source link

Error while setting up Fab3. #851

Open Lando-Ant opened 1 year ago

Lando-Ant commented 1 year ago

Hi! I am trying to set up Fab3. I set the environment variables required by Fab3 in this way: export FAB3_CONFIG=${GOPATH}/src/github.com/hyperledger/fabric-chaincode-evm/examples/first-network-sdk-config.yaml export FAB3_USER=User1 export FAB3_ORG=Org2 export FAB3_CHANNEL=mychannel export FAB3_CCID=evmcc export FAB3_PORT=5000 Then, I launch the command "make fab3" from the test-network folder, and finally I try to launch the proxy by running the following command: bin/fab3. Unfortunately, the command returns the error: Error: Failed to create Fabric SDK Channel Client: failed to create channel context: failed to get client context to create channel client: user not found I know that this is caused by the first-network-sdk-config.yaml file, but i don't understand what should i change in this file to make it work. I am using fabric-samples version 2.2 and fabric-chaincode-evm release 0.4. Thank you in advance!

Lando-Ant commented 1 year ago

This is my first-network-sdk-config.yaml file: version: 1.0.0

client:

organization: org1

logging: level: info

cryptoconfig: path: ${GOPATH}/src/github.com/hyperledger/fabric-samples/test-network/organizations/cryptogen/crypto-config

credentialStore:

path: "/tmp/state-store"

cryptoStore:

  path: /tmp/msp

BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256

tlsCerts:

systemCertPool: true

mychannel:

peers:
  peer0.org1.example.com:

    endorsingPeer: true

    chaincodeQuery: true

    ledgerQuery: true

    eventSource: true

  peer0.org2.example.com:

    endorsingPeer: true

    chaincodeQuery: true

    ledgerQuery: true

    eventSource: true

policies:

  queryChannelConfig:

    minResponses: 1

    maxTargets: 1

    retryOpts:

      attempts: 5

      initialBackoff: 500ms

      maxBackoff: 5s

      backoffFactor: 2.0

organizations: org1: mspid: Org1MSP

cryptoPath:  peerOrganizations/org1.example.com/users/User1@org1.example.com/msp

peers:
  - peer0.org1.example.com

certificateAuthorities:
  - ca.org1.example.com

org2: mspid: Org2MSP

cryptoPath:  peerOrganizations/org2.example.com/users/User1@org2.example.com/msp

peers:
  - peer0.org2.example.com

certificateAuthorities:
  - ca.org2.example.com

ordererorg:

  mspID: OrdererMSP

  cryptoPath: ordererOrganizations/example.com/users/Admin@example.com/msp

orderers: orderer.example.com: url: orderer.example.com:7050

grpcOptions:
  ssl-target-name-override: orderer.example.com

  keep-alive-time: 0s
  keep-alive-timeout: 20s
  keep-alive-permit: false
  fail-fast: false

  allow-insecure: false

tlsCACerts:

  path: ${GOPATH}/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem

peers: peer0.org1.example.com:

url: peer0.org1.example.com:7051

grpcOptions:
  ssl-target-name-override: peer0.org1.example.com

  keep-alive-time: 0s
  keep-alive-timeout: 20s
  keep-alive-permit: false
  fail-fast: false

  allow-insecure: false

tlsCACerts:

  path: ${GOPATH}/src/github.com/hyperledger/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem

peer0.org2.example.com: url: peer0.org2.example.com:9050 grpcOptions: ssl-target-name-override: peer0.org2.example.com

  keep-alive-time: 0s
  keep-alive-timeout: 20s
  keep-alive-permit: false
  fail-fast: false

  allow-insecure: false

tlsCACerts:
  path: ${GOPATH}/src/github.com/hyperledger/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem

entityMatchers: peer: