Reputation: 447
I'm trying to deploy a multiple organisations to Hyperledger fabric by following this tutorial -> https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org
Everything works as expected until I try to start the network:
composer network start -l "DEBUG" -c PeerAdmin@byfn-network-org1 -n block-aviation-network -V 0.0.1 -o endorsementPolicyFile=./tmp/composer/endorsement-policy.json -A SimonOrg1 -C SimonOrg1/admin-pub.pem -A SimonOrg2 -C SimonOrg2/admin-pub.pem -A SimonOrg3 -C SimonOrg3/admin-pub.pem
after which I get the following error:
error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed
I had a look a the following link (https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--composer-network-start-issues) which suggested to add the following as enviroment variable to the containers:
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
But I still go the same error as detailed above.
peer-base.yaml
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_blockaviation
#- CORE_LOGGING_LEVEL=ERROR
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
docker-compose-base.yaml
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
orderer.blockaviation.com:
container_name: orderer.blockaviation.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/blockaviation.com/orderers/orderer.blockaviation.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/blockaviation.com/orderers/orderer.blockaviation.com/tls/:/var/hyperledger/orderer/tls
ports:
- ${IP}:7050:7050
peer0.org1.blockaviation.com:
container_name: peer0.org1.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.blockaviation.com
- CORE_PEER_ADDRESS=peer0.org1.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.blockaviation.com/peers/peer0.org1.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.blockaviation.com/peers/peer0.org1.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:7051:7051
- ${IP}:7053:7053
peer1.org1.blockaviation.com:
container_name: peer1.org1.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org1.blockaviation.com
- CORE_PEER_ADDRESS=peer1.org1.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.blockaviation.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.blockaviation.com/peers/peer1.org1.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.blockaviation.com/peers/peer1.org1.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:8051:7051
- ${IP}:8053:7053
peer0.org2.blockaviation.com:
container_name: peer0.org2.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.blockaviation.com
- CORE_PEER_ADDRESS=peer0.org2.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.blockaviation.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.blockaviation.com/peers/peer0.org2.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.blockaviation.com/peers/peer0.org2.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:9051:7051
- ${IP}:9053:7053
peer1.org2.blockaviation.com:
container_name: peer1.org2.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.blockaviation.com
- CORE_PEER_ADDRESS=peer1.org2.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.blockaviation.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.blockaviation.com/peers/peer1.org2.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.blockaviation.com/peers/peer1.org2.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:10051:7051
- ${IP}:10053:7053
# ORGANISATION THREE
peer0.org3.blockaviation.com:
container_name: peer0.org3.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org3.blockaviation.com
- CORE_PEER_ADDRESS=peer0.org3.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.blockaviation.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org3MSP
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org3.blockaviation.com/peers/peer0.org3.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org3.blockaviation.com/peers/peer0.org3.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:11051:7051
- ${IP}:11053:7053
peer1.org3.blockaviation.com:
container_name: peer1.org3.blockaviation.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org3.blockaviation.com
- CORE_PEER_ADDRESS=peer1.org3.blockaviation.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org3.blockaviation.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org3.blockaviation.com:7051
- CORE_PEER_LOCALMSPID=Org3MSP
#- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
- CORE_CHAINCODE_STARTUPTIMEOUT=2400s
- CORE_CHAINCODE_EXECUTETIMEOUT=1600s
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org3.blockaviation.com/peers/peer1.org3.blockaviation.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org3.blockaviation.com/peers/peer1.org3.blockaviation.com/tls:/etc/hyperledger/fabric/tls
ports:
- ${IP}:12051:7051
- ${IP}:12053:7053
Commands used to deploy network:
mkdir channel-artifacts crypto-config
bash byfn.sh -m generate
bash byfn.sh -m up -s couchdb -a -t 5
mkdir -p ./tmp/composer/org1
mkdir -p ./tmp/composer/org2
mkdir -p ./tmp/composer/org3
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' crypto-config/peerOrganizations/org1.blockaviation.com/peers/peer0.org1.blockaviation.com/tls/ca.crt > ./tmp/composer/org1/ca-org1.txt
caOrg1="$(<./tmp/composer/org1/ca-org1.txt)"
echo "$caOrg1"
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' crypto-config/peerOrganizations/org2.blockaviation.com/peers/peer0.org2.blockaviation.com/tls/ca.crt > ./tmp/composer/org2/ca-org2.txt
caOrg2="$(<./tmp/composer/org2/ca-org2.txt)"
echo "$caOrg2"
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' crypto-config/peerOrganizations/org3.blockaviation.com/peers/peer0.org3.blockaviation.com/tls/ca.crt > ./tmp/composer/org3/ca-org3.txt
caOrg3="$(<./tmp/composer/org3/ca-org3.txt)"
echo "$caOrg3"
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' crypto-config/ordererOrganizations/blockaviation.com/orderers/orderer.blockaviation.com/tls/ca.crt > ./tmp/composer/ca-orderer.txt
caOrderer="$(<./tmp/composer/ca-orderer.txt)"
echo "$caOrderer"
export ORG1=./crypto-config/peerOrganizations/org1.blockaviation.com/users/[email protected]/msp
cp -p $ORG1/signcerts/A*.pem ./tmp/composer/org1
cp -p $ORG1/keystore/*_sk ./tmp/composer/org1
export ORG2=./crypto-config/peerOrganizations/org2.blockaviation.com/users/[email protected]/msp
cp -p $ORG2/signcerts/A*.pem ./tmp/composer/org2
cp -p $ORG2/keystore/*_sk ./tmp/composer/org2
export ORG3=./crypto-config/peerOrganizations/org3.blockaviation.com/users/[email protected]/msp
cp -p $ORG3/signcerts/A*.pem ./tmp/composer/org3
cp -p $ORG3/keystore/*_sk ./tmp/composer/org3
touch ./tmp/composer/org1/byfn-network-org1.json
touch ./tmp/composer/org2/byfn-network-org2.json
touch ./tmp/composer/org3/byfn-network-org3.json
composer card create -p ./tmp/composer/org1/byfn-network-org1.json -u PeerAdmin -c ./tmp/composer/org1/[email protected] -k ./tmp/composer/org1/*_sk -r PeerAdmin -r ChannelAdmin -f [email protected]
composer card create -p ./tmp/composer/org2/byfn-network-org2.json -u PeerAdmin -c ./tmp/composer/org2/[email protected] -k ./tmp/composer/org2/*_sk -r PeerAdmin -r ChannelAdmin -f [email protected]
composer card create -p ./tmp/composer/org3/byfn-network-org3.json -u PeerAdmin -c ./tmp/composer/org3/[email protected] -k ./tmp/composer/org3/*_sk -r PeerAdmin -r ChannelAdmin -f [email protected]
composer card import -f [email protected] --card PeerAdmin@byfn-network-org1
composer card import -f [email protected] --card PeerAdmin@byfn-network-org2
composer card import -f [email protected] --card PeerAdmin@byfn-network-org3
composer network install --card PeerAdmin@byfn-network-org1 --archiveFile ../BlockAviation/dist/block-aviation-network.bna
composer network install --card PeerAdmin@byfn-network-org2 --archiveFile ../BlockAviation/dist/block-aviation-network.bna
composer network install --card PeerAdmin@byfn-network-org3 --archiveFile ../BlockAviation/dist/block-aviation-network.bna
touch ./tmp/composer/endorsement-policy.json
cat << EOF > ./tmp/composer/endorsement-policy.json
{
"identities": [
{
"role": {
"name": "member",
"mspId": "Org1MSP"
}
},
{
"role": {
"name": "member",
"mspId": "Org2MSP"
}
}
],
"policy": {
"2-of": [
{
"signed-by": 0
},
{
"signed-by": 1
}
]
}
}
EOF
composer identity request -c PeerAdmin@byfn-network-org1 -u admin -s adminpw -d SimonOrg1
composer identity request -c PeerAdmin@byfn-network-org2 -u admin -s adminpw -d SimonOrg2
composer identity request -c PeerAdmin@byfn-network-org2 -u admin -s adminpw -d SimonOrg3
composer network start -l "DEBUG" -c PeerAdmin@byfn-network-org1 -n block-aviation-network -V 0.0.1 -o endorsementPolicyFile=./tmp/composer/endorsement-policy.json -A SimonOrg1 -C SimonOrg1/admin-pub.pem -A SimonOrg2 -C SimonOrg2/admin-pub.pem -A SimonOrg3 -C SimonOrg3/admin-pub.pem
I had a look at the logs of my docker containers but I couldn't see any obvious errors. (see log for peer0.org1)
2018-04-27 13:47:43.662 UTC [dockercontroller] Start -> DEBU 8d6 start-could not find image <dev-peer0.org1.blockaviation.com-block-aviation-network-0.0.1-31fe9b4f843162ae50dcbb6bf4911fbdd8769fb314de85411475e43ee76433db> (container id <dev-peer0.org1.blockaviation.com-block-aviation-network-0.0.1>), because of <no such image>...attempt to recreate image
2018-04-27 13:47:43.663 UTC [chaincode-platform] generateDockerfile -> DEBU 8d7
FROM hyperledger/fabric-baseimage:x86_64-0.4.6
ADD binpackage.tar /usr/local/src
LABEL org.hyperledger.fabric.chaincode.id.name="block-aviation-network" \
org.hyperledger.fabric.chaincode.id.version="0.0.1" \
org.hyperledger.fabric.chaincode.type="NODE" \
org.hyperledger.fabric.version="1.1.0" \
org.hyperledger.fabric.base.version="0.4.6"
ENV CORE_CHAINCODE_BUILDLEVEL=1.1.0
2018-04-27 13:47:43.745 UTC [util] DockerBuild -> DEBU 8d8 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.1.0
2018-04-27 13:52:29.809 UTC [gossip/discovery] getDeadMembers -> WARN 8d9 Haven't heard from [10 94 61 126 168 3 233 141 146 255 32 24 59 157 112 91 199 47 185 79 219 186 21 43 174 78 212 36 58 249 239 248] for 26.6482049s
One thing I did notice was that my fabric-ccenv containers were running in my bridge network rather than in my ba_multi_org_blockaviation network with all my other containers.
NETWORK DETAILS:
BA_multi_org simonmullaney$ docker network list
NETWORK ID NAME DRIVER SCOPE
dfc17755fb97 ba_multi_org_blockaviation bridge local
f79a2359276a bridge bridge local
1ea87e9a0bb4 host host local
e22f1c0f8ead none null local
Simons-MBP:BA_multi_org simonmullaney$ docker inspect dfc17755fb97
[
{
"Name": "ba_multi_org_blockaviation",
"Id": "dfc17755fb97e219bfb0d3069a95f1760e5a914e0bb596613b6b266e6880d080",
"Created": "2018-04-30T14:02:57.360711604Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0b954d9968aa160918b7672cb5bc07423cd1cd703973c6677f1c82d9fdfd057c": {
"Name": "couchdb3",
"EndpointID": "7aeed72f86e46e445753e5726abe53bec188eeef0ac30c2497e64e27cff24294",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"0f753b1cdd3ae2f864e22d5bc8e0dfbb944d703af0f848ac118e36029779af38": {
"Name": "peer0.org1.blockaviation.com",
"EndpointID": "3af255d328a9390a29e96617d451ed2d6b843dca5a88b6778c6234a02fd45d5b",
"MacAddress": "02:42:ac:12:00:0d",
"IPv4Address": "172.18.0.13/16",
"IPv6Address": ""
},
"2164fbac12736d56caef42644d07e381526020f6d4dcaddeea9c475a0a02f967": {
"Name": "couchdb0",
"EndpointID": "dfb0fbabf68cd8a1d1c29213dbb04e541bf855d54bd4e8aa748c67564d937db1",
"MacAddress": "02:42:ac:12:00:08",
"IPv4Address": "172.18.0.8/16",
"IPv6Address": ""
},
"353acf5a6f4b290b5b300f315f6a30a12dd23024c08fa2ae9b9966f4efc92d30": {
"Name": "peer1.org1.blockaviation.com",
"EndpointID": "e03fd033311a7516a5d5d9a89153eb45eba090bd73a4eb78f2bb4e7d45b7e9e9",
"MacAddress": "02:42:ac:12:00:0f",
"IPv4Address": "172.18.0.15/16",
"IPv6Address": ""
},
"4f50fa5e3e68b10b792b5f466b939c26e748688a57fa117288a1bd6f0c8d5223": {
"Name": "couchdb5",
"EndpointID": "cf77a071036f7bca03358a5536490f7c34755ad393556195a7107de2d80c6708",
"MacAddress": "02:42:ac:12:00:07",
"IPv4Address": "172.18.0.7/16",
"IPv6Address": ""
},
"55952da16c664679e75c5c33e2ec7d45ba20d6c6179cc68d6238c7d9af41c077": {
"Name": "ca_peerOrg3",
"EndpointID": "7055948f7462b637105dcc1b53d37d2e0a005b98503fec3503c465daa1dc9740",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/16",
"IPv6Address": ""
},
"5e489993cb67bfd1df5ec7b30dbf4a463618957e8077b5463345564fc7928763": {
"Name": "ca_peerOrg1",
"EndpointID": "831a19a12cecf3b0e89443d50c70838688b14fb02e9a75ecdc7a8e51d93c9fef",
"MacAddress": "02:42:ac:12:00:0b",
"IPv4Address": "172.18.0.11/16",
"IPv6Address": ""
},
"63708fe8a9eb09619f57af9c95b63ddbb16bc196fd8ff74f3a4b6b3170149381": {
"Name": "peer1.org3.blockaviation.com",
"EndpointID": "b9095de16ce6e9e73bfa751d6058ea441cd45cf5dac8e48ad902e22adcd6fcfb",
"MacAddress": "02:42:ac:12:00:11",
"IPv4Address": "172.18.0.17/16",
"IPv6Address": ""
},
"8620a474e5c9886cc6274d708c97afd417e443c1b6d7857ff5a2c04e580a4210": {
"Name": "peer0.org2.blockaviation.com",
"EndpointID": "e452971c532f04c70b71922e86ba36941e0972099c96d8008fa93b9a8253f5bb",
"MacAddress": "02:42:ac:12:00:0c",
"IPv4Address": "172.18.0.12/16",
"IPv6Address": ""
},
"89d7f5261bb4bcbe90a1b3169aa0e3f8875dcc448ae9c7a45c50b7d51fbc75df": {
"Name": "couchdb4",
"EndpointID": "66164991a57b4ebc557438e2e135f519a43f8de40d93df52f75ed48cd03c6114",
"MacAddress": "02:42:ac:12:00:09",
"IPv4Address": "172.18.0.9/16",
"IPv6Address": ""
},
"9f66f64f2157e969283273470b1f5f0455cb165309f8bb61d63aa916e6bfd08b": {
"Name": "peer1.org2.blockaviation.com",
"EndpointID": "694966adbd07905d892c276bee84190e10997c2a706daee6db0b9650146421f0",
"MacAddress": "02:42:ac:12:00:10",
"IPv4Address": "172.18.0.16/16",
"IPv6Address": ""
},
"a7ceadc414fd8bc073de5e8d372867e028829203abf5181df7942ce04234fe96": {
"Name": "couchdb1",
"EndpointID": "b0486b4b14d4c9ea1fcdb301a55558be8a9c285dbec0ed33c67141b7550174dc",
"MacAddress": "02:42:ac:12:00:06",
"IPv4Address": "172.18.0.6/16",
"IPv6Address": ""
},
"b77c5432099968d29a56cbde7209c1417de74dd169e79762407ce5da77d4e0d4": {
"Name": "ca_peerOrg2",
"EndpointID": "de9889e88d0dc3f45239cc0a0ee1abe69b0f8aaf60419a6d3f92a5ecb89395f2",
"MacAddress": "02:42:ac:12:00:0a",
"IPv4Address": "172.18.0.10/16",
"IPv6Address": ""
},
"bdc461a21b191a09829dd221ab813f9e1233be207b7635e3f081b639ed4fa274": {
"Name": "orderer.blockaviation.com",
"EndpointID": "1a9b37450ae5dacbaf359d3cddefd50acfc75f30b9d8015c334f3633956a471a",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
},
"e4aeefaab1196824207f1a595635404c049ae15abacb773df8627d18876489b4": {
"Name": "couchdb2",
"EndpointID": "60b95f8970185d2329173634d2a393b2da31c368f893c674097f87d65ace1905",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/16",
"IPv6Address": ""
},
"ead8ab6770df47b51dcbeb4914c8eb9265cfd7c5c799ff49918a044945ff9171": {
"Name": "peer0.org3.blockaviation.com",
"EndpointID": "e9875505aff36628f7dad492e2158fa82ec3291272b32f5b9507cda425888bd2",
"MacAddress": "02:42:ac:12:00:0e",
"IPv4Address": "172.18.0.14/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
Simons-MBP:BA_multi_org simonmullaney$ docker inspect f79a2359276a
[
{
"Name": "bridge",
"Id": "f79a2359276a533a516898109067f3f1f70188727d3c19322a74b51476c7ed8f",
"Created": "2018-04-30T11:32:09.941991502Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0ec4fe0586842b1562f7dbe5dc442922df8d298169a25c54515190764ec45f38": {
"Name": "zealous_babbage",
"EndpointID": "49b4949cf9bb5239d3ce94b6c8d436548178b33b0007b0c2ea78515c9ca50391",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
},
"3b0b44a65ad6e945d0a684d10fc2d118ac778a3fc1bd456595f03f9f6ecea78b": {
"Name": "friendly_curie",
"EndpointID": "13160d1d380da4f485fab930938acadfc80867704fec93d50e4af647d63d5578",
"MacAddress": "02:42:ac:11:00:05",
"IPv4Address": "172.17.0.5/16",
"IPv6Address": ""
},
"b8c6137baa9f53dafca0f20a75245ebf3f376c117a46d5004342186d303a9e05": {
"Name": "ecstatic_cray",
"EndpointID": "7dd9ddcf3f63b0b0c8ce3397ca98f7e41e7c3bb1b4e4edfda47899948f97f90b",
"MacAddress": "02:42:ac:11:00:04",
"IPv4Address": "172.17.0.4/16",
"IPv6Address": ""
},
"c0e3a87b4b919d81fa2acea85dd14b71a589cd1b0eb92eb01c4e0695a431f9cf": {
"Name": "pedantic_hodgkin",
"EndpointID": "b614ee5cbbb708b43b71a52a6aec2069392d4b64d61f5135d88d233ba98b73ac",
"MacAddress": "02:42:ac:11:00:03",
"IPv4Address": "172.17.0.3/16",
"IPv6Address": ""
},
"c5a8a0d3f76be59635b09c421445337f1ed0436e4a056c7601c8e38abc11e975": {
"Name": "wonderful_hawking",
"EndpointID": "a0b08e0921662f6ea1d3e77d2eb0c99e7fd97ad98286e09b635c3fef9d8f459f",
"MacAddress": "02:42:ac:11:00:06",
"IPv4Address": "172.17.0.6/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
Composer v0.19.1
Fabric v1.1.0
Upvotes: 0
Views: 1220
Reputation: 5570
Thanks for all the details.
Error: 14 UNAVAILABLE: Connect Failed
This is an error I have previously associated with errors in the connection.json file, with the CLI being unable to 'find' the Fabric containers - usually because they are not started. It is worth checking the connection.json file that you have the correct addresses, but I assume you have succeeded with composer network install
for each of the Orgs.
This is a connection failure so you could well be on the right lines with the Docker networking.
Docker containers run on the default bridge unless you specify something different. You set the network within the docker compose .yaml file, or on the docker run command line.
You can use docker inspect bridge
and docker inspect ba_multi_org_blockaviation
to see which containers are on which network.
You can also start a shell session on any container e.g. docker exec -it peer0.org1.example.com /bin/sh
and then use wget
to test connectivity on different addresses and ports - this should help identify the connection problem.
wget is not the perfect network testing tool, but it is installed already in the Fabric containers! I would suggest trying these examples on your ubuntu host machine to get a feel for successful and failed connections:
wget www.ibm.com:80
wget www.ibm.com:9999
wget bad.bad.bad
Then from within the various containers try commands such as
wget peer0.org1.example.com:7051
wget peer0.org1.example.com:7053
If you see wget errors such error "(Connection reset by peer)" that is actually a success for our simple addressing/port/connectivity test ! (we don't really want a web get we just want to know we can 'hit' the other address/port)
Upvotes: 1