PostList

2018년 8월 10일 금요일

Error: Error trying install business network. Error: No valid responses from any peers.


Problem:

Error: Error trying install business network. Error: No valid responses from any peers.



Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed



Solution:

This problem can happen when you install Docker by using Docker-Toolbox.
Default localhost IP is not 0.0.0.0
Therefore, you need to change the localhost IP in the connection.json file

1. Check your default docker IP.

docker-machine ip default

e.g.
Haans-MBP:dist haanmo$ docker-machine ip default

192.168.99.100

2. Go to the folder containing connection.json file
e.g.

cd /Users/haanmo/.composer/cards/PeerAdmin@hlfv1/connection.json 

3. change localhost (or 0.0.0.0) addresses to default IP (in my case, 192.168.99.100)
e.g. (check the IP addresses of peer, ca, etc)
{"name":"hlfv1","x-type":"hlfv1","x-commitTimeout":300,"version":"1.0.0","client":{"organization":"Org1","connection":{"timeout":{"peer":{"endorser":"300","eventHub":"300","eventReg":"300"},"orderer":"300"}}},"channels":{"composerchannel":{"orderers":["orderer.example.com"],"peers":{"peer0.org1.example.com":{}}}},"organizations":{"Org1":{"mspid":"Org1MSP","peers":["peer0.org1.example.com"],"certificateAuthorities":["ca.org1.example.com"]}},"orderers":{"orderer.example.com":{"url":"grpc://192.168.99.100:7050"}},"peers":{"peer0.org1.example.com":{"url":"grpc://192.168.99.100:7051","eventUrl":"grpc://192.168.99.100:7053"}},"certificateAuthorities":{"ca.org1.example.com":{"url":"http://192.168.99.100:7054","caName":"ca.org1.example.com"}}}

4. install the network again.
e.g.
Haans-MBP:dist haanmo$ composer network install -a test-bna\@0.0.1.bna -c PeerAdmin@hlfv1
Installing business network. This may take a minute...
Successfully installed business network test-bna, version 0.0.1


Command succeeded


ref:
docker tutorial
https://docker-curriculum.com/

댓글 없음:

댓글 쓰기