docker-compose.yml :
membersrvc:
image: hyperledger/fabric-membersrvc
command: membersrvc
vp0:
image: hyperledger/fabric-peer
environment:
- CORE_PER_ID=vp0
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_VM_ENDPOINT=http://0.0.0.0:2375
- CORE_LOGGING_LEVEL=DEBUG
command: sh -c "sleep 5; peer node start --peer-chaincodedev"
vp1:
extends:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
vp2:
extends:
service: vp0
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
and I run (I refered to Fabric chaincode setup page):
Terminal 1 :
$ docker-compose up
Terminal 2 :
$ cd /hyperledger/examples/chaincode/go/chaincode_example02
$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02
Terminal 3 :
$ peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}'
Only terminal 3 shows connection error.
2016/10/21 04:39:15 grpc: addrConn.resetTransport failed to create client
transport: connection error: desc = "transport: dial tcp 0.0.0.0:7051:
getsockopt: connection refused"; Reconnecting to {"0.0.0.0:7051" <nil>}
Error: Error building chaincode: Error trying to connect to local peer:
grpc: timed out when dialing
Please help