【转载】【爬坑记录】hyperledger caliper 性能测试工具使用的一些问题记录
原文: https://blog.csdn.net/raogeeg/article/details/82752613
安装方法详见:https://github.com/hyperledger/caliper
hyperledger caliper 使用过程的一些坑以及解决办法
not ok 2 Failed to join peers, TypeError: Cannot read property ‘getConnectivityState’ of undefined at EventHub._checkConnection
# 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/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:479:39) at EventHub.registerBlockEvent (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:658:8) at Promise (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:139:20) at new Promise (<anonymous>) at eventhubs.forEach (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:136:29) at Array.forEach (<anonymous>) at Client.newDefaultKeyValueStore.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:135:19) at <anonymous>
---
operator: fail
at: channels.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:215:19)
stack: |-
Error: Failed to join peers, TypeError: Cannot read property 'getConnectivityState' of undefined
at EventHub._checkConnection (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:479:39)
at EventHub.registerBlockEvent (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/EventHub.js:658:8)
at Promise (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:139:20)
at new Promise (<anonymous>)
at eventhubs.forEach (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:136:29)
at Array.forEach (<anonymous>)
at Client.newDefaultKeyValueStore.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:135:19)
at <anonymous>
at Test.assert [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at Test.fail (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at channels.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:215:19)
at <anonymous>
...
fabric.init() failed, Error: Fabric: Join channel failed
at channels.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:216:31)
at <anonymous>
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: Join channel failed
at channels.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/join-channel.js:216:31)
at <anonymous>
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
/Users/rjj/go/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.<anonymous> (/Users/rjj/go/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/rjj/go/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:1276:19)
at InterceptingListener.recvMessageWithContext (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:603:19)
at /Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/grpc/src/client_interceptors.js:702:14
解决方法:
使用grpc version 1.10.1 代替之前的1.13.1版本
npm install grpc@1.10.1
2:not ok 1 Failed to create channels Error: create status is BAD_REQUEST at channel.organizations.reduce.then.then.then
# create mychannel......
not ok 1 Failed to create channels Error: create status is BAD_REQUEST at channel.organizations.reduce.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:145:43) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
---
operator: fail
at: channels.reduce.then.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:159:19)
stack: |-
Error: Failed to create channels Error: create status is BAD_REQUEST
at channel.organizations.reduce.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:145:43)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Test.assert [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at Test.fail (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at channels.reduce.then.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:159: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/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:160:31)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: Create channel failed
at channels.reduce.then.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/create-channel.js:160:31)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)```
解决办法:
和之前搭建fabric环境遇到的问题一样,BAD_REQUEST 经常是当前要创建的channel 已经存在所以会出现这个错误,
我们可以通过docker rm -f $(docker ps -q -a)
移除之前的容器,但是如果不是channnel 已存在的问题 ,暂时就不知道怎么解决了
error: [Peer.js]: sendProposal - timed out after:120000
# Instantiate chaincode......
error: [Peer.js]: sendProposal - timed out after:120000
error: [Peer.js]: sendProposal - timed out after:120000
error: [Peer.js]: sendProposal - timed out after:120000
error: [Peer.js]: sendProposal - timed out after:120000
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
not ok 4 Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at Client.newDefaultKeyValueStore.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:372:19) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) at Client.newDefaultKeyValueStore.then.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:385:15) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
---
operator: fail
at: chaincodes.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:60:19)
stack: |-
Error: Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...
at Client.newDefaultKeyValueStore.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:372:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Client.newDefaultKeyValueStore.then.then.then.then.then (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:385:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Test.assert [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at Test.fail (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/Users/rjj/go/src/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
at chaincodes.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:60:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
...
fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:61:31)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/Users/rjj/go/src/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:61:31)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
解决办法:
这个问题算是比较坑的了,在网上找了很久,看到github 有一个一样的问题
https://github.com/hyperledger/caliper/issues/137
有一条评论提到,因为机器性能问题,开启的peer 较多,两分钟不足以在本机上实例化chaincode 但是照着上面的方式修改了
文件:github.com/hyperledger/caliper/src/fabric/e2eUtils.js#211中的request_time 时间
运行后还是没有解决这个问题,经过一天时间,巧合看到一篇文章提到修改文件:github.com/hyperledger/caliper/node_modules/fabric-client/config/default.json
配置文件中的request_time 运行成功
---------------------
作者:PoormaJin
来源:CSDN
原文:https://blog.csdn.net/raogeeg/article/details/82752613
版权声明:本文为博主原创文章,转载请附上博文链接!
【转载】【爬坑记录】hyperledger caliper 性能测试工具使用的一些问题记录的更多相关文章
- 【转载】8.2.1 CPU性能测试工具
(KVM连载) 8.2.1 CPU性能测试工具 01/08/2013master 1 Comment 8.2.1 CPU性能测试工具 CPU是计算机系统中最核心的部件,CPU的性能直接决定了系统的计算 ...
- mybatis-generator 详细配置及使用,爬坑记录
mybatis-generator 详细配置及使用,爬坑记录 提示:如果不成功一定是项目路径和 数据库配置出问题,本篇基于 MySQL 8.0.13,调试没有问题. 如果失败,建议使用相同的项目结构, ...
- 03、Swagger2和Springmvc整合详细记录(爬坑记录)
时间 内容 备注 2018年6月18日 基本使用 spirngmvc整合swagger2 开始之前这个系列博文基本是,在项目的使用中一些模块的内容记录,但是后期逐渐优化,不单单是整合内容. swagg ...
- centos7安装Mysql爬坑记录
centos7安装Mysql爬坑记录 查看是否已安装 使用下列命令查看是否已经安装过mysql/mariadb/PostgreSQL 如果未安装,不返回任何结果(ECS的centos镜像默认未安装 ...
- elasticsearch 单节点搭建与爬坑记录
elasticsearch 单节点搭建与爬坑记录 prepare 虚拟机或者云服务器(这里用的是阿里云ECS) linux---centos7 安装完毕的jdk 相应的安装包(在https:/ ...
- [转载]性能测试工具 2 步解决 too many open files 的问题,让服务器支持更多连接数
[转载]性能测试工具 2 步解决 too many open files 的问题,让服务器支持更多连接数 大话性能 · 2018年10月09日 · 最后由 大话性能 回复于 2018年10月09日 · ...
- 网络性能测试工具iperf详细使用图文教程【转载】
原文:http://blog.163.com/hlz_2599/blog/static/142378474201341341339314/ 参考:http://man.linuxde.net/iper ...
- Apache性能测试工具ab使用详解~转载
Apache自带性能测试工具ab使用详解 一. Apache的下载 1. http://www.apache.org/,进入Apache的官网 2. 将页面拖到最下方“Apache Project L ...
- 【转载】python3安装scrapy之windows32位爬坑
python3安装scrapy之windows32位爬坑 原创 2016年11月06日 01:38:08 标签: scrapy / windows / python / 开源框架 / 网络爬虫 早 ...
随机推荐
- django1.8.3搭建博客——1
系统:elementary os python 2.7.6 django 1.8.3 1.安装django 先安装pip sudo apt-get install python3-pip 安装dj ...
- 分布式系统的Raft算法——在失联阶段这个老Leader的任何更新都不能算commit,都回滚,接受新的Leader的新的更新 意味着还是可能丢数据!!!
过去, Paxos一直是分布式协议的标准,但是Paxos难于理解,更难以实现,Google的分布式锁系统Chubby作为Paxos实现曾经遭遇到很多坑. 来自Stanford的新的分布式协议研究称为R ...
- Git_学习_05_ 解决冲突
二.参考资料 1.使用git pull文件时和本地文件冲突怎么办? 2.git 冲突解决
- PHP如何得到数组最后元素的key
1.array_keys(end($arr)) $array = array( 'one'=>1, 'two'=>2, 'three'=>3, 'four'=>4, ); $a ...
- Mex混合编程专题二:MEX Hello Word
VS2010中写mex入门级工程代码 接着上一篇文章的工程继续,如下代码: #include "stdafx.h" #include "mextest.h" # ...
- 【leetcode刷题笔记】Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shor ...
- 使用TRY CATCH进行SQL Server异常处理
TRY...CATCH是Sql Server 2005/2008令人印象深刻的新特性.提高了开发人员异常处理能力.没有理由不尝试一下Try.. Catch功能. * TRY 块 - 包含可能 ...
- delphi 线程教学第二节:在线程时空中操作界面(UI)
第二节:在线程时空中操作界面(UI) 1.为什么要用 TThread ? TThread 基于操作系统的线程函数封装,隐藏了诸多繁琐的细节. 适合于大部分情况多线程任务的实现.这个理由足够了吧 ...
- Improving Deep Neural Networks 笔记
1 Practical aspects of Deep Learning 1.1 Train/Dev/Test sets 在小样本的机器学习中,可以分为60/20/20. 在大数据训练中,不需要划分很 ...
- HTTP 400 错误 编译器错误消息: CS0016
问题:运行程序时提示http 400错误 解决方法: 去掉勾 尝试将网页发布到本地IIS上,发现出现以下错误: 编译器错误消息: CS0016 解决编译器错误消息: CS0016:方法如下: 一般都是 ...