You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Open
umitkilic opened this issue
Nov 28, 2024
· 4 comments
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 [email protected]. 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/[email protected] @grpc/[email protected]
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.
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.
The text was updated successfully, but these errors were encountered:
I am writing this for those who will encounter this problem in the future. This solution led me to another problem but it does not give this error anymore. The problem is caused by the inability to isolate some files when working with more than one hyperledger fabric version. When I tracked the source of the error, I saw that the fabric-network folder in the node_modules folder caused this error. Because it is not used in Hyperledger Fabric v2.4 and later versions (https://www.npmjs.com/package/fabric-network) and Fabric Gateway needs to be used instead. If you delete the relevant folder or adjust your runtime environment accordingly, this problem will be solved.
@umitkilic If you install node modules globally then you will encounter issues if you then use the same node install to run caliper. This is why caliper advocates using npx with local installs of caliper and bindings so you don't store anything globally and in fact this is a better approach overall when using node. Caliper can drive 3 different fabric client sdks, and if it detects more than 1, which one should it use ? For benchmark runs you need to have a consistent setup to ensure benchmarks are comparable. The only time you want benchmarks from different bindings to compare is when comparing the performance of the SDKs themselves and they do perform differently.
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.
Please provide your benchmark configuration file content, if possible.
Please provide your network configuration file content, if possible.
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 typednpm 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.The text was updated successfully, but these errors were encountered: