[root@localhost caliper]# node benchmark/simple/main.js
info: [bench-flow.js]: ####### Caliper Test ######
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.1/2org1peergoleveldb/docker-compose-tls.yaml up -d;sleep 3s
Creating network "2org1peergoleveldb_default" with the default driver
Creating orderer.example.com ... done
Creating ca.org1.example.com ... done
Creating ca.org2.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer0.org1.example.com ... done
info: [create-channel.js]: Creating mychannel...
info: [create-channel.js]: Created mychannel successfully
info: [create-channel.js]: Sleeping 5s...
info: [join-channel.js]: Joining channels...
info: [join-channel.js]: Joining mychannel...
info: [join-channel.js]: Successfully joined peerOrg1's peers to mychannel
info: [join-channel.js]: Successfully joined peerOrg2's peers to mychannel
info: [join-channel.js]: Successfully joined mychannel
info: [install-chaincode.js]: Installing chaincodes...
info: [packager/Node.js]: packaging Node from /opt/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node
info: [packager/Node.js]: packaging Node from /opt/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node
info: [install-chaincode.js]: Installed chaincode marbles successfully in all peers
info: [packager/Node.js]: packaging Node from /opt/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node
info: [packager/Node.js]: packaging Node from /opt/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node
info: [install-chaincode.js]: Installed chaincode simple successfully in all peers
info: [instantiate-chaincode.js]: Instantiating chaincodes...
从这开始错误 错误:[Peer.js]:sendProposal-超时时间:120000 错误:[Peer.js]:sendProposal-超时时间:120000 错误:[client-utils.js]:sendPeersProposal-承诺被拒绝:错误:REQUEST_TIMEOUT 在超时._onTimeout(/opt/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19) 在ontimeout(timers.js:482:11) 在tryOnTimeout(timers.js:317:5) 在Timer.listOnTimeout(timers.js:277:5) 错误:[client-utils.js]:sendPeersProposal-承诺被拒绝:错误:REQUEST_TIMEOUT 在超时._onTimeout(/opt/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19) 在ontimeout(timers.js:482:11) 在tryOnTimeout(timers.js:317:5) 在Timer.listOnTimeout(timers.js:277:5) 错误:[instantiate-chaincode.js]:无法实例化链码:错误:无法发送实例化投标或接收有效响应。响应为空或状态不是200。 在Object.instantiateChaincode(/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19) 在 在process._tickCallback(内部/进程/next_tick.js:188:7) 错误:[fabric.js]:结构链代码安装失败:错误:无法发送实例化投标或接收有效响应。响应为空或状态不是200。 在Object.instantiateChaincode(/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19) 在 在process._tickCallback(内部/进程/next_tick.js:188:7) 错误:[bench-flow.js]:错误:错误:无法发送实例化投标或接收有效响应。响应为空或状态不是200。 在Object.instantiateChaincode(/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19) 在 在process._tickCallback(内部/进程/next_tick.js:188:7) 信息:[demo.js]:[交易信息]-提交:0成功:0失败:0未完成:0 信息:[bench-flow.js]:执行命令:docker-compose -f network / fabric-v1.1 / 2org1peergoleveldb / docker-compose-tls.yaml down; docker rm $(docker ps -aq); docker rmi $ (docker images dev * -q) 正在停止peer0.org1.example.com ...已完成 正在停止peer0.org2.example.com ...已完成 正在停止ca.org2.example.com ...完成 停止orderer.example.com ...完成 正在停止ca.org1.example.com ...完成 删除peer0.org1.example.com ...完成 删除peer0.org2.example.com ...完成 移除ca.org2.example.com ...完成 删除orderer.example.com ...已完成 移除ca.org1.example.com ...完成 删除网络2org1peergoleveldb_default “ docker rm”至少需要1个参数。 请参阅“ docker rm --help”。
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
Remove one or more images
error: [bench-flow.js]: Unsuccessful command execution. Error code: 1. Terminating signal: null
error: [benchmark/simple/main.js]: Error while executing the benchmark: Error: Command failed: docker-compose -f network/fabric-v1.1/2org1peergoleveldb/docker-compose-tls.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping ca.org2.example.com ... done
Stopping orderer.example.com ... done
Stopping ca.org1.example.com ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing ca.org2.example.com ... done
Removing orderer.example.com ... done
Removing ca.org1.example.com ... done
Removing network 2org1peergoleveldb_default
"docker rm" requires at least 1 argument.
See 'docker rm --help'.
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
Remove one or more images
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
答案 0 :(得分:0)
我假设您正在尝试使用Hyperledger卡尺测试网络。尝试使用此命令-
node benchmark/simple/main.js -c yourconfig.json -n yournetwork.json
在'-c'之后是基准测试的配置文件,在'-n'之后是被测系统的配置文件。
对于“简单”基准(上述使用的基准),它是基准/简单下的config.yaml,您可以在/ network文件夹下找到一堆smaple网络。