Code Monkey home page Code Monkey logo

caliper's Introduction

Hyperledger Caliper

CI codecov CII Best Practices license node (scoped) npm (scoped) npm Docker Pulls Discord.Chat Mailing list

Welcome to the Hyperledger Caliper project. Caliper is a blockchain performance benchmark framework, which allows users to test different blockchain solutions with predefined use cases, and get a set of performance test results.

Currently supported blockchain solutions:

Currently supported performance indicators:

  • Success rate
  • Transaction/Read throughput
  • Transaction/Read latency (minimum, maximum, average)
  • Resource consumption (CPU, Memory, Network IO, ...)

See the PSWG white paper to find out the definitions and corresponding measurement methods.

For more information on using Caliper, please consult the documentation site

Configuration and usage

See the related documentation page.

How to contact us

If you have any issues using Caliper that the documentation does not help you solve, please reach out to us through the following methods:

  • Discord Please feel free to contact us on Discord (instant messaging). We monitor the Caliper channels as closely as possible, but even if you don't have a problem that needs resolving, why not jump on and say hi ... we'd love to hear from you about your experiences and any new features you think we should work on.
  • Issues Feel free to raise an issue if you are facing a Caliper related problem

Caliper interacts with multiple blockchain technologies and consequently it might be an issue with the underlying blockchain technology being interacted with. You can seek specific help on these technologies on the same Discord server such as the Fabric or Besu channels.

How to contribute

We welcome contributions to the Caliper code base. Please see Contributing for more information.

License

Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.

caliper's People

Contributors

0xt3j4s avatar aklenik avatar benjamincburns avatar bistaastha avatar captainirs avatar clumsky avatar davidkel avatar feihujiang avatar fravlaca avatar houqinghui avatar jasonyou1995 avatar jiangyaoguo avatar justin-themedium avatar lucassaldanha avatar lynn14m avatar modood avatar mrubino-godaddy avatar nachikettapas avatar nklincoln avatar panyu4 avatar ram-srini avatar rosiemurphy0 avatar ryjones avatar scealiontach avatar shemnon avatar stinger112 avatar subhodi avatar vinayakjaas avatar viserius avatar vita-dounai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caliper's Issues

Handshake failed with fatal error SSL_ERROR_SSL when simple test for Fabric

I got below issue when run the simple Fabric test,please help.

npm test -- simple -c ./benchmark/simple/config.json -n ./benchmark/simple/fabric.json

[email protected] test /opt/hyperledger_fabric/fabric-v1.0.5/caliper
node ./scripts/test.js "simple" "-c" "./benchmark/simple/config.json" "-n" "./benchmark/simple/fabric.json"

TAP version 13

#######Caliper Test######

docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
Creating network "simplenetwork_default" with the default driver
Creating ca_peerOrg2 ...
Creating ca_peerOrg1 ...
Creating couchdb ...
Creating orderer.example.com ...
Creating ca_peerOrg2
Creating ca_peerOrg1
Creating couchdb
Creating orderer.example.com ... done
Creating peer0.org2.example.com ...
Creating peer0.org1.example.com ...
Creating peer1.org2.example.com ...
Creating peer0.org2.example.com
Creating peer0.org1.example.com
Creating peer0.org1.example.com ... done
Creating peer1.org1.example.com ...
Creating peer1.org1.example.com ... done

create mychannel......

E0411 11:32:38.796494897 25025 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: Connect Failed\n at createStatusError (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._readsDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:236:8)\n at readCallback (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:296:12)"
not ok 1 Failed to create channels Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/fabric-client/lib/Orderer.js:136:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:271:12) at ClientDuplexStream._readsDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:236:8) at readCallback (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:296:12)

operator: fail
at: channels.reduce.then.then.catch (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/src/fabric/create-channel.js:155:15)
stack: |-
  Error: Failed to create channels Error: SERVICE_UNAVAILABLE
      at ClientDuplexStream.<anonymous> (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/fabric-client/lib/Orderer.js:136:21)
      at emitOne (events.js:96:13)
      at ClientDuplexStream.emit (events.js:188:7)
      at ClientDuplexStream._emitStatusIfDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:271:12)
      at ClientDuplexStream._readsDone (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:236:8)
      at readCallback (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/grpc/src/client.js:296:12)
      at Test.assert [as _assert] (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/tape/lib/test.js:225:54)
      at Test.bound [as _assert] (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/tape/lib/test.js:77:32)
      at Test.fail (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/tape/lib/test.js:318:10)
      at Test.bound [as fail] (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/node_modules/tape/lib/test.js:77:32)
      at channels.reduce.then.then.catch (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/src/fabric/create-channel.js:155:15)
      at process._tickCallback (internal/process/next_tick.js:103:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/src/fabric/create-channel.js:156:27)
at process._tickCallback (internal/process/next_tick.js:103:7)
unexpected error, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/opt/hyperledger_fabric/fabric-v1.0.5/caliper/src/fabric/create-channel.js:156:27)
at process._tickCallback (internal/process/next_tick.js:103:7)
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq)
Stopping peer1.org1.example.com ...
Stopping peer1.org1.example.com ... done
Stopping peer1.org2.example.com ... done
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping orderer.example.com ... done
Stopping couchdb ... done
Stopping ca_peerOrg2 ...
E0411 11:32:39.796510227 25025 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0411 11:32:41.194671411 25025 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
Stopping ca_peerOrg1 ... done
Stopping ca_peerOrg2 ... done
Removing peer1.org1.example.com ...
Removing peer1.org2.example.com ...
Removing peer1.org1.example.com ... done
Removing peer1.org2.example.com ... done
Removing orderer.example.com ...
Removing peer0.org2.example.com ... done
Removing couchdb ... done
Removing ca_peerOrg2 ...
Removing ca_peerOrg2 ... done
E0411 11:33:02.541948291 25025 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
Removing network simplenetwork_default
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers

1..1

tests 1

pass 0

fail 1

Rejecting broadcast of message from 172.20.0.1:51068 with SERVICE_UNAVAILABLE:

guolidong:/opt/gopath/src/github.com/hyperledger/caliper$ node benchmark/simple/main.js -c config-fabric-kafka.json -n fabric-kafka.json
TAP version 13

#######Caliper Test######

docker-compose -f network/fabric/kafka/docker-compose.yaml up -d
Creating ca_peerOrg2 ... done
Creating zookeeper2 ... done
Creating zookeeper1 ... done
Creating ca_peerOrg1 ... done
Creating kafka_ca_1 ... done
Creating zookeeper0 ... done
Creating kafka0 ... done
Creating kafka2 ... done
Creating kafka1 ... done
Creating kafka3 ... done
Creating orderer.example.com ... done
Creating peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer1.org1.example.com ... done
Creating peer0.org2.example.com ... done

create mychannel......

not ok 1 Failed to create channels Error: create status is SERVICE_UNAVAILABLE at channel.organizations.reduce.then.then.then (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:146:43) at at process._tickCallback (internal/process/next_tick.js:188:7)

operator: fail
at: channels.reduce.then.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:160:19)
stack: |-
  Error: Failed to create channels Error: create status is SERVICE_UNAVAILABLE
      at channel.organizations.reduce.then.then.then (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:146:43)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)
      at Test.assert [as _assert] (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
      at Test.bound [as _assert] (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
      at Test.fail (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
      at Test.bound [as fail] (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
      at channels.reduce.then.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:160:19)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:161:31)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/opt/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/opt/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/comm/bench-flow.js:347:18)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...

1..2

tests 2

pass 0

fail 2

guolidong:/opt/gopath/src/github.com/hyperledger/caliper$
guolidong:/opt/gopath/src/github.com/hyperledger/caliper$
guolidong:/opt/gopath/src/github.com/hyperledger/caliper$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae73b773cb8a hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 7 seconds ago Up 8 seconds 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com
30585812b9aa hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 7 seconds ago Up 8 seconds 0.0.0.0:8057->7051/tcp, 0.0.0.0:8059->7053/tcp peer1.org2.example.com
c96a34a8d5b2 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 7 seconds ago Up 7 seconds 0.0.0.0:7057->7051/tcp, 0.0.0.0:7059->7053/tcp peer1.org1.example.com
1e6e84cc6d24 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 7 seconds ago Up 8 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
ddfb6e1ca2a2 hyperledger/fabric-orderer:x86_64-1.1.0 "sh -c 'ln -snf /usr…" 8 seconds ago Up 9 seconds 0.0.0.0:7050->7050/tcp orderer.example.com
54baca95c792 hyperledger/fabric-kafka:x86_64-0.4.6 "/docker-entrypoint.…" 10 seconds ago Up 11 seconds 9093/tcp, 0.0.0.0:32818->9092/tcp kafka1
aa4fb4832103 hyperledger/fabric-kafka:x86_64-0.4.6 "/docker-entrypoint.…" 10 seconds ago Up 11 seconds 9093/tcp, 0.0.0.0:32819->9092/tcp kafka3
7ffb9ae6b731 hyperledger/fabric-kafka:x86_64-0.4.6 "/docker-entrypoint.…" 10 seconds ago Up 10 seconds 9093/tcp, 0.0.0.0:32817->9092/tcp kafka2
b51d01ee9ea3 hyperledger/fabric-kafka:x86_64-0.4.6 "/docker-entrypoint.…" 10 seconds ago Up 11 seconds 9093/tcp, 0.0.0.0:32816->9092/tcp kafka0
aaebe3094b2c hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 12 seconds ago Up 14 seconds 7054/tcp kafka_ca_1
d0d8faa266cb hyperledger/fabric-zookeeper:x86_64-0.4.6 "/docker-entrypoint.…" 12 seconds ago Up 12 seconds 0.0.0.0:32815->2181/tcp, 0.0.0.0:32813->2888/tcp, 0.0.0.0:32810->3888/tcp zookeeper0
92a8eb907d87 hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 12 seconds ago Up 12 seconds 0.0.0.0:7054->7054/tcp ca_peerOrg1
92de8fa0243f hyperledger/fabric-zookeeper:x86_64-0.4.6 "/docker-entrypoint.…" 12 seconds ago Up 12 seconds 0.0.0.0:32814->2181/tcp, 0.0.0.0:32812->2888/tcp, 0.0.0.0:32809->3888/tcp zookeeper2
0b9abb4a6ea7 hyperledger/fabric-zookeeper:x86_64-0.4.6 "/docker-entrypoint.…" 12 seconds ago Up 14 seconds 0.0.0.0:32811->2181/tcp, 0.0.0.0:32808->2888/tcp, 0.0.0.0:32807->3888/tcp zookeeper1
2dce9cd07c4d hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 12 seconds ago Up 13 seconds 0.0.0.0:8054->7054/tcp ca_peerOrg2
guolidong:/opt/gopath/src/github.com/hyperledger/caliper$ docker logs orderer.example.com
2018-06-15 20:35:37.553 CST [orderer/common/server] prettyPrintStruct -> INFO 001 Orderer config values:
General.LedgerType = "file"
General.ListenAddress = "0.0.0.0"
General.ListenPort = 7050
General.TLS.Enabled = true
General.TLS.PrivateKey = "/etc/hyperledger/msp/orderer/tls/server.key"
General.TLS.Certificate = "/etc/hyperledger/msp/orderer/tls/server.crt"
General.TLS.RootCAs = [/etc/hyperledger/msp/orderer/tls/ca.crt /etc/hyperledger/msp/peerOrg1/tls/ca.crt /etc/hyperledger/msp/peerOrg2/tls/ca.crt]
General.TLS.ClientAuthRequired = false
General.TLS.ClientRootCAs = []
General.Keepalive.ServerMinInterval = 1m0s
General.Keepalive.ServerInterval = 2h0m0s
General.Keepalive.ServerTimeout = 20s
General.GenesisMethod = "file"
General.GenesisProfile = "SampleInsecureSolo"
General.SystemChannel = "testchainid"
General.GenesisFile = "/etc/hyperledger/configtx/twoorgs.genesis.block"
General.Profile.Enabled = false
General.Profile.Address = "0.0.0.0:6060"
General.LogLevel = "info"
General.LogFormat = "%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}"
General.LocalMSPDir = "/etc/hyperledger/msp/orderer/msp"
General.LocalMSPID = "OrdererMSP"
General.BCCSP.ProviderName = "SW"
General.BCCSP.SwOpts.SecLevel = 256
General.BCCSP.SwOpts.HashFamily = "SHA2"
General.BCCSP.SwOpts.Ephemeral = false
General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/etc/hyperledger/msp/orderer/msp/keystore"
General.BCCSP.SwOpts.DummyKeystore =
General.BCCSP.PluginOpts =
General.BCCSP.Pkcs11Opts =
General.Authentication.TimeWindow = 15m0s
FileLedger.Location = "/var/hyperledger/production/orderer"
FileLedger.Prefix = "hyperledger-fabric-ordererledger"
RAMLedger.HistorySize = 1000
Kafka.Retry.ShortInterval = 5s
Kafka.Retry.ShortTotal = 10m0s
Kafka.Retry.LongInterval = 5m0s
Kafka.Retry.LongTotal = 12h0m0s
Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
Kafka.Retry.Metadata.RetryMax = 3
Kafka.Retry.Metadata.RetryBackoff = 250ms
Kafka.Retry.Producer.RetryMax = 3
Kafka.Retry.Producer.RetryBackoff = 100ms
Kafka.Retry.Consumer.RetryBackoff = 2s
Kafka.Verbose = false
Kafka.Version = 0.10.2.0
Kafka.TLS.Enabled = false
Kafka.TLS.PrivateKey = ""
Kafka.TLS.Certificate = ""
Kafka.TLS.RootCAs = []
Kafka.TLS.ClientAuthRequired = false
Kafka.TLS.ClientRootCAs = []
Debug.BroadcastTraceDir = ""
Debug.DeliverTraceDir = ""
2018-06-15 20:35:37.570 CST [orderer/common/server] initializeServerConfig -> INFO 002 Starting orderer with TLS enabled
2018-06-15 20:35:37.596 CST [fsblkstorage] newBlockfileMgr -> INFO 003 Getting block information from block storage
2018-06-15 20:35:37.609 CST [orderer/consensus/kafka] newChain -> INFO 004 [channel: testchainid] Starting chain with last persisted offset -3 and last recorded block 0
2018-06-15 20:35:37.616 CST [orderer/commmon/multichannel] NewRegistrar -> INFO 005 Starting system channel 'testchainid' with genesis block hash 23705eeb5f884bf067ce8c1a561c06eae4d4d7556880b517b1bc9ef02e87ccf4 and orderer type kafka
2018-06-15 20:35:37.617 CST [orderer/common/server] Start -> INFO 006 Starting orderer:
Version: 1.1.0
Go version: go1.9.2
OS/Arch: linux/amd64
Experimental features: false
2018-06-15 20:35:37.617 CST [orderer/consensus/kafka] setupProducerForChannel -> INFO 008 [channel: testchainid] Setting up the producer for this channel...
2018-06-15 20:35:37.617 CST [orderer/common/server] Start -> INFO 007 Beginning to serve requests
2018-06-15 20:35:40.005 CST [orderer/common/broadcast] Handle -> WARN 009 [channel: mychannel] Rejecting broadcast of message from 172.20.0.1:51068 with SERVICE_UNAVAILABLE: rejected by Consenter: will not enqueue, consenter for this channel hasn't started yet
2018-06-15 20:35:43.399 CST [orderer/consensus/kafka] startThread -> INFO 00a [channel: testchainid] Producer set up successfully
2018-06-15 20:35:43.399 CST [orderer/consensus/kafka] sendConnectMessage -> INFO 00b [channel: testchainid] About to post the CONNECT message...
2018-06-15 20:35:43.916 CST [orderer/consensus/kafka] startThread -> INFO 00c [channel: testchainid] CONNECT message posted successfully
2018-06-15 20:35:43.916 CST [orderer/consensus/kafka] setupParentConsumerForChannel -> INFO 00d [channel: testchainid] Setting up the parent consumer for this channel...
2018-06-15 20:35:43.920 CST [orderer/consensus/kafka] startThread -> INFO 00e [channel: testchainid] Parent consumer set up successfully
2018-06-15 20:35:43.920 CST [orderer/consensus/kafka] setupChannelConsumerForChannel -> INFO 00f [channel: testchainid] Setting up the channel consumer for this channel (start offset: -2)...
2018-06-15 20:35:43.931 CST [orderer/consensus/kafka] startThread -> INFO 010 [channel: testchainid] Channel consumer set up successfully
2018-06-15 20:35:43.931 CST [orderer/consensus/kafka] startThread -> INFO 011 [channel: testchainid] Start phase completed successfully
guolidong:/opt/gopath/src/github.com/hyperledger/caliper$

npm ERR! Failed at the [email protected] install script.

root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node -v
v8.11.2
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# npm install -g
npm WARN notice [SECURITY] protobufjs has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=protobufjs&version=5.0.3 - Run npm i npm@latest -g to upgrade your npm version, and then npm audit to get more info.
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node-pre-gyp install --fallback-to-build --library=static_library /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc

  • [email protected]
    added 303 packages in 30.423s
    root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# ls
    benchmark CONTRIBUTING.md docs LICENSE network node_modules package.json README.md scripts src test
    root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# npm install [email protected] [email protected]

[email protected] install /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider
node-gyp rebuild || node suppress-error.js

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs', '/usr/bin/node-gyp', 'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 4.2.6
gyp verb build dir attempting to create "build" dir: /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider/build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
sh: 1: node: Permission denied

[email protected] install /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js
node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs', '/usr/bin/node-gyp', 'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 4.2.6
gyp verb build dir attempting to create "build" dir: /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js/build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild || node suppress-error.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-29T02_28_37_750Z-debug.log
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node -v
v8.11.2
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper#

Cannot deploy non-sample Composer networks

Steps to reproduce:

  1. I create an empty business network via the Hyperledger Composer playground and name it my-test-network. I leave everything default, but I add one participant type to my model. I download the .bna file, extract it, and put the resulting files in caliper/src/contract/composer/my-test-network
  2. I add the following to the caliper package.json:
    "composer-admin": "0.19.0",
    "composer-client": "0.19.0",
    "composer-common": "0.19.0",
    "fabric-ca-client": "1.1.0",
    "fabric-client": "1.1.0"

and run npm install.

  1. I add a modified test file to caliper/benchmark/composer/my-test-network/testing.js
  2. Inside of caliper/benchmark/composer/config-composer.json I modify rounds and update the label fields to the name of my network, my-test-network. I update the callback fields to be benchmark/composer/my-test-network/testing.js
  3. Inside of caliper/network/fabric-v11/2-org-1-peer/composer.json I modify composer.chaincodes and change id to be my-test-network. I leave the version to be 0.1.0, the same version that is in my network's package.json
  4. I change my working directory to be caliper/benchmark/composer and I run node main.js:
✓ Creating channels mychannel
✓ Attempting to join peer peer0.org1.example.com to channel mychannel (attempt 1/5)
✓ Attempting to join peer peer0.org2.example.com to channel mychannel (attempt 1/5)
Deploying Composer
✓ Performing Composer runtime install for network my-test-network with card PerfPeerAdmin@Org1
✓ Performing Composer runtime install for network my-test-network with card PerfPeerAdmin@Org2
Starting business network my-test-network. This involves building chaincode containers and may take several minutes to complete...

The application gets stuck at this stage until it times out.

Starting business network my-test-network. This involves building chaincode containers and may take several minutes to complete...
composer.installSmartContract() failed,  Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: timeout expired while starting chaincode my-test-network:0.1.0(networkid:dev,peerid:peer0.org1.example.com,tx:cf9a6b55e448683d7e0ce89fd7834b704c2f72a2959bc1bc03552dcb92b84854)
Response from attempted peer comms was an error: Error: 2 UNKNOWN: timeout expired while starting chaincode my-test-network:0.1.0(networkid:dev,peerid:peer0.org2.example.com,tx:cf9a6b55e448683d7e0ce89fd7834b704c2f72a2959bc1bc03552dcb92b84854)

The peer logs are not much more enlightening, displays only the same errors. I can test basic-sample-network with seemingly no problems.

This could be a problem with composer or my configs, but composer-cli seems to have no problem with composer network install/composer network start

Why debug make error ,while run is ok?

# ##### testing 'open' ######
----test round 0----
Starting inspector on 127.0.0.1:53951 failed: address already in use
Starting inspector on 127.0.0.1:53951 failed: address already in use
Starting inspector on 127.0.0.1:53951 failed: address already in use
Client exited
Client exited
Starting inspector on 127.0.0.1:53951 failed: address already in use
Starting inspector on 127.0.0.1:53951 failed: address already in use
started monitor successfully
Client exited
Client exited
Client exited
###test result:###
+------+------+------+-----------+-------------+-------------+-------------+----------------+------------+
| Name | Succ | Fail | Send Rate | Max Latency | Min Latency | Avg Latency | 75%ile Latency | Throughput |
+------+------+------+-----------+-------------+-------------+-------------+----------------+------------+

### resource stats ###
+---------+-----------------------------------+-------------+-------------+----------+----------+------------+-------------+
| TYPE    | NAME                              | Memory(max) | Memory(avg) | CPU(max) | CPU(avg) | Traffic In | Traffic Out |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Process | node local-client.js(avg)         | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | dev-peer1.org2.example.co...le-v0 | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | dev-peer1.org1.example.co...le-v0 | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | dev-peer0.org2.example.co...le-v0 | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | dev-peer0.org1.example.co...le-v0 | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | peer1.org1.example.com            | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | peer0.org1.example.com            | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | peer0.org2.example.com            | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | peer1.org2.example.com            | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | couchdb                           | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | orderer.example.com               | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | ca_peerOrg2                       | -           | -           | NaN%     | NaN%     | -          | -           |
|---------|-----------------------------------|-------------|-------------|----------|----------|------------|-------------|
| Docker  | ca_peerOrg1                       | -           | -           | NaN%     | NaN%     | -          | -           |
+---------+-----------------------------------+-------------+-------------+----------+----------+------------+-------------+

ok 5 passed 'open' testing
wait 5 seconds for next round...
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
# ##### testing 'query' ######
----test round 1----
not ok 6 failed 'query' testing, Error: Client encountered unexpected error at ChildProcess.<anonymous> (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client-util.js:71:32) at emitOne (events.js:116:13) at ChildProcess.emit (events.js:211:7) at ChildProcess.target.send (internal/child_process.js:592:12) at Object.startTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client-util.js:125:24) at Client._startLocalTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client.js:146:27) at Client.startTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client.js:80:26) at prev.then (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/bench-flow.js:256:31) at <anonymous>
  ---
    operator: fail
    at: client.startTest.then.then.catch (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/bench-flow.js:275:23)
    stack: |-
      Error: failed 'query' testing, Error: Client encountered unexpected error
          at ChildProcess.<anonymous> (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client-util.js:71:32)
          at emitOne (events.js:116:13)
          at ChildProcess.emit (events.js:211:7)
          at ChildProcess.target.send (internal/child_process.js:592:12)
          at Object.startTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client-util.js:125:24)
          at Client._startLocalTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client.js:146:27)
          at Client.startTest (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/client/client.js:80:26)
          at prev.then (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/bench-flow.js:256:31)
          at <anonymous>
          at Test.assert [as _assert] (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/node_modules/tape/lib/test.js:225:54)
          at Test.bound [as _assert] (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/node_modules/tape/lib/test.js:77:32)
          at Test.fail (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/node_modules/tape/lib/test.js:318:10)
          at Test.bound [as fail] (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/node_modules/tape/lib/test.js:77:32)
          at client.startTest.then.then.catch (/Users/friends/Documents/VirtualMachine/share/projects/Official_Examples/caliper/src/comm/bench-flow.js:275:23)
          at <anonymous>
  ...
----------finished test----------

BAD_REQUEST when creating channel, orderer.js

Hi,

I'm trying to start the Fabric benchmark, but it all stops when its trying to create the channels.

This is my command + output.

sudo node benchmark/simple/main.js
TAP version 13

#######Caliper Test######

docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
simplenetwork_ca_1 is up-to-date
orderer.example.com is up-to-date
ca_peerOrg1 is up-to-date
ca_peerOrg2 is up-to-date
Starting simplenetwork_peer_1 ...
peer1.org1.example.com is up-to-date
peer1.org2.example.com is up-to-date
peer0.org2.example.com is up-to-date
Starting simplenetwork_peer_1 ... done

create mychannel......

error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST
not ok 1 Failed to create channels Error: BAD_REQUEST at ClientDuplexStream. (/home/thesis/Downloads/caliper-master/node_modules/fabric-client/lib/Orderer.js:116:21) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) at readCallback (/home/thesis/Downloads/caliper-master/node_modules/grpc/src/client.js:312:14)

operator: fail
at: channels.reduce.then.then.catch (/home/thesis/Downloads/caliper-master/src/fabric/create-channel.js:160:19)
stack: |-
  Error: Failed to create channels Error: BAD_REQUEST
      at ClientDuplexStream.<anonymous> (/home/thesis/Downloads/caliper-master/node_modules/fabric-client/lib/Orderer.js:116:21)
      at emitOne (events.js:116:13)
      at ClientDuplexStream.emit (events.js:211:7)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at ClientDuplexStream.Readable.push (_stream_readable.js:208:10)
      at readCallback (/home/thesis/Downloads/caliper-master/node_modules/grpc/src/client.js:312:14)
      at Test.assert [as _assert] (/home/thesis/Downloads/caliper-master/node_modules/tape/lib/test.js:224:54)
      at Test.bound [as _assert] (/home/thesis/Downloads/caliper-master/node_modules/tape/lib/test.js:76:32)
      at Test.fail (/home/thesis/Downloads/caliper-master/node_modules/tape/lib/test.js:317:10)
      at Test.bound [as fail] (/home/thesis/Downloads/caliper-master/node_modules/tape/lib/test.js:76:32)
      at channels.reduce.then.then.catch (/home/thesis/Downloads/caliper-master/src/fabric/create-channel.js:160:19)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/home/thesis/Downloads/caliper-master/src/fabric/create-channel.js:161:31)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/home/thesis/Downloads/caliper-master/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/home/thesis/Downloads/caliper-master/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/home/thesis/Downloads/caliper-master/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/home/thesis/Downloads/caliper-master/src/comm/bench-flow.js:347:18)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...

1..2

tests 2

pass 0

fail 2

TypeError: testFn is not a function

guolidong:~/Documents/GitHub/caliper$ sudo node benchmark/simple/main.js -c config-fabric.json -n fabric.json
Password:
TAP version 13

(anonymous)

not ok 1 TypeError: testFn is not a function

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: testFn is not a function]
at: Test.onetime [as end] (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: testFn is not a function
      at Test.<anonymous> (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape-promise/index.es5.js:21:13)
      at Test.bound [as _cb] (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape/lib/test.js:77:32)
      at Test.run (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape/lib/test.js:96:10)
      at Test.bound [as run] (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape/lib/test.js:77:32)
      at Immediate.next (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape/lib/results.js:71:15)
      at runCallback (timers.js:789:20)
      at tryOnImmediate (timers.js:751:5)
      at processImmediate [as _immediateCallback] (timers.js:722:5)

...

1..1

tests 1

pass 0

fail 1

Failed to create channels Error: create status is BAD_REQUEST

root@vm10-210-0-10:~/caliper# node benchmark/simple/main.js -c config-fabric.json -n fabric.json
TAP version 13

#######Caliper Test######

docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
ca_peerOrg1 is up-to-date
orderer.example.com is up-to-date
couchdb is up-to-date
ca_peerOrg2 is up-to-date
peer0.org2.example.com is up-to-date
peer1.org2.example.com is up-to-date
peer0.org1.example.com is up-to-date
peer1.org1.example.com is up-to-date

create mychannel......

not ok 1 Failed to create channels Error: create status is BAD_REQUEST at channel.organizations.reduce.then.then.then (/root/caliper/src/fabric/create-channel.js:146:43) at at process._tickCallback (internal/process/next_tick.js:188:7)

operator: fail
at: channels.reduce.then.then.catch (/root/caliper/src/fabric/create-channel.js:160:19)
stack: |-
  Error: Failed to create channels Error: create status is BAD_REQUEST
      at channel.organizations.reduce.then.then.then (/root/caliper/src/fabric/create-channel.js:146:43)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)
      at Test.assert [as _assert] (/root/caliper/node_modules/tape/lib/test.js:225:54)
      at Test.bound [as _assert] (/root/caliper/node_modules/tape/lib/test.js:77:32)
      at Test.fail (/root/caliper/node_modules/tape/lib/test.js:318:10)
      at Test.bound [as fail] (/root/caliper/node_modules/tape/lib/test.js:77:32)
      at channels.reduce.then.then.catch (/root/caliper/src/fabric/create-channel.js:160:19)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/root/caliper/src/fabric/create-channel.js:161:31)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/root/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/root/caliper/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/root/caliper/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/root/caliper/src/comm/bench-flow.js:347:18)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

...

1..2

tests 2

pass 0

fail 2

root@vm10-210-0-10:~/caliper#

[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0

Client 29744: error Error: could not find context's information in config file
at Fabric.getContext (/home/ubuntu/caliper/src/fabric/fabric.js:84:35)
at Blockchain.getContext (/home/ubuntu/caliper/src/comm/blockchain.js:87:27)
at doTest (/home/ubuntu/caliper/src/comm/client/local-client.js:164:23)
at process. (/home/ubuntu/caliper/src/comm/client/local-client.js:218:17)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:29744) UnhandledPromiseRejectionWarning: Error: could not find context's information in config file
at Fabric.getContext (/home/ubuntu/caliper/src/fabric/fabric.js:84:35)
at Blockchain.getContext (/home/ubuntu/caliper/src/comm/blockchain.js:87:27)
at doTest (/home/ubuntu/caliper/src/comm/client/local-client.js:164:23)
at process. (/home/ubuntu/caliper/src/comm/client/local-client.js:218:17)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:29744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:29744) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0

Two Network Directories for Fabric

There are two directories for Fabric: network/fabric and network/fabric-v11.

I would like to know intentions of each directory.
fabric is for Fabric v1.0 only? (but I can use fabric/simplenetwork with Fabric v1.1)

ACTIVATION_REQUIRED while testing composer networks

While testing composer basic-sample-network, getting this error at peer:
[mychannel][aa9c533b] failed to invoke chaincode name:"basic-sample-network" , error: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier '01899e04161a3a6d64670504fa122e55818295352929b6a616333a3739fde3f2', must be activated (ACTIVATION_REQUIRED)

Unable to test `basic-sample-network` or anything

I wish to check the Composer's performance using Caliper on basic-sample-network project. I have already installed

 "composer-admin": "0.19.0",
 "composer-client": "0.19.0",
 "composer-common": "0.19.0",
 "fabric-ca-client": "1.1.0",
 "fabric-client": "1.1.0",

and ran npm install to the root folder. I am getting the error below.

$ node benchmark/composer/main.js
TAP version 13
# #######Caliper Test######
Creating orderer.example.com ... done
Creating network "2org1peer_default" with the default driver
Creating peer0.org1.example.com ... done
Creating ca.org2.example.com ...
Creating couchdb.org2.example.com ...
Creating ca.org1.example.com ...
Creating orderer.example.com ...
Creating peer0.org2.example.com ...
Creating peer0.org1.example.com ...
Initializing target platform configuration
✔ Creating channels mychannel
✔ Attempting to join peer peer0.org1.example.com to channel mychannel (attempt 2/5)
✔ Attempting to join peer peer0.org2.example.com to channel mychannel (attempt 1/5)
Deploying Composer
✔ Performing Composer runtime install for network basic-sample-network with card PerfPeerAdmin@Org1
⠋ Performing Composer runtime install for network basic-sample-network with card PerfPeerAdmin@Org2Composer runtime install failed, Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: access denied: channel [] creator org [Org2MSP]
    at HLFConnection.install (/Users/jahm/Documents/JavaScript/caliper/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:515:30)
    at <anonymous>
✖ Performing Composer runtime install for network basic-sample-network with card PerfPeerAdmin@Org2
composer.installSmartContract() failed,  Error: Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: access denied: channel [] creator org [Org2MSP]
    at Object.runtimeInstall (/Users/jahm/Documents/JavaScript/caliper/src/composer/composer_utils.js:380:15)
    at <anonymous>                        
unexpected error, Error: Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: access denied: channel [] creator org [Org2MSP]
    at Object.runtimeInstall (/Users/jahm/Documents/JavaScript/caliper/src/composer/composer_utils.js:380:15)
    at <anonymous>
docker-compose -f network/fabric-v11/2-org-1-peer/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev-* -q)
Stopping peer0.org2.example.com   ... done
Stopping peer0.org1.example.com   ... done
Stopping orderer.example.com      ... done
Stopping ca.org1.example.com      ... done
Stopping couchdb.org2.example.com ... done
Stopping ca.org2.example.com      ... done
Stopping couchdb.org1.example.com ... done
Removing peer0.org2.example.com   ... done
Removing peer0.org1.example.com   ... done
Removing orderer.example.com      ... done
Removing ca.org1.example.com      ... done
Removing couchdb.org2.example.com ... done
Removing ca.org2.example.com      ... done
Removing couchdb.org1.example.com ... done
Removing network 2org1peer_default
"docker rm" requires at least 1 argument.
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...] [flags]

Remove one or more containers
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.

Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...] [flags]

Remove one or more images

1..0
# tests 0
# pass  0

# ok

Any help is greatly appreciated.

failed 'open' testing, Error: Client encountered unexpected error

When I was in the directory caliper,execute the following command:

node benchmark/simple/main.js

reported the following error information:

not ok 6 failed 'open' testing, Error: Client encountered unexpected error at ChildProcess. (/root/caliper/src/comm/client/client-util.js:81:32) at emitOne (events.js:116:13) at ChildProcess.emit (events.js:211:7) at ChildProcess.target.send (internal/child_process.js:592:12) at Object.startTest (/root/caliper/src/comm/client/client-util.js:146:24) at Client._startLocalTest (/root/caliper/src/comm/client/client.js:223:27) at Client.startTest (/root/caliper/src/comm/client/client.js:146:22) at prev.then (/root/caliper/src/comm/bench-flow.js:238:31) at


operator: fail
at: client.startTest.then.then.catch (/root/caliper/src/comm/bench-flow.js:254:23)
stack: |-
  Error: failed 'open' testing, Error: Client encountered unexpected error
      at ChildProcess.<anonymous> (/root/caliper/src/comm/client/client-util.js:81:32)
      at emitOne (events.js:116:13)
      at ChildProcess.emit (events.js:211:7)
      at ChildProcess.target.send (internal/child_process.js:592:12)
      at Object.startTest (/root/caliper/src/comm/client/client-util.js:146:24)
      at Client._startLocalTest (/root/caliper/src/comm/client/client.js:223:27)
      at Client.startTest (/root/caliper/src/comm/client/client.js:146:22)
      at prev.then (/root/caliper/src/comm/bench-flow.js:238:31)
      at <anonymous>
      at Test.assert [as _assert] (/root/caliper/node_modules/tape/lib/test.js:225:54)
      at Test.bound [as _assert] (/root/caliper/node_modules/tape/lib/test.js:77:32)
      at Test.fail (/root/caliper/node_modules/tape/lib/test.js:318:10)
      at Test.bound [as fail] (/root/caliper/node_modules/tape/lib/test.js:77:32)
      at client.startTest.then.then.catch (/root/caliper/src/comm/bench-flow.js:254:23)
      at <anonymous>

...

I don't understand what “Client encountered unexpected error” means and how to deal with it.

CI build Process Required

A CI Process, such as Travis or Jenkins, is required to establish a base from which to prevent the introduction of regressions through:

  • run linting checks
  • run unit tests
  • run code coverage check from unit test results (using nyc or similar)

It would then be possible to make a "green build" a pre-req for any PRs. The above should help minimise the introduction of regressions into the code base.

Improve caliper to support long time testing

Now txns statuses are stored in internal arrays and exchanged between processes via messages or zookeeper. Some people may want to start a long time testing such as testing 24 hours with a sending rate of 10000 tps. That may cause performance issues for caliper itself. So the mechanism of txns statuses storing and exchanging should be improved to meet the needs of long timing testing.

Iroha version is outdated

Current Iroha version used by Caliper is totally outdated and works over old manually generated connector library.

I think Iroha and connector library should be updated, so I created this PR #35

Javascript Linting Required

In order help readability of all project code, and to enforce coding consistency for contributors, it would be of great help to add linting rules into the project via eslint.

This will unfortunately require a bit of a code refactor once the rule file is added and enforced, however it will help with code contribution as the project evolves.

Can't understand the idea of rate-control function

Hi I didn't quite understand the codes in function of rate-control:

applyRateControl(start, idx, currentResults) {
if(this.sleepTime === 0) {
return Promise.resolve();
}
let diff = (this.sleepTime * idx - (Date.now() - start));
if( diff > 5) {
return Sleep(diff);
}
else {
return Promise.resolve();
}
}

Since when I apply my code to use this function, my send rate is not very accurate.

Failed to create channels Error: create status is BAD_REQUEST

I have same error with this issue.
#81

Although I stopped old containers, I still have error. How can I solve it??

docker-compose -f network/fabric-v11/3-org-3-peer/docker-compose.yaml up -d
Creating couchdb.peer0.org3.example.com ... done
Creating couchdb.peer2.org1.example.com ... done
Creating orderer.example.com ... done
Creating couchdb.peer1.org2.example.com ... done
Creating couchdb.peer2.org3.example.com ... done
Creating ca.org2.example.com ... done
Creating couchdb.peer2.org2.example.com ... done
Creating couchdb.peer1.org1.example.com ... done
Creating ca.org3.example.com ... done
Creating couchdb.peer1.org3.example.com ... done
Creating couchdb.peer0.org2.example.com ... done
Creating ca.org1.example.com ... done
Creating couchdb.peer0.org1.example.com ... done
Creating peer1.org3.example.com ... done
Creating peer0.org3.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer1.org2.example.com ... done
Creating peer2.org3.example.com ... done
Creating peer1.org1.example.com ... done
Creating peer2.org2.example.com ... done
Creating peer2.org1.example.com ... done

create mychannel......

not ok 1 Failed to create channels Error: create status is BAD_REQUEST at channel.organizations.reduce.then.then.then (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/fabric/create-channel.js:146:43) at at process._tickCallback (internal/process/next_tick.js:160:7)

operator: fail
at: channels.reduce.then.then.catch (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/fabric/create-channel.js:160:19)
stack: |-
  Error: Failed to create channels Error: create status is BAD_REQUEST
      at channel.organizations.reduce.then.then.then (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/fabric/create-channel.js:146:43)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)
      at Test.assert [as _assert] (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/node_modules/tape/lib/test.js:224:54)
      at Test.bound [as _assert] (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/node_modules/tape/lib/test.js:76:32)
      at Test.fail (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/node_modules/tape/lib/test.js:317:10)
      at Test.bound [as fail] (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/node_modules/tape/lib/test.js:76:32)
      at channels.reduce.then.then.catch (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/fabric/create-channel.js:160:19)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/fabric/create-channel.js:161:31)
at
at process._tickCallback (internal/process/next_tick.js:160:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/Users/yo-dash/Blockchain/HyperLedger/caliper3/caliper/src/comm/bench-flow.js:347:18)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)

...

1..2

tests 2

pass 0

fail 2

Hyperledger Fabric performance

Hi! I would like to know what is the problem with my use of Caliper tool, as I was examining its work with other blockchain platforms than Iroha, and it seems like I have troubles with Fabric:

[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14729 Unfinished:3
###test result:###
+------+------+------+-----------+-------------+-------------+-------------+----------------+------------+
| Name | Succ | Fail | Send Rate | Max Latency | Min Latency | Avg Latency | 75%ile Latency | Throughput |
|------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| open | 240  | 4760 | 242 tps   | 85.05 s     | 51.12 s     | 72.82 s     | 77.68 s        | 2 tps      |
+------+------+------+-----------+-------------+-------------+-------------+----------------+------------+

In the log, following messages are produced:

WARNING: timeout is too small, default value is used instead
Invoke chaincode failed, Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...
    at channel.sendTransactionProposal.then (/Users/neewy/Developer/caliper/src/fabric/e2eUtils.js:614:10)
    at <anonymous>

and

Invoke chaincode failed, Error: Failed to get valid event notification
    at channel.sendTransaction.then.then (/Users/neewy/Developer/caliper/src/fabric/e2eUtils.js:611:14)
    at <anonymous>

In the end of log, before the docker network is being shut down:

ok 7 passed 'open' testing
wait 5 seconds for next round...
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
# ##### testing 'query' ######
[Transaction Info] - Submitted: 15000 Succ: 268 Fail:14732 Unfinished:0
unexpected error, TypeError: Cannot read property 'length' of undefined
    at /Users/neewy/Developer/caliper/src/comm/bench-flow.js:226:40
    at new Promise (<anonymous>)
    at defaultTest (/Users/neewy/Developer/caliper/src/comm/bench-flow.js:219:12)
    at prev.then (/Users/neewy/Developer/caliper/src/comm/bench-flow.js:129:28)
    at <anonymous>

What might be wrong?

I used node main.js -c config-fabric.jsonto run the benchmark against master branch

Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

[root@cbc-231 caliper-master]# node benchmark/simple/main.js -c config-fabric.json -n fabric.json
TAP version 13

#######Caliper Test######

docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
ca_peerOrg1_ is up-to-date
ca_peerOrg2_ is up-to-date
Starting simplenetwork_peer_1 ...
simplenetwork_ca_1 is up-to-date
orderer.example.com is up-to-date
peer0.org2.example.com is up-to-date
peer0.org1.example.com is up-to-date
peer1.org2.example.com is up-to-date
Starting simplenetwork_peer_1 ... done

create mychannel......

E0626 18:28:08.258706805 2720 ssl_transport_security.cc:1063] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: Connect Failed\n at Object.exports.createStatusError (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15)\n at ClientDuplexStream._emitStatusIfDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:235:26)\n at ClientDuplexStream._readsDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:201:8)\n at /home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:679:15"
not ok 1 Failed to create channels Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/hurf/caliper-master/node_modules/fabric-client/lib/Orderer.js:136:21) at ClientDuplexStream.emit (events.js:180:13) at ClientDuplexStream._emitStatusIfDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:236:12) at ClientDuplexStream._readsDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:201:8) at /home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:679:15

operator: fail
at: channels.reduce.then.then.catch (/home/hurf/caliper-master/src/fabric/create-channel.js:160:19)
stack: |-
  Error: Failed to create channels Error: SERVICE_UNAVAILABLE
      at ClientDuplexStream.<anonymous> (/home/hurf/caliper-master/node_modules/fabric-client/lib/Orderer.js:136:21)
      at ClientDuplexStream.emit (events.js:180:13)
      at ClientDuplexStream._emitStatusIfDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:236:12)
      at ClientDuplexStream._readsDone (/home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client.js:201:8)
      at /home/hurf/caliper-master/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:679:15
      at Test.assert [as _assert] (/home/hurf/caliper-master/node_modules/tape/lib/test.js:224:54)
      at Test.bound [as _assert] (/home/hurf/caliper-master/node_modules/tape/lib/test.js:76:32)
      at Test.fail (/home/hurf/caliper-master/node_modules/tape/lib/test.js:317:10)
      at Test.bound [as fail] (/home/hurf/caliper-master/node_modules/tape/lib/test.js:76:32)
      at channels.reduce.then.then.catch (/home/hurf/caliper-master/src/fabric/create-channel.js:160:19)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:118:7)

...
fabric.init() failed, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/home/hurf/caliper-master/src/fabric/create-channel.js:161:31)
at
at process._tickCallback (internal/process/next_tick.js:118:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/home/hurf/caliper-master/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/home/hurf/caliper-master/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/home/hurf/caliper-master/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/home/hurf/caliper-master/src/comm/bench-flow.js:347:18)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:118:7)

...

1..2

tests 2

pass 0

fail 2

Failed to run composer test: 'SIGSEGV: segmentation violation'

I have encountered this error when run composer test. My node version is v8.10.0 and go version is go1.9.2

TAP version 13
# #######Caliper Test######
docker-compose -f network/fabric-v11/2-org-1-peer/docker-compose.yaml up -d
Creating network "2org1peer_default" with the default driver
Creating couchdb.org1.example.com ... 
Creating ca.org1.example.com ... 
Creating couchdb.org2.example.com ... 
Creating ca.org2.example.com ... 
Creating orderer.example.com ... 
Creating ca.org1.example.com
Creating couchdb.org1.example.com
Creating couchdb.org2.example.com
Creating ca.org2.example.com
Creating orderer.example.com ... done
Creating peer0.org2.example.com ... 
Creating peer0.org1.example.com ... 
Creating peer0.org2.example.com
Creating peer0.org1.example.com ... done
Initializing target platform configuration
creating channel mychannel ......
composer.init() failed at initialiseFabric(),  { code: 2,
  stdout: '',
  stderr: '2018-03-30 02:10:53.335 UTC [channelCmd] InitCmdFactory -> INFO 001\u001b[0m Endorser and orderer connections initialized\nfatal error: unexpected signal during runtime execution\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f4b4ce7b259]\n\nruntime stack:\nruntime.throw(0xf11259, 0x2a)\n\t/opt/go/src/runtime/panic.go:605 +0x95\nruntime.sigpanic()\n\t/opt/go/src/runtime/signal_unix.go:351 +0x2b8\n\ngoroutine 21 [syscall, locked to thread]:\nruntime.cgocall(0xbf3800, 0xc42002fde8, 0xf0fa21)\n\t/opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc42002fda8 sp=0xc42002fd68 pc=0x4023b4\nnet._C2func_getaddrinfo(0x7f4b480008c0, 0x0, 0xc42019e210, 0xc4204b6038, 0x0, 0x0, 0x0)\n\tnet/_obj/_cgo_gotypes.go:86 +0x5f fp=0xc42002fde8 sp=0xc42002fda8 pc=0x5f893f\nnet.cgoLookupIPCNAME.func2(0x7f4b480008c0, 0x0, 0xc42019e210, 0xc4204b6038, 0xc420302c00, 0x7ffe78456c8b, 0x13)\n\t/opt/go/src/net/cgo_unix.go:151 +0x13f fp=0xc42002fe40 sp=0xc42002fde8 pc=0x5ffedf\nnet.cgoLookupIPCNAME(0x7ffe78456c8b, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/cgo_unix.go:151 +0x175 fp=0xc42002ff38 sp=0xc42002fe40 pc=0x5fa195\nnet.cgoIPLookup(0xc420302d80, 0x7ffe78456c8b, 0x13)\n\t/opt/go/src/net/cgo_unix.go:203 +0x4d fp=0xc42002ffc8 sp=0xc42002ff38 pc=0x5fa8dd\nruntime.goexit()\n\t/opt/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42002ffd0 sp=0xc42002ffc8 pc=0x45e391\ncreated by net.cgoLookupIP\n\t/opt/go/src/net/cgo_unix.go:213 +0xaf\n\ngoroutine 1 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext(0x7f4b4d1fcab0, 0xc420302ae0, 0x7ffe78456c8b, 0x18, 0xc42015f0a0, 0x4, 0x4, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:422 +0x532\ngithub.com/hyperledger/fabric/core/comm.(*grpcClient).NewConnection(0xc4204b20a0, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/core/comm/client.go:217 +0x389\ngithub.com/hyperledger/fabric/peer/common.(*OrdererClient).Deliver(0xc42019b890, 0x0, 0x0, 0x20, 0xd662c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/common/ordererclient.go:61 +0x6c\ngithub.com/hyperledger/fabric/peer/channel.newDeliverClient(0x7ffe78456ca7, 0x9, 0xee710d, 0x1, 0xc42015f060)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/deliverclient.go:51 +0x143\ngithub.com/hyperledger/fabric/peer/channel.InitCmdFactory(0xc420320100, 0x0, 0x0, 0x16571c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/channel.go:152 +0x233\ngithub.com/hyperledger/fabric/peer/channel.getGenesisBlock(0xc4203e2050, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/deliverclient.go:167 +0x124\ngithub.com/hyperledger/fabric/peer/channel.executeCreate(0xc4203e2050, 0xc4203e2050, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:183 +0x50\ngithub.com/hyperledger/fabric/peer/channel.create(0xc4202886c0, 0xc420303500, 0x0, 0x6, 0x0, 0xd5afc0, 0x16705c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:213 +0x40\ngithub.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4202886c0, 0xc420303500, 0x0, 0x6, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:59 +0x52\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4202886c0, 0xc420303200, 0x6, 0x6, 0xc4202886c0, 0xc420303200)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x3e8\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x164d4e0, 0x11, 0xc4202b8540, 0x5)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x2fe\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x164d4e0, 0x35, 0xc420016035)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b\nmain.main()\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:112 +0x5e1\n\ngoroutine 19 [select]:\nnet.(*Resolver).LookupIPAddr(0x169d370, 0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/lookup.go:196 +0x52b\nnet.(*Resolver).internetAddrList(0x169d370, 0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, ...)\n\t/opt/go/src/net/ipsock.go:293 +0x644\nnet.(*Resolver).resolveAddrList(0x169d370, 0x1667b40, 0xc420302c00, 0xee7b40, 0x4, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, ...)\n\t/opt/go/src/net/dial.go:193 +0x594\nnet.(*Dialer).DialContext(0xc420495458, 0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, ...)\n\t/opt/go/src/net/dial.go:375 +0x248\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.dialContext(0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xc42010c600, 0xc42017c200)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/go17.go:38 +0xb3\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func1(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x16571c0, 0xc420163320)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:329 +0x86\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.newProxyDialer.func1(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/proxy.go:121 +0x137\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.dial(0x7f4b4d1fcab0, 0xc420302c00, 0xc420300000, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:119 +0x5a\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:157 +0xa7\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.NewClientTransport(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/transport.go:505 +0xae\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).resetTransport(0xc4202328c0, 0xc42019b900, 0xc4202328e0, 0xc4200a23c8)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:929 +0x4b4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn(0xc420232000, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xc420176001, 0x0, 0x0, 0x4f0e30, 0xc42015a180)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:702 +0x340\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func3(0xc420302ba0, 0xc420232000, 0x0, 0x0, 0x7ffe78456c8b, 0x18)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:417 +0x223\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:386 +0x441\n\ngoroutine 36 [syscall]:\nos/signal.signal_recv(0x0)\n\t/opt/go/src/runtime/sigqueue.go:131 +0xa6\nos/signal.loop()\n\t/opt/go/src/os/signal/signal_unix.go:22 +0x22\ncreated by os/signal.init.0\n\t/opt/go/src/os/signal/signal_unix.go:28 +0x41\n\ngoroutine 41 [IO wait]:\ninternal/poll.runtime_pollWait(0x7f4b4da31f70, 0x72, 0x0)\n\t/opt/go/src/runtime/netpoll.go:173 +0x57\ninternal/poll.(*pollDesc).wait(0xc42017de18, 0x72, 0xffffffffffffff00, 0x165d680, 0x1654ba0)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:85 +0xae\ninternal/poll.(*pollDesc).waitRead(0xc42017de18, 0xc4203f8000, 0x8000, 0x8000)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d\ninternal/poll.(*FD).Read(0xc42017de00, 0xc4203f8000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/internal/poll/fd_unix.go:126 +0x18a\nnet.(*netFD).Read(0xc42017de00, 0xc4203f8000, 0x8000, 0x8000, 0x870780, 0xc4202e69a0, 0xc4204b40c0)\n\t/opt/go/src/net/fd_unix.go:202 +0x52\nnet.(*conn).Read(0xc420164618, 0xc4203f8000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/net.go:176 +0x6d\nbufio.(*Reader).Read(0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0xf35600, 0xc420042d60, 0x405c32)\n\t/opt/go/src/bufio/bufio.go:213 +0x30b\nio.ReadAtLeast(0x1656c00, 0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0x9, 0xc4203e8001, 0x80000000006, 0x20)\n\t/opt/go/src/io/io.go:309 +0x86\nio.ReadFull(0x1656c00, 0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0x0, 0xc420042e28, 0x42b6a6)\n\t/opt/go/src/io/io.go:327 +0x58\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.readFrameHeader(0xc4202e68f8, 0x9, 0x9, 0x1656c00, 0xc4203ea420, 0x0, 0xc400000000, 0xc420042e6d, 0xc4204ba120)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:237 +0x7b\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.(*Framer).ReadFrame(0xc4202e68c0, 0x165fbc0, 0xc4204ba120, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:492 +0xa4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*framer).readFrame(0xc4203e6bd0, 0xc4204ba120, 0xc4204ba120, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http_util.go:592 +0x2f\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1154 +0xc0\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8\n\ngoroutine 42 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1227 +0x148\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e\n\ngoroutine 43 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1276 +0x13c\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2\n\ngoroutine 44 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420232380)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:995 +0x1de\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a\n\ngoroutine 66 [IO wait]:\ninternal/poll.runtime_pollWait(0x7f4b4da31eb0, 0x72, 0x0)\n\t/opt/go/src/runtime/netpoll.go:173 +0x57\ninternal/poll.(*pollDesc).wait(0xc42044e398, 0x72, 0xffffffffffffff00, 0x165d680, 0x1654ba0)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:85 +0xae\ninternal/poll.(*pollDesc).waitRead(0xc42044e398, 0xc420478000, 0x8000, 0x8000)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d\ninternal/poll.(*FD).Read(0xc42044e380, 0xc420478000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/internal/poll/fd_unix.go:126 +0x18a\nnet.(*netFD).Read(0xc42044e380, 0xc420478000, 0x8000, 0x8000, 0x11, 0x0, 0x0)\n\t/opt/go/src/net/fd_unix.go:202 +0x52\nnet.(*conn).Read(0xc420164650, 0xc420478000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/net.go:176 +0x6d\nbufio.(*Reader).Read(0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x9, 0x0, 0xc420043d58)\n\t/opt/go/src/bufio/bufio.go:213 +0x30b\nio.ReadAtLeast(0x1656c00, 0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x9, 0xc42042a780, 0xc420043e18, 0x42b3c8)\n\t/opt/go/src/io/io.go:309 +0x86\nio.ReadFull(0x1656c00, 0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x0, 0xc42005ee80, 0x3)\n\t/opt/go/src/io/io.go:327 +0x58\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.readFrameHeader(0xc4204a4038, 0x9, 0x9, 0x1656c00, 0xc4204613e0, 0x0, 0x0, 0xc42042a600, 0xf35600)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:237 +0x7b\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.(*Framer).ReadFrame(0xc4204a4000, 0xc4204a2120, 0x165a340, 0xc4202b80f0, 0xc4202b80f0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:492 +0xa4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*framer).readFrame(0xc4204a2000, 0xc4202b6080, 0xc4202b6080, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http_util.go:592 +0x2f\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1154 +0xc0\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8\n\ngoroutine 67 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1227 +0x148\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e\n\ngoroutine 68 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1276 +0x13c\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2\n\ngoroutine 69 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420232700)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:995 +0x1de\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a\n\ngoroutine 20 [select]:\nnet.cgoLookupIP(0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0xc420168780, 0xc420000180, 0xc42002fde8, 0x42ee2c, 0xf354a0, 0xc42002fdd0)\n\t/opt/go/src/net/cgo_unix.go:214 +0x1b0\nnet.(*Resolver).lookupIP(0x169d370, 0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0xc42002fec0, 0x40476b, 0xc420062120, 0xeec554, 0x9)\n\t/opt/go/src/net/lookup_unix.go:95 +0x12d\nnet.(*Resolver).(net.lookupIP)-fm(0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0x3, 0xc420001500, 0xc42005e0c0, 0xc420001588, 0xc420020600)\n\t/opt/go/src/net/lookup.go:187 +0x56\nnet.glob..func10(0x1667b40, 0xc420302c00, 0xc420300050, 0x7ffe78456c8b, 0x13, 0x42ad09, 0xc400000008, 0xc42005e0c0, 0x4ef901, 0x8db329)\n\t/opt/go/src/net/hook.go:19 +0x52\nnet.(*Resolver).LookupIPAddr.func1(0x18, 0x0, 0x0, 0xc420176001)\n\t/opt/go/src/net/lookup.go:193 +0x5c\ninternal/singleflight.(*Group).doCall(0x169d360, 0xc4204b20f0, 0x7ffe78456c8b, 0x13, 0xc42019be30)\n\t/opt/go/src/internal/singleflight/singleflight.go:93 +0x2e\ncreated by internal/singleflight.(*Group).DoChan\n\t/opt/go/src/internal/singleflight/singleflight.go:86 +0x31f\n' }
composer.init() failed,  { code: 2,
  stdout: '',
  stderr: '2018-03-30 02:10:53.335 UTC [channelCmd] InitCmdFactory -> INFO 001\u001b[0m Endorser and orderer connections initialized\nfatal error: unexpected signal during runtime execution\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f4b4ce7b259]\n\nruntime stack:\nruntime.throw(0xf11259, 0x2a)\n\t/opt/go/src/runtime/panic.go:605 +0x95\nruntime.sigpanic()\n\t/opt/go/src/runtime/signal_unix.go:351 +0x2b8\n\ngoroutine 21 [syscall, locked to thread]:\nruntime.cgocall(0xbf3800, 0xc42002fde8, 0xf0fa21)\n\t/opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc42002fda8 sp=0xc42002fd68 pc=0x4023b4\nnet._C2func_getaddrinfo(0x7f4b480008c0, 0x0, 0xc42019e210, 0xc4204b6038, 0x0, 0x0, 0x0)\n\tnet/_obj/_cgo_gotypes.go:86 +0x5f fp=0xc42002fde8 sp=0xc42002fda8 pc=0x5f893f\nnet.cgoLookupIPCNAME.func2(0x7f4b480008c0, 0x0, 0xc42019e210, 0xc4204b6038, 0xc420302c00, 0x7ffe78456c8b, 0x13)\n\t/opt/go/src/net/cgo_unix.go:151 +0x13f fp=0xc42002fe40 sp=0xc42002fde8 pc=0x5ffedf\nnet.cgoLookupIPCNAME(0x7ffe78456c8b, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/cgo_unix.go:151 +0x175 fp=0xc42002ff38 sp=0xc42002fe40 pc=0x5fa195\nnet.cgoIPLookup(0xc420302d80, 0x7ffe78456c8b, 0x13)\n\t/opt/go/src/net/cgo_unix.go:203 +0x4d fp=0xc42002ffc8 sp=0xc42002ff38 pc=0x5fa8dd\nruntime.goexit()\n\t/opt/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42002ffd0 sp=0xc42002ffc8 pc=0x45e391\ncreated by net.cgoLookupIP\n\t/opt/go/src/net/cgo_unix.go:213 +0xaf\n\ngoroutine 1 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext(0x7f4b4d1fcab0, 0xc420302ae0, 0x7ffe78456c8b, 0x18, 0xc42015f0a0, 0x4, 0x4, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:422 +0x532\ngithub.com/hyperledger/fabric/core/comm.(*grpcClient).NewConnection(0xc4204b20a0, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/core/comm/client.go:217 +0x389\ngithub.com/hyperledger/fabric/peer/common.(*OrdererClient).Deliver(0xc42019b890, 0x0, 0x0, 0x20, 0xd662c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/common/ordererclient.go:61 +0x6c\ngithub.com/hyperledger/fabric/peer/channel.newDeliverClient(0x7ffe78456ca7, 0x9, 0xee710d, 0x1, 0xc42015f060)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/deliverclient.go:51 +0x143\ngithub.com/hyperledger/fabric/peer/channel.InitCmdFactory(0xc420320100, 0x0, 0x0, 0x16571c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/channel.go:152 +0x233\ngithub.com/hyperledger/fabric/peer/channel.getGenesisBlock(0xc4203e2050, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/deliverclient.go:167 +0x124\ngithub.com/hyperledger/fabric/peer/channel.executeCreate(0xc4203e2050, 0xc4203e2050, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:183 +0x50\ngithub.com/hyperledger/fabric/peer/channel.create(0xc4202886c0, 0xc420303500, 0x0, 0x6, 0x0, 0xd5afc0, 0x16705c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:213 +0x40\ngithub.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4202886c0, 0xc420303500, 0x0, 0x6, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:59 +0x52\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4202886c0, 0xc420303200, 0x6, 0x6, 0xc4202886c0, 0xc420303200)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x3e8\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x164d4e0, 0x11, 0xc4202b8540, 0x5)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x2fe\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x164d4e0, 0x35, 0xc420016035)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b\nmain.main()\n\t/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:112 +0x5e1\n\ngoroutine 19 [select]:\nnet.(*Resolver).LookupIPAddr(0x169d370, 0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/lookup.go:196 +0x52b\nnet.(*Resolver).internetAddrList(0x169d370, 0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, ...)\n\t/opt/go/src/net/ipsock.go:293 +0x644\nnet.(*Resolver).resolveAddrList(0x169d370, 0x1667b40, 0xc420302c00, 0xee7b40, 0x4, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, ...)\n\t/opt/go/src/net/dial.go:193 +0x594\nnet.(*Dialer).DialContext(0xc420495458, 0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, ...)\n\t/opt/go/src/net/dial.go:375 +0x248\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.dialContext(0x1667b40, 0xc420302c00, 0xee7636, 0x3, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xc42010c600, 0xc42017c200)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/go17.go:38 +0xb3\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func1(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x16571c0, 0xc420163320)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:329 +0x86\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.newProxyDialer.func1(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/proxy.go:121 +0x137\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.dial(0x7f4b4d1fcab0, 0xc420302c00, 0xc420300000, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:119 +0x5a\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:157 +0xa7\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.NewClientTransport(0x7f4b4d1fcab0, 0xc420302c00, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/transport.go:505 +0xae\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).resetTransport(0xc4202328c0, 0xc42019b900, 0xc4202328e0, 0xc4200a23c8)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:929 +0x4b4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn(0xc420232000, 0x7ffe78456c8b, 0x18, 0x0, 0x0, 0xc420176001, 0x0, 0x0, 0x4f0e30, 0xc42015a180)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:702 +0x340\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func3(0xc420302ba0, 0xc420232000, 0x0, 0x0, 0x7ffe78456c8b, 0x18)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:417 +0x223\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:386 +0x441\n\ngoroutine 36 [syscall]:\nos/signal.signal_recv(0x0)\n\t/opt/go/src/runtime/sigqueue.go:131 +0xa6\nos/signal.loop()\n\t/opt/go/src/os/signal/signal_unix.go:22 +0x22\ncreated by os/signal.init.0\n\t/opt/go/src/os/signal/signal_unix.go:28 +0x41\n\ngoroutine 41 [IO wait]:\ninternal/poll.runtime_pollWait(0x7f4b4da31f70, 0x72, 0x0)\n\t/opt/go/src/runtime/netpoll.go:173 +0x57\ninternal/poll.(*pollDesc).wait(0xc42017de18, 0x72, 0xffffffffffffff00, 0x165d680, 0x1654ba0)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:85 +0xae\ninternal/poll.(*pollDesc).waitRead(0xc42017de18, 0xc4203f8000, 0x8000, 0x8000)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d\ninternal/poll.(*FD).Read(0xc42017de00, 0xc4203f8000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/internal/poll/fd_unix.go:126 +0x18a\nnet.(*netFD).Read(0xc42017de00, 0xc4203f8000, 0x8000, 0x8000, 0x870780, 0xc4202e69a0, 0xc4204b40c0)\n\t/opt/go/src/net/fd_unix.go:202 +0x52\nnet.(*conn).Read(0xc420164618, 0xc4203f8000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/net.go:176 +0x6d\nbufio.(*Reader).Read(0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0xf35600, 0xc420042d60, 0x405c32)\n\t/opt/go/src/bufio/bufio.go:213 +0x30b\nio.ReadAtLeast(0x1656c00, 0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0x9, 0xc4203e8001, 0x80000000006, 0x20)\n\t/opt/go/src/io/io.go:309 +0x86\nio.ReadFull(0x1656c00, 0xc4203ea420, 0xc4202e68f8, 0x9, 0x9, 0x0, 0xc420042e28, 0x42b6a6)\n\t/opt/go/src/io/io.go:327 +0x58\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.readFrameHeader(0xc4202e68f8, 0x9, 0x9, 0x1656c00, 0xc4203ea420, 0x0, 0xc400000000, 0xc420042e6d, 0xc4204ba120)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:237 +0x7b\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.(*Framer).ReadFrame(0xc4202e68c0, 0x165fbc0, 0xc4204ba120, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:492 +0xa4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*framer).readFrame(0xc4203e6bd0, 0xc4204ba120, 0xc4204ba120, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http_util.go:592 +0x2f\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1154 +0xc0\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8\n\ngoroutine 42 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1227 +0x148\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e\n\ngoroutine 43 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc4201b96c0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1276 +0x13c\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2\n\ngoroutine 44 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420232380)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:995 +0x1de\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a\n\ngoroutine 66 [IO wait]:\ninternal/poll.runtime_pollWait(0x7f4b4da31eb0, 0x72, 0x0)\n\t/opt/go/src/runtime/netpoll.go:173 +0x57\ninternal/poll.(*pollDesc).wait(0xc42044e398, 0x72, 0xffffffffffffff00, 0x165d680, 0x1654ba0)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:85 +0xae\ninternal/poll.(*pollDesc).waitRead(0xc42044e398, 0xc420478000, 0x8000, 0x8000)\n\t/opt/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d\ninternal/poll.(*FD).Read(0xc42044e380, 0xc420478000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/internal/poll/fd_unix.go:126 +0x18a\nnet.(*netFD).Read(0xc42044e380, 0xc420478000, 0x8000, 0x8000, 0x11, 0x0, 0x0)\n\t/opt/go/src/net/fd_unix.go:202 +0x52\nnet.(*conn).Read(0xc420164650, 0xc420478000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\n\t/opt/go/src/net/net.go:176 +0x6d\nbufio.(*Reader).Read(0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x9, 0x0, 0xc420043d58)\n\t/opt/go/src/bufio/bufio.go:213 +0x30b\nio.ReadAtLeast(0x1656c00, 0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x9, 0xc42042a780, 0xc420043e18, 0x42b3c8)\n\t/opt/go/src/io/io.go:309 +0x86\nio.ReadFull(0x1656c00, 0xc4204613e0, 0xc4204a4038, 0x9, 0x9, 0x0, 0xc42005ee80, 0x3)\n\t/opt/go/src/io/io.go:327 +0x58\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.readFrameHeader(0xc4204a4038, 0x9, 0x9, 0x1656c00, 0xc4204613e0, 0x0, 0x0, 0xc42042a600, 0xf35600)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:237 +0x7b\ngithub.com/hyperledger/fabric/vendor/golang.org/x/net/http2.(*Framer).ReadFrame(0xc4204a4000, 0xc4204a2120, 0x165a340, 0xc4202b80f0, 0xc4202b80f0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/http2/frame.go:492 +0xa4\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*framer).readFrame(0xc4204a2000, 0xc4202b6080, 0xc4202b6080, 0x0, 0x0)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http_util.go:592 +0x2f\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1154 +0xc0\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8\n\ngoroutine 67 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1227 +0x148\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e\n\ngoroutine 68 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc4204ae000)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1276 +0x13c\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2\n\ngoroutine 69 [select]:\ngithub.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420232700)\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:995 +0x1de\ncreated by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn\n\t/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a\n\ngoroutine 20 [select]:\nnet.cgoLookupIP(0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0xc420168780, 0xc420000180, 0xc42002fde8, 0x42ee2c, 0xf354a0, 0xc42002fdd0)\n\t/opt/go/src/net/cgo_unix.go:214 +0x1b0\nnet.(*Resolver).lookupIP(0x169d370, 0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0xc42002fec0, 0x40476b, 0xc420062120, 0xeec554, 0x9)\n\t/opt/go/src/net/lookup_unix.go:95 +0x12d\nnet.(*Resolver).(net.lookupIP)-fm(0x1667b40, 0xc420302c00, 0x7ffe78456c8b, 0x13, 0x3, 0xc420001500, 0xc42005e0c0, 0xc420001588, 0xc420020600)\n\t/opt/go/src/net/lookup.go:187 +0x56\nnet.glob..func10(0x1667b40, 0xc420302c00, 0xc420300050, 0x7ffe78456c8b, 0x13, 0x42ad09, 0xc400000008, 0xc42005e0c0, 0x4ef901, 0x8db329)\n\t/opt/go/src/net/hook.go:19 +0x52\nnet.(*Resolver).LookupIPAddr.func1(0x18, 0x0, 0x0, 0xc420176001)\n\t/opt/go/src/net/lookup.go:193 +0x5c\ninternal/singleflight.(*Group).doCall(0x169d360, 0xc4204b20f0, 0x7ffe78456c8b, 0x13, 0xc42019be30)\n\t/opt/go/src/internal/singleflight/singleflight.go:93 +0x2e\ncreated by internal/singleflight.(*Group).DoChan\n\t/opt/go/src/internal/singleflight/singleflight.go:86 +0x31f\n' }
unexpected error, [object Object]

fabric1.1.0 Cannot read property 'getConnectivityState' of undefined Join channel failed

beans-MacBook-Pro:caliper bean$ npm install [email protected] [email protected]
[email protected]
[email protected]
updated 2 packages in 5.893s
beans-MacBook-Pro:caliper bean$ cd benchmark/simple/
beans-MacBook-Pro:simple bean$ ls
config-composite-rate.json config-sawtooth.json fabric-remote.json main.js sawtooth.json
config-fabric.json config-zookeeper.json fabric.json open.js
config-iroha.json config.json iroha.json query.js
beans-MacBook-Pro:simple bean$ node main.js -c config-fabric.json -n fabric.json
TAP version 13
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
Creating orderer.example.com ... done
Creating ca_peerOrg1 ... done
Creating ca_peerOrg2 ... done
Creating couchdb ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer1.org2.example.com ... done
Creating peer1.org1.example.com ... done
create mychannel......
ok 1 created mychannel successfully
Sleep 5s......
Join channel......
join mychannel
not ok 2 Failed to join peers, TypeError: Cannot read property 'getConnectivityState' of undefined at EventHub._checkConnection (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:479:39) at EventHub.registerBlockEvent (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:658:8) at Promise (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:140:20) at new Promise () at eventhubs.forEach (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:137:29) at Array.forEach () at Client.newDefaultKeyValueStore.then.then.then.then (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:136:19) at
operator: fail
at: channels.reduce.then.catch (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:216:19)
stack: |-
Error: Failed to join peers, TypeError: Cannot read property 'getConnectivityState' of undefined
at EventHub._checkConnection (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:479:39)
at EventHub.registerBlockEvent (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:658:8)
at Promise (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:140:20)
at new Promise ()
at eventhubs.forEach (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:137:29)
at Array.forEach ()
at Client.newDefaultKeyValueStore.then.then.then.then (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:136:19)
at
at Test.assert [as _assert] (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at Test.fail (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at channels.reduce.then.catch (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:216:19)
at
fabric.init() failed, Error: Fabric: Join channel failed
at channels.reduce.then.catch (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:217:31)
at
not ok 3 TypeError: Cannot read property 'getUpdates' of undefined
operator: error
expected: |-
undefined
actual: |-
[TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
TypeError: Cannot read property 'getUpdates' of undefined
at update (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:145:26)
at Object.demoStopWatch [as stopWatch] (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:185:5)
at startPromise.then.then.then.then.then.then.catch (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/src/comm/bench-flow.js:347:18)
at
/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:308
if(self._stream) state = self.stream.call.channel.getConnectivityState();

TypeError: Cannot read property 'getConnectivityState' of undefined
at ClientDuplexStream. (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:308:56)
at emitOne (events.js:116:13)
at ClientDuplexStream.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at ClientDuplexStream.Readable.push (_stream_readable.js:208:10)
at Object.onReceiveMessage (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:1302:19)
at InterceptingListener.recvMessageWithContext (/Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:629:19)
at /Users/bean/Developer/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:728:14

npm ERR! Failed at the [email protected] install script.

root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# npm install

[email protected] install /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

/usr/bin/env: ‘node’: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-29T02_56_33_212Z-debug.log

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed

guolidong:/opt/gopath/src/github.com/hyperledger/caliper$ node benchmark/simple/main.js -c config-fabric-kafka.json -n fabric-kafka.json
TAP version 13

#######Caliper Test######

create mychannel......

ok 1 created mychannel successfully

Sleep 5s......

Join channel......

join mychannel

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed
at new createStatusError (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15)
at /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:583:15
E0619 19:50:29.135480000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:29.136101000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:29.137642000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:29.143612000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed
at new createStatusError (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15)
at /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:583:15
E0619 19:50:30.131582000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:30.137312000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:31.994305000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:31.996199000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed
at new createStatusError (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15)
at /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:583:15
E0619 19:50:34.902132000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:34.903814000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:38.605351000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:38.607226000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:46.409797000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:46.411316000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:57.231567000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0619 19:50:57.233355000 140735644013440 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
not ok 2 TypeError: Cannot read property 'stack' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'stack' of undefined]
at: process.onetime (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'stack' of undefined
      at channels.reduce.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:216:56)
      at <anonymous>

...

1..2

tests 2

pass 1

fail 1

guolidong:/opt/gopath/src/github.com/hyperledger/caliper$

Composer basic-sample test is broken

During an update to modify the basic-sample-network test to be written in async-await, an inconsistency was introduced in the sample namespace. This is causing transaction failures.

Premature termination of Fabric event hub connections

I run into the following strange behavior when running a benchmark with local clients and a local Fabric network:

When one of the clients finishes its round, it clears the platform context. In the case of Fabric, this means that the event hub connections are closed. However, when one client disconnects the event hubs, it seems that the other clients also lose the connection. And if they still had some pending transactions (the clients are not necessarily in perfect sync), those transactions will fail. Or to be precise, we don't know what happens to the transactions, but since the client doesn't get a notification, it marks them as failed.

PR #42 contains a sample configuration (benchmarks/simple/config-composite-rate.json) that exhibited the behavior above. The PR also contains a quick (and really dirty) fix for this issue by sleeping for 3 seconds before clearing the context at the end of the rounds.

Can someone reproduce this issue? I guess clients can easily become out-of-sync at higher TPS. These event hub errors should occur at the end of the round (usually for a small number of transactions).

Hard-coded MSPID

The file src/fabric/util.js contains a hardcoded MSPID: OrdererMSP. Even-though all the files with network options give the illusion the mspid is configurable for an orderer.

It took me over 2 hours to locate this mistake because I thought something was wrong with my own configuration. Please don't ever hard-code something like that again.

running main.js and BAD REQUEST encountered

I have installed the caliper package and dependencies are installed.
I did not modify anything either in the config.json file or in the fabric.json file.
Then I simply run

node benchmark/simple/main.js -c config.json
and I met the following error:

# create mychannel......
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: EOF\n    at createStatusError (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)\n    at Client
DuplexStream._emitStatusIfDone (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:270:19)\n    at ClientDuplexStream._receiveStatus (/Users/starry/caliper/node_modules/fabri
c-client/node_modules/grpc/src/client.js:248:8)\n    at /Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:804:12"
not ok 1 Failed to create channels Error: SERVICE_UNAVAILABLE at ClientDuplexStream.<anonymous> (/Users/starry/caliper/node_modules/fabric-client/lib/Orderer.js:138:21) at emitOne (events.js:116:13) at Cl
ientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:271:12) at ClientDuplexStream._receiveStat
us (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:248:8) at /Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:804:12
  ---
    operator: fail
    at: channels.reduce.then.then.catch (/Users/starry/caliper/src/fabric/create-channel.js:160:19)
    stack: |-
      Error: Failed to create channels Error: SERVICE_UNAVAILABLE
          at ClientDuplexStream.<anonymous> (/Users/starry/caliper/node_modules/fabric-client/lib/Orderer.js:138:21)
          at emitOne (events.js:116:13)
          at ClientDuplexStream.emit (events.js:211:7)
          at ClientDuplexStream._emitStatusIfDone (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:271:12)
          at ClientDuplexStream._receiveStatus (/Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:248:8)
          at /Users/starry/caliper/node_modules/fabric-client/node_modules/grpc/src/client.js:804:12
          at Test.assert [as _assert] (/Users/starry/caliper/node_modules/tape/lib/test.js:224:54)
          at Test.bound [as _assert] (/Users/starry/caliper/node_modules/tape/lib/test.js:76:32)
          at Test.fail (/Users/starry/caliper/node_modules/tape/lib/test.js:317:10)
          at Test.bound [as fail] (/Users/starry/caliper/node_modules/tape/lib/test.js:76:32)
          at channels.reduce.then.then.catch (/Users/starry/caliper/src/fabric/create-channel.js:160:19)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)
  ...
fabric.init() failed, Error: Fabric: Create channel failed
    at channels.reduce.then.then.catch (/Users/starry/caliper/src/fabric/create-channel.js:161:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
not ok 2 TypeError: Cannot read property 'getUpdates' of undefined
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [TypeError: Cannot read property 'getUpdates' of undefined]
    at: process.onetime (/Users/starry/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
    stack: |-
      TypeError: Cannot read property 'getUpdates' of undefined
          at update (/Users/starry/caliper/src/gui/src/demo.js:145:26)
          at Object.demoStopWatch [as stopWatch] (/Users/starry/caliper/src/gui/src/demo.js:185:5)
          at startPromise.then.then.then.then.then.then.catch (/Users/starry/caliper/src/comm/bench-flow.js:347:18)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)

I have seen a closed issue mentioned the BAD REQUEST problem, which has feedback that the problem might be caused by the version of fabric.
However, since i did not modify the fabric.json file, and it is configured as network/fabric/simplenetwork/cryto-config

I am wondering whether this configure is ok, if it is not ok why it occurs in the default version of the config files. If it is ok, then what causes the aforementioned error?

Fabric chaincode life-cycle handling

We ran into the following problem in the src/fabric/e2eUtils.js invokebycontext() implementation while load testing Fabric 1.x :

The resolved return value of the sendTransaction call is a BroadcastResponseObject which only contains an HTTP ACK from the orderer that it received the Tx successfully.

If this response arrives and it contains an invalid status code, then we know the Tx ordering will not happen, it was rejected explicitly for some reason. So far so good.

There were times during our load testing when this response did not arrive in time/at all (probably due to network latency reasons). In this case, Caliper marked the Tx as failed. However, we received valid event notifications for the Tx, meaning it was successfully committed to the ledger. So this is a false negative result.

I rewrote the life-cycle handling logic in my fork the following way. Note the introduction of the verified result concept.

  1. channel.SendTransactionProposal call result:

    1. Rejected Promise: Something happened, we terminate the life-cycle early. So this failed status is verified.
    2. Resolved ProposalResponseObject: we received a reply from the endorsing peers:
      1. If any response status is not 200, there was a chaincode execution error, and the Tx is not endorsed. So this failed status is verified.
      2. If all responses are valid, but there is a read/write set mismatch, the peers would reject the Tx eventually, so we terminate the life-cycle early. So this failed status is verified.
      3. Otherwise, we have valid endorsements at this point.
  2. Register Tx events Promises and callbacks:

    1. A timeout occurs, resulting in a rejected Promise. We did not get an explicit rejection from the peers. So this fail is not verified.
    2. The error callback is invoked from registerTxEvent, meaning there was some (probably) connection error with the event hub (it happened during high loads). We did not get an explicit rejection from the peers. So this fail is not verified.
    3. The "normal" callback is invoked from registerTxEvent. If the returned code is not VALID, then the Tx was rejected explicitly. So this failed status is verified.
    4. If the returned code is VALID, the Tx was committed to the ledger. This commit is a verified result and is also independent of the orderer ACK error in the next section.
  3. channel.sendTransaction call result:

    1. Rejected Promise: we did not receive an ACK from the orderer for some reason. But this does not mean, that the orderer will not consider the Tx for ordering. So this is not a verified failure.
    2. Resolved BroadcastResponse object:
      1. The response status is SUCCESS, meaning the orderer will order the Tx. (The invoke_status.time_order property name is misleading, this is only the time it took to receive the ACK from the orderer, and not the ordering time itself.)
      2. The response status is not SUCCESS, meaning the Tx is explicitly rejected for ordering, resulting in a verified failure.
  4. Wait for all event Promises:

    1. If all Promises resolved successfully, then the Tx is successful in a verified manner.
    2. In case of rejected event Promise, the logic described in section 2. applies to decide whether the failure is verified or not.
  5. At this point, the standard life-cycle ends, and the final time for both successful and failed Txs is recorded, also indicating whether the failure is verified or not (note, that the success of a Tx is always explicitly verified by the resolved events).

  6. (Optional Step) If a failure is not verified, then there is an option to explicitly query the ledger for the given Tx to verify the result. However, a certain amount of sleep time is needed to make sure that the Tx is through its life-cycle and can be queried.

I would appreciate Your opinions on this logic since as it turns out, writing a robust and reliable client for Fabric is far from trivial!

Docs for Composer tests need clarification

The current Composer documentation for "Testing Your own Business Network Definition" is slightly out of date.

A change was made to stop using binary files and use source files within a named directory; the docs still reference the older method that was used in pre-0.19 release testing for Composer.

Sleep time between phases of a round

My terminology is the following: a Caliper config file can define multiple rounds, each round consists of (possibly) multiple phases, each phase associated with its own rate-controller.

Currently, the implementation contains a sleep call between each phase inside the round, so a sudden increase in transaction rate cannot be modeled because of this cooldown period.

Is this behavior intentional? If not, a possible solution would be to call sleep after the whole round has finished.

Failed to read monitoring data

Hi, I have encountered this issue when run main.js to benchmark, as follow. How to avoid this please? My node version is v8.9.4. Thanks!

cd caliper/benchmark/simple && node main.js

Failed to read monitoring data
TypeError: Cannot read property 'length' of undefined
    at processResult (/root/caliper/src/comm/bench-flow.js:373:26)
    at p.then (/root/caliper/src/comm/client/client.js:89:20)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
not ok 5 failed 'open' testing, TypeError: Cannot read property 'length' of undefined at processResult (/root/caliper/src/comm/bench-flow.js:373:26) at p.then (/root/caliper/src/comm/client/client.js:89:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
  ---
    operator: fail
    at: client.startTest.then.then.catch (/root/caliper/src/comm/bench-flow.js:275:23)
    stack: |-
      Error: failed 'open' testing, TypeError: Cannot read property 'length' of undefined
          at processResult (/root/caliper/src/comm/bench-flow.js:373:26)
          at p.then (/root/caliper/src/comm/client/client.js:89:20)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)
          at Test.assert [as _assert] (/root/caliper/node_modules/tape/lib/test.js:225:54)
          at Test.bound [as _assert] (/root/caliper/node_modules/tape/lib/test.js:77:32)
          at Test.fail (/root/caliper/node_modules/tape/lib/test.js:318:10)
          at Test.bound [as fail] (/root/caliper/node_modules/tape/lib/test.js:77:32)
          at client.startTest.then.then.catch (/root/caliper/src/comm/bench-flow.js:275:23)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)
  ...

How to test TPS in orderer with kafka

Scene one:
1、Environment:orderer(solo) org1(peer1,peer2) org2(peer1,peer2) ca0 ca1
2、Start all nodes
3、Config caliper & Run test,the TPS is 440
Scene two:
1、Environment: 2orderer(kafka modle) 4 kafka 3 zookeeper org1(peer1,peer2) org2(peer1,peer2) ca0 ca1
2、Start all nodes
3、Config caliper & Run test,the TPS is 20

why?
why TPS is so low?

Calculate the whole proc


###all test results:###
+------+-------+------+------+-----------+-------------+-------------+-------------+----------------+------------+
| Test | Name  | Succ | Fail | Send Rate | Max Latency | Min Latency | Avg Latency | 75%ile Latency | Throughput |
|------|-------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| 1    | open  | 5000 | 0    | 100 tps   | 5.41 s      | 0.24 s      | 1.30 s      | 1.59 s         | 98 tps     |
|------|-------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| 2    | open  | 5000 | 0    | 200 tps   | 24.92 s     | 0.84 s      | 11.10 s     | 16.13 s        | 156 tps    |
|------|-------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| 3    | open  | 5000 | 0    | 300 tps   | 24.32 s     | 3.27 s      | 17.75 s     | 21.15 s        | 168 tps    |
|------|-------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| 4    | query | 5000 | 0    | 301 tps   | 1.03 s      | 0.01 s      | 0.12 s      | 0.14 s         | 299 tps    |
|------|-------|------|------|-----------|-------------|-------------|-------------|----------------|------------|
| 5    | query | 5000 | 0    | 400 tps   | 7.93 s      | 0.07 s      | 4.59 s      | 6.49 s         | 343 tps    |
+------+-------+------+------+-----------+-------------+-------------+-------------+----------------+------------+


From my machine test,I wanna know how many tx per second ,and the tx could get response from orderer .

NodeJS Chaincode

Is it possible to add a NodeJS chaincode example as well for Fabric?
Thanks!

Error undefined symbol: SSL_library_init while running simple test with hyperledger caliper

$sudo node main.js
TAP version 13
#######Caliper Test######
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
Creating network "simplenetwork_default" with the default driver
Creating ca_peerOrg2 ... ``
Creating ca_peerOrg1 ...
Creating couchdb ...
Creating orderer.example.com ...
Creating orderer.example.com
Creating couchdb
Creating ca_peerOrg2
Creating orderer.example.com ... done
Creating peer0.org2.example.com ...
Creating peer1.org2.example.com ...
Creating peer0.org1.example.com ...
Creating peer1.org2.example.com
Creating peer0.org2.example.com
Creating peer0.org1.example.com ... done
Creating peer1.org1.example.com ...
Creating peer1.org1.example.com ... done
#create mychannel......
node: symbol lookup error: /home/clever/caliper/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init

SyntaxError: Unexpected token function

My node version is 8.9.4 ; npm install is completed.
There is error :

guolidong:~/Documents/GitHub/caliper$ node benchmark/simple/main.js -c config-fabric.json -n fabric.json
TAP version 13

#######Caliper Test######

not ok 1 SyntaxError: Unexpected token function

operator: error
expected: |-
  undefined
actual: |-
  [SyntaxError: Unexpected token function]
at: Test.onetime [as end] (/Users/guolidong/Documents/GitHub/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  /Users/guolidong/Documents/GitHub/caliper/src/fabric/e2eUtils.js:546
  async function invokebycontext(context, id, version, args, timeout){
        ^^^^^^^^
  SyntaxError: Unexpected token function
      at Object.exports.runInThisContext (vm.js:76:16)
      at Module._compile (module.js:542:28)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
      at Module.require (module.js:497:17)
      at require (internal/module.js:20:19)
      at Object.<anonymous> (/Users/guolidong/Documents/GitHub/caliper/src/fabric/fabric.js:12:18)
      at Module._compile (module.js:570:32)

...

1..1

tests 1

pass 0

fail 1

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF

Hi!
After creating channel, i have some problem...
How can I solve this problem?

$ node benchmark/simple/main.js
TAP version 13

#######Caliper Test######

docker-compose -f network/fabric-v11/2-org-2-peer/docker-compose.yaml up -d
Creating orderer.example.com ... done
Creating couchdb.peer0.org1.example.com ... done
Creating ca.org1.example.com ... done
Creating couchdb.peer0.org2.example.com ... done
Creating ca.org2.example.com ... done
Creating couchdb.peer1.org1.example.com ... done
Creating couchdb.peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer1.org2.example.com ... done
Creating peer1.org1.example.com ... done

create mychannel......

ok 1 created mychannel successfully

Sleep 5s......

Join channel......

join mychannel

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:64:15)
at /Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:583:15
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:64:15)
at /Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:583:15
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:64:15)
at /Users/shizuka/caliper2/caliper/node_modules/grpc/src/client.js:583:15
not ok 2 TypeError: Cannot read property 'stack' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'stack' of undefined]
at: process.onetime (/Users/shizuka/caliper2/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'stack' of undefined
      at channels.reduce.then.catch (/Users/shizuka/caliper2/caliper/src/fabric/join-channel.js:216:56)
      at <anonymous>

...

1..2

tests 2

pass 1

fail 1

Using percpu_usage.length can cause invalid CPU statistics

Issue
See the docker documentation:

"If either precpu_stats.online_cpus or cpu_stats.online_cpus is nil then for compatibility with older daemons the length of the corresponding cpu_usage.percpu_usage array should be used."

Relevant code in caliper:

self.stats[id].cpu_percent.push(cpuDelta / sysDelta * stat.cpu_stats.cpu_usage.percpu_usage.length * 100.0);

Extra information
I'd like to note that when falling back on percpu_usage.length it might be that you can have a total of 4 cores and only 2 are in use. So the percpu_usage Array might look like this: [34782342, 358734, 0, 0] in that case using percpu_usage.length will be invalid.
Since you'd always be looking at the maximum amount of cores that could be used. Instead of the amount of cores that are actually used.

Solution
Replace line 218 with:

self.stats[id].cpu_percent.push(cpuDelta / sysDelta * MonitorDocker.coresInUse(stat.cpu_stats) * 100.0);

and add the following methods to the class:

    static coresInUse(cpu_stats) {
        return cpu_stats.online_cpus || MonitorDocker.findCoresInUse(cpu_stats.cpu_usage.percpu_usage || []);
    }

    static findCoresInUse(percpu_usage) {
        percpu_usage = percpu_usage.filter((coreUsage) => {
            if (coreUsage > 0) {
                return (coreUsage)
            }
        });
        return percpu_usage.length;
    }

Fabric eventhub error

It seems that the new version of grpc (v1.11.2, which will be installed when npm install fabric-client) will cause a EventHub error when joining channel

Don't assume relative paths in config-files

The fabric blockchain configuration file expects "relative-to-project-root" paths for certificates. Users should be able to pass absolute paths.

path.join(__dirname, '../..', somepathvalue)

I encountered this when creating a Docker container out of caliper.I mounted my configuration files into a different directory and was faced with a file not found exception even though I provided an absolute path to the files.

An enhancement suggestion, and I'd like to contribute to this project

Hi there,
I'm an intern in Microsoft and I wonder can I try to extend the caliper to support Ethereum and Parity private chains?
And this is the first step, if we can do with Eth and Parity, we can support most rpc platforms like EOS and so on. (My thought, maybe I'm wrong.)
And if I'm allowed, I's be happy to start the work and contribute to caliper!

Best Regards,
Xuyang

Resolve licensing issues discovered by Fossology scan

Context

Hyperledger Caliper source files (from April 3, 2018) were scanned by The Linux Foundation utilizing Fossology to determine license for files contained in the following repositories:

From the Hyperledger Charter (https://www.hyperledger.org/about/charter) Section 13, all files that are included in Hyperledger projects should either be licensed with the Apache License, Version 2.0 for source code or Creative Commons Attribution 4.0 International License for documentation.

Expected Behavior

All files should have license text included either directly or via a LICENSE file in the directory for files that cannot be modified to include a comment with the license text (think binary files).

Actual Behavior

See results of scan: caliper-2018-04.xlsx

Possible Fix

For files with Attribution license, ideally, we would replace those with Apache 2.0 files and dependencies; otherwise, we will need to go to the Hyperledger Governing board for an exception.

For ALL files that do not have a license included, the first step is to check with the contributor to ensure that the file can be released as Apache 2.0 or CC-BY-4.0. If the contributor agrees, the file should be modified to include the license. You can utilize SPDX Identifiers to represent the correct license.

For those non-modifiable files, you will need to include a LICENSE file in the directory containing the license that the files are covered by. Here are a few examples of how this might be done:

  • OPNFV Apex -- this is an example of explicitly calling out Apache 2.0 for source code and CC-BY-4.0 for docs.
  • containerd -- see notice at bottom. This also calls out the separate Apache / CC-BY-4.0 docs, and explicitly references the "docs" directory.

Steps to Reproduce

Run the code through Fossology (contact tkuhrt at linuxfoundation dot org) to have the source re-run after the modifications.

Cannot find module './api.js'

Hello, I updated the project but meet the error "Cannot find module './api.js'". Then I try to reinstall the tape-promise package but it doesn't work. How could I fix this problem? Tks~

Btw, I think that create a new branch for developing is better.

Here is the details of the error:

# #######Caliper Test######
not ok 1 Error: Cannot find module './api.js'
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      { [Error: Cannot find module './api.js'] code: 'MODULE_NOT_FOUND' }
    at: Test.onetime [as end] (/home/hatuw/Documents/deployBC/hyperledger/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
    stack: |-
      Error: Cannot find module './api.js'
          at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
          at Function.Module._load (internal/modules/cjs/loader.js:475:25)
          at Module.require (internal/modules/cjs/loader.js:598:17)
          at require (internal/modules/cjs/helpers.js:11:18)
          at Object.<anonymous> (/home/hatuw/Documents/deployBC/hyperledger/caliper/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:19:11)
          at Module._compile (internal/modules/cjs/loader.js:654:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
          at Module.load (internal/modules/cjs/loader.js:566:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
          at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  ...

1..1
# tests 1
# pass  0
# fail  1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.