-1

I created a functional network with 3 nodes and an orderer using the hyperleger fabric, in which I can carry out the communication between all nodes, executing existing operations in smart contracts. This network does not have TLS validation between nodes. The cryptographic material was created in one of the nodes and distributed among the other nodes in the network. Now I'm trying to check the performance of the network using the hyperledger caliper. I created the test file, the network file and the other files needed to perform the performance evaluation, however, I am getting Error 4 in return. Someone could help me, I am stuck on this problem for a few weeks and I don't see how to solve it.

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

If necessary, I make the configuration files available to help find the cause of the problem.

Volker
  • 40,468
  • 7
  • 81
  • 87
  • The error is due to your configuration of the Certificate Authority, either it's configured incorrectly or it's not running (look up the meaning of ECONNREFUSED). In caliper the v1 connectors you are using for fabric are deprecated. You might want to take a look at https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/ to use the new connectors which require explicit identity provision only currently. – david_k Jan 07 '21 at 11:05

1 Answers1

0

From the errors shown above, it looks like a credentials issue.

I would recommend moving up to using the v2 fabric connector that is present in the most recent (0.4.2) Caliper release. It is based on the use of an explicit caliper configuration file that references Fabric Common Connection Profiles. There is a tutorial present in the Caliper documentation that should help you create the required resources, currently accessible at https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/

nkl199
  • 21
  • 3
  • Could I use the new version of caliper 0.4.2 with version 1.4.0 of the hyperledger fabric, which is the current version of my network that is running? – Rodrigo Passos Jan 07 '21 at 18:53
  • I would hope that the node sdk 1.4.14 (which is the current version bound to the 1.4 sut in caliper) would work with a fabric 1.4.0 network, but I couldn't say for sure. – david_k Jan 07 '21 at 22:09