hyperledger-archives / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions
Apache License 2.0
74 stars 24 forks source link

running node main.js #41

Closed VemiReddyN closed 6 years ago

VemiReddyN commented 6 years ago

when i am running node main.js i am facing channel creation problem

I changed fabric.json with hyperledger/fabric-samples/first-network

vi /opt/caliper/benchmark/simple/fabric.json

{ "fabric": { "cryptodir": "network/fabric/first-network/crypto-config", "network": { "orderer": { "url": "grpc://orderer.example.com:7050", "mspid": "OrdererMSP", "msp": "network/fabric/first-network/crypto-config/ordererOrganizations/example.com/msp/", "server-hostname": "orderer.example.com", "tls_cacerts": "network/fabric/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt" }, "org1": { "name": "org1", "mspid": "Org1MSP", "msp": "network/fabric/first-network/crypto-config/peerOrganizations/org1.example.com/msp/", "ca": { "url": "https://localhost:7054", "name": "ca-org1" }, "peer1": { "requests": "grpc://peero.org1.example.com:7051", "events": "grpc://peer0.org1.example.com:7053", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "network/fabric/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, "peer2": { "requests": "grpc://peer1.org1.example.com:7051", "events": "grpc://peer1.org1.example.com:7053", "server-hostname": "peer1.org1.example.com", "tls_cacerts": "network/fabric/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" } }, "org2": { "name": "org2", "mspid": "Org2MSP", "msp": "network/fabric/first-network/crypto-config/peerOrganizations/org2.example.com/msp/", "ca": { "url": "https://localhost:8054", "name": "ca-org2" },

Error :

create channels

__dirname: /opt/caliper/src/fabric: caRootsPath: network/fabric/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt channels: before new Client creation

create channel......

org name: org1 error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/opt/caliper/node_modules/grpc/src/client.js:255:19)\n at ClientDuplexStream._receiveStatus (/opt/caliper/node_modules/grpc/src/client.js:233:8)\n at /opt/caliper/node_modules/grpc/src/client.js:757:12" not ok 1 Failed to create channels Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/opt/caliper/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/opt/caliper/node_modules/grpc/src/client.js:258:12) at ClientDuplexStream._receiveStatus (/opt/caliper/node_modules/grpc/src/client.js:233:8) at /opt/caliper/node_modules/grpc/src/client.js:757:12

operator: fail
at: channels.reduce.then.then.catch (/opt/caliper/src/fabric/create-channel.js:168:19)
stack: |-
  Error: Failed to create channels Error: SERVICE_UNAVAILABLE
      at ClientDuplexStream.<anonymous> (/opt/caliper/node_modules/fabric-client/lib/Orderer.js:128:21)
      at emitOne (events.js:96:13)
      at ClientDuplexStream.emit (events.js:188:7)
      at ClientDuplexStream._emitStatusIfDone (/opt/caliper/node_modules/grpc/src/client.js:258:12)
      at ClientDuplexStream._receiveStatus (/opt/caliper/node_modules/grpc/src/client.js:233:8)
      at /opt/caliper/node_modules/grpc/src/client.js:757:12
      at Test.assert [as _assert] (/opt/caliper/node_modules/tape/lib/test.js:212:54)
      at Test.bound [as _assert] (/opt/caliper/node_modules/tape/lib/test.js:64:32)
      at Test.fail (/opt/caliper/node_modules/tape/lib/test.js:277:10)
      at Test.bound [as fail] (/opt/caliper/node_modules/tape/lib/test.js:64:32)
      at channels.reduce.then.then.catch (/opt/caliper/src/fabric/create-channel.js:168:19)
      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/caliper/src/fabric/create-channel.js:170:31) at process._tickCallback (internal/process/next_tick.js:103:7) unexpected error, Error: Fabric: Create channel failed at channels.reduce.then.then.catch (/opt/caliper/src/fabric/create-channel.js:170:31) at process._tickCallback (internal/process/next_tick.js:103:7)

1..1

tests 1

pass 0

fail 1

haojun commented 6 years ago

Did you enable TLS in the first-network? If yes, you should use 'grpcs' instead of 'grpc' in the configuration

haojun commented 6 years ago

Duplicate #40