0

我正在尝试使用 hyperledger caliper 对锯齿 1.0.0 进行基准测试,在运行启动主命令时出现以下错误:

Error: Benchmark failed with error code 6
    at Function.handler (/home/zee/Desktop/caliper-benchmarks/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchMaster.js:70:23)

命令的完整结果:

zee@pro:~/caliper-benchmarks$sudo npx caliper launch master --caliper-bind-sut sawtooth :1.0.0 -w . --caliper-benchconfig benchmarks/scenario/smallbank/config.yaml --caliper-networkconfig networks/sawtooth/smallbank/sawtooth.json

zee@pro:~/caliper-benchmarks$ sudo npx caliper launch master --caliper-bind-sut sawtooth:1.0.0 -w . --caliper-benchconfig benchmarks/scenario/smallbank/config.yaml --caliper-networkconfig networks/sawtooth/smallbank/sawtooth.json
    [sudo] password for zee: 
    2020.09.05-02:31:38.751 info  [caliper] [cli-launch-master]     Binding specification is present, performing binding for "sawtooth:1.0.0"
    2020.09.05-02:31:38.757 warn  [caliper] [bind]  Working directory not specified. Using "/home/zee/Desktop/caliper-benchmarks"
    2020.09.05-02:31:38.758 info  [caliper] [bind]  Binding for sawtooth@1.0.0. This might take some time...
    2020.09.05-02:31:38.758 info  [caliper] [bind]  Using working directory: /home/zee/Desktop/caliper-benchmarks
    2020.09.05-02:31:38.758 info  [caliper] [bind]  Calling npm with: install sawtooth-sdk@1.0.0
    + sawtooth-sdk@1.0.0
    updated 1 package and audited 450 packages in 21.476s

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

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
2020.09.05-02:32:08.925 info  [caliper] [cli-launch-master]     Set workspace path: /home/zee/Desktop/caliper-benchmarks
2020.09.05-02:32:08.926 info  [caliper] [cli-launch-master]     Set benchmark configuration path: /home/zee/Desktop/caliper-benchmarks/benchmarks/scenario/smallbank/config.yaml
2020.09.05-02:32:08.926 info  [caliper] [cli-launch-master]     Set network configuration path: /home/zee/Desktop/caliper-benchmarks/networks/sawtooth/smallbank/sawtooth.json
2020.09.05-02:32:08.926 info  [caliper] [cli-launch-master]     Set SUT type: sawtooth:1.0.0
2020.09.05-02:32:11.350 info  [caliper] [benchmark-validator]   No observer specified, will default to `none`
2020.09.05-02:32:11.350 info  [caliper] [caliper-engine]    Starting benchmark flow
2020.09.05-02:32:11.351 info  [caliper] [caliper-utils]     Executing command: cd ./; docker-compose -f networks/sawtooth/smallbank/sawtooth-smallbank-go.yaml up -d
Creating network "smallbank_default" with the default driver
Creating sawtooth-validator-default ... done
Creating sawtooth-rest-api-default        ... done
Creating sawtooth-settings-tp-default     ... done
Creating sawtooth-smallbank-tp-go-default ... done
2020.09.05-02:32:32.421 info  [caliper] [caliper-engine]    Executed start command in 21.07 seconds
2020.09.05-02:32:32.421 info  [caliper] [caliper-engine]    Executed "init" step in 0 seconds
2020.09.05-02:32:32.421 info  [caliper] [caliper-engine]    Executed "install" step in 0 seconds
2020.09.05-02:32:32.422 info  [caliper] [messenger.js]  Creating messenger of type "process-master" 
2020.09.05-02:32:32.724 info  [caliper] [null-observer]     Configured "null" observer
2020.09.05-02:32:32.725 error [caliper] [round-orchestrator]    Round 1 configuration validation error: Missing "callback" attribute
2020.09.05-02:32:32.726 error [caliper] [caliper-engine]    Error while performing "test" step: Error: Round 1 configuration validation error: Missing "callback" attribute
2020.09.05-02:32:32.726 info  [caliper] [caliper-utils]     Executing command: cd ./; docker-compose -f networks/sawtooth/smallbank/sawtooth-smallbank-go.yaml down;(test -z "$(docker ps -aq)") || docker rm $(docker ps -aq)
Stopping sawtooth-smallbank-tp-go-default ... done
Stopping sawtooth-settings-tp-default     ... done
Stopping sawtooth-rest-api-default        ... done
Stopping sawtooth-validator-default       ... done
Removing sawtooth-smallbank-tp-go-default ... done
Removing sawtooth-settings-tp-default     ... done
Removing sawtooth-rest-api-default        ... done
Removing sawtooth-validator-default       ... done
Removing network smallbank_default
2020.09.05-02:33:05.760 info  [caliper] [caliper-engine]    Executed end command in 33.034 seconds
2020.09.05-02:33:05.760 error [caliper] [cli-launch-master]     Benchmark failed with error code 6
Usage:
 caliper launch master --caliper-bind-sut fabric:1.4.1 [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 failed with error code 6
    at Function.handler (/home/zee/Desktop/caliper-benchmarks/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchMaster.js:70:23)

那里有什么问题?谢谢你的帮助。

4

1 回答 1

0

我认为这是一个版本问题。使用最新版本的卡尺。您收到此错误是因为您可能使用的是旧版本的卡尺。我使用最新版本的卡尺修复了它。

于 2020-09-25T04:00:46.287 回答