【转载】【爬坑记录】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 / 开源框架 / 网络爬虫 早 ...
随机推荐
- c#基础综述
一个相关的博客:http://blog.csdn.net/zhang_xinxiu/article/details/8605980 很好的一个网站:http://www.runoob.com/
- MVC5中EF6 Code First启动慢及间隙变慢的一些优化处理
问题描述: 第一次访问的时候很慢,后面再次打开页面很快,过了一段时间不访问页面然后再次打开页面又像第一次那样很慢. 采用的技术和环境: 使用技术:EF6+MVC5 服务器环境:Windows 2012 ...
- Oracle修改字段名、字段数据类型
语句:alter table tableName rename column oldCName to newCName; -- 修改字段名alter table tableName modify (c ...
- 【集成学习】lightgbm参数介绍(sklearn)
# XGBoost和LightGBM部分参数对比表: lightgbm.sklearn参数介绍(官网)
- NYOJ-求逆序数 ----------------待解决,WA
描述 在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序.一个排列中逆序的总数就称为这个排列的逆序数. 现在,给你一个N个元素的序列,请你判断出它的逆序数 ...
- 基于C#的数据库文件管理助手2018-09-02
数据库文件管理助手说明 目录 一. 数据库的文件导出2 1. web格式 2 2. winform格式 5 3. 二进制格式 5 二. 文件批量工具8 1. 文件批量改名GUID 8 2. 文件批量下 ...
- HTML a标签如何设置margin属性(转)
很多同学发现对DIV有效的许多CSS属性对<a>或<p>标签都无效,好比说 <div style="margin-top:5px;"></ ...
- ViewModel中C# Property自动添加OnPropertyChanged处理的小工具, 以及相应Python知识点
在做WPFMVVM中经常会遇到一些Model.ViewModel的属性添加添加私有字段和更改通知方法来支持Binding. 比如把: public class Test { public s ...
- debian上安装codeblocks
1.查看linux的版本uname -a 2.在官网上下载稳定版的codeblocks(www.codeblocks.org) 3.解压codeblocks后,进入到文件夹中用root身份执行dpkg ...
- C#添加修改控件css样式
一.添加属性 MyStyleSheet.Attributes.Add("href","/css/flostyle.css") 二.改变css样式 if (use ...