0

我正在尝试运行 Hyperleger Caliper,但出现以下错误:

基准执行期间出现意外错误:错误:Caliper 目前仅支持使用 2.1.0 Fabric-SDK 的基于网关的操作。请使用网关标志重试

ubuntu@IoT-Node-00:~/caliper-benchmarks$ npx caliper launch manager     --caliper-workspace .     --caliper-benchconfig benchmarks/scenario/simple/config.yaml     --caliper-networkconfig networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml
2021.08.08-17:31:08.227 info  [caliper] [cli-launch-manager]    Set workspace path: /home/ubuntu/caliper-benchmarks
2021.08.08-17:31:08.230 info  [caliper] [cli-launch-manager]    Set benchmark configuration path: /home/ubuntu/caliper-benchmarks/benchmarks/scenario/simple/config.yaml
2021.08.08-17:31:08.231 info  [caliper] [cli-launch-manager]    Set network configuration path: /home/ubuntu/caliper-benchmarks/networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml
2021.08.08-17:31:08.231 info  [caliper] [cli-launch-manager]    Set SUT type: fabric
2021.08.08-17:31:08.353 info  [caliper] [benchmark-validator]   No observer specified, will default to `none`
2021.08.08-17:31:08.354 info  [caliper] [caliper-engine]    Starting benchmark flow
2021.08.08-17:31:09.896 info  [caliper] [fabric-connector]  Initializing standard connector compatible with installed SDK: 2.1.0
2021.08.08-17:31:09.964 error [caliper] [cli-launch-manager]    Unexpected error during benchmark execution: Error: Caliper currently only supports gateway based operation using the 2.1.0 Fabric-SDK. Please retry with the gateway flag
Usage:
 caliper launch manager --caliper-bind-sut fabric:1.4 [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: Caliper currently only supports gateway based operation using the 2.1.0 Fabric-SDK. Please retry with the gateway flag
    at _loadAppropriateConnectorClass (/home/ubuntu/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:79:19)
    at CaliperEngine.connectorFactory [as adapterFactory] (/home/ubuntu/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:122:62)
    at CaliperEngine.run (/home/ubuntu/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/manager/caliper-engine.js:93:36)
    at Function.handler (/home/ubuntu/caliper-benchmarks/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js:62:43)
    at Object.module.exports.handler (/home/ubuntu/caliper-benchmarks/node_modules/@hyperledger/caliper-cli/lib/launch/launchManagerCommand.js:46:44)
    at Object.runCommand (/home/ubuntu/caliper-benchmarks/node_modules/yargs/lib/command.js:240:40)
    at Object.parseArgs [as _parseArgs] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1154:41)
    at Object.runCommand (/home/ubuntu/caliper-benchmarks/node_modules/yargs/lib/command.js:198:30)
    at Object.parseArgs [as _parseArgs] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1154:41)
    at Object.get [as argv] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1088:21)
4

1 回答 1

0

尝试运行以下命令,

npx caliper bind --caliper-bind-sut fabric:2.1

npx caliper launch manager --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml --caliper-flow-only-test --caliper-fabric-gateway-enabled
于 2021-08-09T05:37:12.807 回答