【问题标题】:Getting error 4 when starting the hyperledger caliper benchmark启动 hyperledger caliper 基准测试时出现错误 4
【发布时间】:2021-01-07 02:07:01
【问题描述】:

我使用 hyperleger 结构创建了一个具有 3 个节点和一个 orderer 的功能网络,我可以在其中执行所有节点之间的通信,执行智能合约中的现有操作。该网络在节点之间没有 TLS 验证。加密材料在其中一个节点中创建并分布在网络中的其他节点中。 现在我正在尝试使用超级账本卡尺检查网络的性能。我创建了测试文件、网络文件和执行性能评估所需的其他文件,但是,我得到了错误 4 作为回报。 有人可以帮助我,我在这个问题上停留了几个星期,我不知道如何解决 它。

2021.01.07-01:58:10.942 info  [caliper] [cli-launch-manager]    Set workspace path: /home/ubuntu/caliper/monitor-benchmark
    2021.01.07-01:58:10.944 info  [caliper] [cli-launch-manager]    Set benchmark configuration path: /home/ubuntu/caliper/monitor-benchmark/config.yaml
    2021.01.07-01:58:10.944 info  [caliper] [cli-launch-manager]    Set network configuration path: /home/ubuntu/caliper/monitor-benchmark/net.yaml
    2021.01.07-01:58:10.944 info  [caliper] [cli-launch-manager]    Set SUT type: fabric
    2021.01.07-01:58:10.978 info  [caliper] [benchmark-validator]   No observer specified, will default to `none`
    2021.01.07-01:58:10.978 info  [caliper] [caliper-engine]    Starting benchmark flow
    2021.01.07-01:58:11.518 info  [caliper] [fabric-connector]  Initializing gateway connector compatible with installed SDK: 1.4.14
    2021.01.07-01:58:11.651 info  [caliper] [connectors/v1/fabric-gateway]  Creating new InMemoryWallets for organizations
    2021.01.07-01:58:11.664 info  [caliper] [caliper-engine]    Network configuration attribute "caliper.command.start" is not present, skipping start command
    2021.01.07-01:58:11.665 info  [caliper] [connectors/v1/fabric-gateway]  Fabric SDK version: 1.4.14; TLS: none
    2021-01-07T01:58:12.118Z - error: [FabricCAClientService.js]: Failed to enroll admin, error:%o message=Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 192.169.0.4:7054], stack=Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 192.169.0.4:7054]
        at ClientRequest.request.on (/home/ubuntu/caliper/monitor-benchmark/node_modules/fabric-ca-client/lib/FabricCAClient.js:487:12)
        at ClientRequest.emit (events.js:198:13)
        at Socket.socketErrorListener (_http_client.js:401:9)
        at Socket.emit (events.js:198:13)
        at emitErrorNT (internal/streams/destroy.js:91:8)
        at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
        at process._tickCallback (internal/process/next_tick.js:63:19)
    2021.01.07-01:58:12.119 error [caliper] [caliper-engine]    Error while performing "init" step: Error: Couldn't enroll Org1's registrar or set it as user context: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 192.169.0.4:7054]
    2021.01.07-01:58:12.120 info  [caliper] [caliper-engine]    Executed "init" step in 0.456 seconds
    2021.01.07-01:58:12.120 info  [caliper] [caliper-engine]    Network configuration attribute "caliper.command.end" is not present, skipping end command
    2021.01.07-01:58:12.120 error [caliper] [cli-launch-manager]    Benchmark failed with error code 4

如有必要,我会提供配置文件以帮助查找问题原因。

【问题讨论】:

  • 该错误是由于您对证书颁发机构的配置造成的,要么配置不正确,要么没有运行(查看 ECONNREFUSED 的含义)。在 caliper 中,您用于织物的 v1 连接器已弃用。您可能想查看hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/… 以使用目前仅需要显式提供身份的新连接器。

标签: hyperledger-fabric hyperledger-caliper


【解决方案1】:

从上面显示的错误来看,这似乎是一个凭据问题。

我建议升级到使用最新 (0.4.2) Caliper 版本中提供的 v2 结构连接器。它基于使用引用 Fabric Common Connection Profiles 的显式 caliper 配置文件。 Caliper 文档中有一个教程可以帮助您创建所需的资源,目前可在 https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/

访问

【讨论】:

  • 我能否将新版本的 caliper 0.4.2 与 Hyperledger Fabric 的 1.4.0 版本(即我正在运行的网络的当前版本)一起使用?
  • 我希望 node sdk 1.4.14(这是绑定到 caliper 中 1.4 sut 的当前版本)可以与结构 1.4.0 网络一起使用,但我不能肯定地说.
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-02-15
  • 1970-01-01
相关资源
最近更新 更多