Skip to content

Error while performing "test" step: Error: Multiple bindings for fabric have been detected, you need to unbind one or more to ensure only a single bind is present to continue #1666

Description

@umitkilic

Which Caliper version are you using?

0.6.0

Which Node.JS version are you using?

v20.18.1

Which operating system are you using?

Ubuntu 22.04

Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how?

I was trying to run caliper on my HyperledgerFabric v3.0.0 network. I bind just fabric:2.4 with command but it always says there is a multiple bindings. What is the problem and solution?

What was the observed incorrect behavior?

Caliper says there is multiple bindings and benchmark execution failed with error code 6

Please provide the error logs and their surroundings.

2024.11.28-17:25:37.105 info  [caliper] [cli-launch-manager]    Binding specification is present, performing binding for "fabric:2.4"
2024.11.28-17:25:37.110 warn  [caliper] [bind]  Working directory is not specified. Current path: "/home/umit/Desktop/HLFv3_PHD_UK/benchmarking"
2024.11.28-17:25:37.111 info  [caliper] [bind]  Binding for fabric@2.4. This might take some time...
2024.11.28-17:25:37.111 info  [caliper] [bind]  Using working directory: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking
2024.11.28-17:25:37.112 info  [caliper] [bind]  Calling npm with: install @hyperledger/fabric-gateway@1.5.0 @grpc/grpc-js@1.10.3

up to date, audited 632 packages in 3s

19 packages are looking for funding
  run `npm fund` for details

48 vulnerabilities (4 low, 8 moderate, 15 high, 21 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
2024.11.28-17:25:41.036 info  [caliper] [cli-launch-manager]    Set workspace path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking
2024.11.28-17:25:41.037 info  [caliper] [cli-launch-manager]    Set benchmark configuration path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking/benchmarks/scenario/simple/fabcar/config.yaml
2024.11.28-17:25:41.037 info  [caliper] [cli-launch-manager]    Set network configuration path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking/networks/fabric/v2.1/network-config_2.1.yaml
2024.11.28-17:25:41.037 info  [caliper] [cli-launch-manager]    Set SUT type: fabric
2024.11.28-17:25:41.046 info  [caliper] [benchmark-validator]   No observer specified, will default to `none`
2024.11.28-17:25:41.046 info  [caliper] [caliper-engine]        Starting benchmark flow
2024.11.28-17:25:41.047 info  [caliper] [caliper-engine]        Skipping start commands due to benchmark flow conditioning
2024.11.28-17:25:41.047 info  [caliper] [caliper-engine]        Skipping initialization phase due to benchmark flow conditioning
2024.11.28-17:25:41.047 info  [caliper] [caliper-engine]        Skipping install smart contract phase due to benchmark flow conditioning
2024.11.28-17:25:42.610 error [caliper] [caliper-engine]        Error while performing "test" step: Error: Multiple bindings for fabric have been detected, you need to unbind one or more to ensure only a single bind is present to continue
    at _determineInstalledNodeSDKandVersion (/home/umit/Desktop/HLFv3_PHD_UK/benchmarking/node_modules/@hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:52:19)
    at CaliperEngine.connectorFactory [as adapterFactory] (/home/umit/Desktop/HLFv3_PHD_UK/benchmarking/node_modules/@hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:132:17)
    at CaliperEngine.run (/home/umit/Desktop/HLFv3_PHD_UK/benchmarking/node_modules/@hyperledger/caliper-core/lib/manager/caliper-engine.js:149:64)
    at LaunchManager.handler (/home/umit/Desktop/HLFv3_PHD_UK/benchmarking/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js:81:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024.11.28-17:25:42.610 info  [caliper] [caliper-engine]        Skipping end command due to benchmark flow conditioning
2024.11.28-17:25:42.610 error [caliper] [cli-launch-manager]    Benchmark execution failed with error code: 6
Usage:
 caliper launch manager --caliper-bind-sut fabric:2.2 [other options]

Options:
  --help, -h           Show usage information  [boolean]
  --version            Show version information  [boolean]
  --caliper-bind-sut   The name and version of the platform to bind to  [string]
  --caliper-bind-cwd   The working directory for performing the SDK install  [string]
  --caliper-bind-args  Additional arguments to pass to "npm install". Use the "=" notation when setting this parameter  [string]
  --caliper-bind-file  Yaml file to override default (supported) package versions when binding an SDK  [string]

Error: Benchmark execution failed with error code: 6
    at LaunchManager.handler (/home/umit/Desktop/HLFv3_PHD_UK/benchmarking/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js:89:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Please provide your benchmark configuration file content, if possible.

test:
  workers:
    type: local
    number: 1
  rounds:
    - label: Query all cars. 
      txDuration: 30  #transaction duration 
      rateControl:
          type: fixed-load
          opts:
            tps: 5 #with  of 5 TPS
      workload:
        module: benchmarks/scenario/simple/fabcar/queryAllCars.js
        arguments:
          assets: 10
          startKey: '1'
          endKey: '50'
    - label: Query a car.
      txDuration: 10
      rateControl:
          type: fixed-load
          opts:
            transactionLoad: 5
      workload:
        module: benchmarks/scenario/simple/fabcar/queryCar.js
        arguments:
          assets: 10
    - label: Create a car.
      txDuration: 30
      rateControl:
          type: fixed-load
          opts:
            transactionLoad: 5
      workload:
        module: benchmarks/scenario/simple/fabcar/createCar.js
monitors:
  resource:
  - module: docker
    options:
      interval: 5 
      containers:
      - all
    charting:
      bar:
        metrics: [Memory(avg), CPU%(avg)]
      polar:
        metrics: [all]
  - module: process
    options:
      interval: 3
      processes: [{ command: 'node', arguments: 'caliper', multiOutput: 'avg' }]
    charting:
      bar:
        metrics: [all]

Please provide your network configuration file content, if possible.

name: Fabric
version: "2.0.0"
mutual-tls:

caliper:
  blockchain: fabric

# info: #comment yapıldı.
#   Version: 2.2.4
#   Size: 2 Orgs with 2 Peer
#   Orderer: Raft
#   Distribution: Single Host
#   StateDB: CouchDB

clients:
  client0.org1.uk.com:
    client:
      organization: Org1
      credentialStore:
        path: /tmp/hfc-kvs/org1
        cryptoStore:
          path: /tmp/hfc-cvs/org1
      clientPrivateKey:
        path: ../crypto-material/peerOrganizations/org1.uk.com/users/User1@org1.uk.com/msp/keystore/priv_sk
      clientSignedCert:
        path: ../crypto-material/peerOrganizations/org1.uk.com/users/User1@org1.uk.com/msp/signcerts/User1@org1.uk.com-cert.pem

channels:
  ukchannel:
    created: true
    orderers:
    - orderer.uk.com
    peers:
      peer0.org1.uk.com:
        eventSource: true
      peer0.org2.uk.com:
       eventSource: true

    contracts:
    - id: fabcar
      version: "1"
      language: golang



organizations:
  Org1:
    mspid: Org1MSP
    peers:
      - peer0.org1.uk.com
    adminPrivateKey:
      path: ../crypto-material/peerOrganizations/org1.uk.com/users/Admin@org1.uk.com/msp/keystore/priv_sk
    signedCert:
      path: ../crypto-material/peerOrganizations/org1.uk.com/users/Admin@org1.uk.com/msp/signcerts/Admin@org1.uk.com-cert.pem

  Org2:
    mspid: Org2MSP
    peers:
      - peer0.org2.uk.com
    adminPrivateKey:
      path: ../crypto-material/peerOrganizations/org2.uk.com/users/Admin@org2.uk.com/msp/keystore/priv_sk
    signedCert:
      path: ../crypto-material/peerOrganizations/org2.uk.com/users/Admin@org2.uk.com/msp/signcerts/Admin@org2.uk.com-cert.pem

orderers:
  orderer0.uk.com:
    url: grpcs://localhost:7050
    grpcOptions:
      ssl-target-name-override: orderer0.uk.com
    tlsCACerts:
      path: ../crypto-material/ordererOrganizations/uk.com/orderers/orderer0.uk.com/tls/ca.crt
 

peers:
  peer0.org1.uk.com:
    url: grpcs://localhost:7051
    grpcOptions:
      ssl-target-name-override: peer0.org1.uk.com
      grpc.keepalive_time_ms: 600000
    tlsCACerts:
      path: ../crypto-material/peerOrganizations/org1.uk.com/peers/peer0.org1.uk.com/tls/ca.crt


  peer0.org2.uk.com:
    url: grpcs://localhost:8051
    grpcOptions:
      ssl-target-name-override: peer0.org2.uk.com
      grpc.keepalive_time_ms: 600000
    tlsCACerts:
      path: ../crypto-material/peerOrganizations/org2.uk.com/peers/peer0.org2.uk.com/tls/ca.crt

Please provide your workload module content, if possible.

No response

Please provide any additional information you deem relevant to the error.

Under node_modules folder, I have @hyperledger folder and under it, there are four folders (named caliper-cli, caliper-core, caliper-ethereum, caliper-fabric, fabric-gateway, and fabric-protos). The first four folders were downloaded after npm install command. The last two ones were downloaded after I typed npm install --save @hyperledger/fabric-gateway@^1.5.0

Maybe there is something that I overlooked, I unbinded all version by changing version number in caliper unbind --caliper-bind-sut fabric:X.X command. I tried binding only 2.4 but it does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions