connection problem Hyperledger Composer on aws-ec2 and azure - azure

I have made 2 instances by following a tutorial here. One is made in azure and one is made at AWS. I have successfully bridge the connection on the docker instance. When I tried to
composer network install --card PeerAdmin#hlfv1 --archiveFile stock-inquiry#0.0.1.bna
at amazon side, I get
composer network install --card PeerAdmin#hlfv1 --archiveFile stock-inquiry#0.0.1.bna
✖ Installing business network. This may take a minute...
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: Failed to connect before the deadline
Command failed
In azure side it works perfectly.
the logs at docker become like this
2018-12-18 07:48:53.536 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.1.0
Go version: go1.9.2
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.6
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2018-12-18 07:48:53.537 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2018-12-18 07:48:53.538 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2018-12-18 07:48:53.702 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:53.828 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:54.079 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:54.580 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:55.581 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb request in 2s. Attempt:5 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:57.680 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 009 Created state database _users
2018-12-18 07:48:57.711 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a Created state database _replicator
2018-12-18 07:48:57.733 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00b Created state database _global_changes
2018-12-18 07:48:57.741 UTC [kvledger] NewProvider -> INFO 00c ledger provider Initialized
2018-12-18 07:48:57.741 UTC [ledgermgmt] initialize -> INFO 00d ledger mgmt initialized
2018-12-18 07:48:57.741 UTC [peer] func1 -> INFO 00e Auto-detected peer address: 192.168.16.5:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 00f Returning peer0.org1.stock.com:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 010 Auto-detected peer address: 192.168.16.5:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 011 Returning peer0.org1.stock.com:7051
2018-12-18 07:48:57.760 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer0.org1.stock.com
2018-12-18 07:48:57.760 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer0.org1.stock.com:7052
2018-12-18 07:48:57.761 UTC [nodeCmd] createChaincodeServer -> WARN 014 peer.chaincodeListenAddress is not set, using peer0.org1.stock.com:7052
2018-12-18 07:48:57.761 UTC [eventhub_producer] start -> INFO 015 Event processor started
2018-12-18 07:48:57.762 UTC [chaincode] NewChaincodeSupport -> INFO 016 Chaincode support using peerAddress: peer0.org1.stock.com:7052
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 017 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 018 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 019 system chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
2018-12-18 07:48:57.764 UTC [sccapi] registerSysCC -> INFO 01a system chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
2018-12-18 07:48:57.764 UTC [sccapi] registerSysCC -> INFO 01b system chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc) registered
2018-12-18 07:48:57.765 UTC [gossip/service] func1 -> INFO 01c Initialize gossip with endpoint peer0.org1.stock.com:7051 and bootstrap set [127.0.0.1:7051]
2018-12-18 07:48:57.770 UTC [msp] DeserializeIdentity -> INFO 01d Obtaining identity
2018-12-18 07:48:57.773 UTC [gossip/discovery] NewDiscoveryService -> INFO 01e Started { [] [31 57 68 255 217 178 128 85 97 68 93 103 174 51 205 204 50 251 97 123 28 137 101 87 238 45 170 108 159 105 199 220] peer0.org1.stock.com:7051 <nil>} incTime is 1545119337773428448
2018-12-18 07:48:57.773 UTC [gossip/gossip] NewGossipService -> INFO 01f Creating gossip service with self membership of { [] [31 57 68 255 217 178 128 85 97 68 93 103 174 51 205 204 50 251 97 123 28 137 101 87 238 45 170 108 159 105 199 220] peer0.org1.stock.com:7051 <nil>}
2018-12-18 07:48:57.775 UTC [gossip/gossip] NewGossipService -> WARN 020 External endpoint is empty, peer will not be accessible outside of its organization
2018-12-18 07:48:57.778 UTC [gossip/gossip] start -> INFO 021 Gossip instance peer0.org1.stock.com:7051 started
2018-12-18 07:48:57.782 UTC [cscc] Init -> INFO 022 Init CSCC
2018-12-18 07:48:57.782 UTC [sccapi] deploySysCC -> INFO 023 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-18 07:48:57.783 UTC [sccapi] deploySysCC -> INFO 024 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-18 07:48:57.783 UTC [escc] Init -> INFO 025 Successfully initialized ESCC
2018-12-18 07:48:57.783 UTC [sccapi] deploySysCC -> INFO 026 system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-12-18 07:48:57.784 UTC [sccapi] deploySysCC -> INFO 027 system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-12-18 07:48:57.784 UTC [qscc] Init -> INFO 028 Init QSCC
2018-12-18 07:48:57.784 UTC [sccapi] deploySysCC -> INFO 029 system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-12-18 07:48:57.784 UTC [nodeCmd] initSysCCs -> INFO 02a Deployed system chaincodes
2018-12-18 07:48:57.785 UTC [nodeCmd] serve -> INFO 02b Starting peer with ID=[name:"peer0.org1.stock.com" ], network ID=[dev], address=[peer0.org1.stock.com:7051]
2018-12-18 07:48:57.786 UTC [nodeCmd] serve -> INFO 02c Started peer with ID=[name:"peer0.org1.stock.com" ], network ID=[dev], address=[peer0.org1.stock.com:7051]
2018-12-18 07:49:04.193 UTC [ledgermgmt] CreateLedger -> INFO 02d Creating ledger [mychannel] with genesis block
2018-12-18 07:49:04.195 UTC [fsblkstorage] newBlockfileMgr -> INFO 02e Getting block information from block storage
2018-12-18 07:49:04.237 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 02f Created state database mychannel_
2018-12-18 07:49:04.278 UTC [kvledger] CommitWithPvtData -> INFO 030 Channel [mychannel]: Committed block [0] with 1 transaction(s)
2018-12-18 07:49:04.334 UTC [ledgermgmt] CreateLedger -> INFO 031 Created ledger [mychannel] with genesis block
2018-12-18 07:49:04.373 UTC [cscc] Init -> INFO 032 Init CSCC
2018-12-18 07:49:04.373 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 034 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-18 07:49:04.374 UTC [escc] Init -> INFO 035 Successfully initialized ESCC
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 036 system chaincode escc/mychannel(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 037 system chaincode vscc/mychannel(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-12-18 07:49:04.374 UTC [qscc] Init -> INFO 038 Init QSCC
2018-12-18 07:49:04.375 UTC [sccapi] deploySysCC -> INFO 039 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-12-18 07:59:56.451 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 03a Created state database mychannel_lscc
2018-12-18 07:59:56.457 UTC [lscc] executeInstall -> INFO 03b Installed Chaincode [stock-inquiry] Version [0.0.1] to peer
2018-12-18 08:01:31.970 UTC [endorser] ProcessProposal -> ERRO 03c [mychannel][d8bef524] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: d8bef524455b7411da3b169efdf232bf50b8f17a7a7ddb3b4acd25ee413e8ae7
2018-12-18 08:02:45.646 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 03d Created state database mychannel_stock-inquiry
2018-12-18 08:02:45.657 UTC [cceventmgmt] HandleStateUpdates -> INFO 03e Channel [mychannel]: Handling LSCC state update for chaincode [stock-inquiry]
2018-12-18 08:02:45.682 UTC [couchdb] CreateIndex -> INFO 03f Created CouchDB index [selectCommoditiesByOwner] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesByOwnerDoc]
2018-12-18 08:02:45.685 UTC [couchdb] CreateIndex -> INFO 040 Created CouchDB index [selectCommoditiesByProductName] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesByProductNameDoc]
2018-12-18 08:02:45.687 UTC [couchdb] CreateIndex -> INFO 041 Created CouchDB index [selectCommodities] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesDoc]
2018-12-18 08:02:45.690 UTC [couchdb] CreateIndex -> INFO 042 Created CouchDB index [selectCommoditiesWithHighQuantity] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesWithHighQuantityDoc]
2018-12-18 08:02:45.722 UTC [kvledger] CommitWithPvtData -> INFO 043 Channel [mychannel]: Committed block [1] with 1 transaction(s)
2018-12-18 08:02:45.763 UTC [common/deliver] deliverBlocks -> WARN 044 [channel: mychannel] Error sending to 40.74.88.202:38350: rpc error: code = Unknown desc = the stream has been done
Then I continue to develop at azure side hoping to import the business card from azure side to amazon side, maybe then it will work perfectly. So I start creating a new business card and send it to amazon side. after I import the card and try to ping the business card, It gives me this message
Error: Error trying login and get user Context. Error: Error trying to enroll user. Error: Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 52.193.188.33:7054]
Command failed
They cannot ping each other because I haven't enabled ICMP at azure side. I have opened the ports so they can communicate each other.
inbound port settings for amazon side looks like this. Azure side looks almost the same, just differs at 7000 to 7100 become 8000 to 8100.
What should I do to install the business card? I am sure that the port is opened for each other to see.
Edit 1:
docker exec log at the start for azure side
# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer0.org1.stock.com peer channel create -o orderer.stock.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
2018-12-19 00:41:47.014 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:41:47.079 UTC [main] main -> INFO 002 Exiting.....
# Join peer0.org1.stock.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer0.org1.stock.com peer channel join -b mychannel.block
2018-12-19 00:41:47.352 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:41:47.562 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-12-19 00:41:47.562 UTC [main] main -> INFO 003 Exiting.....
docker exec log at amazon side
# Create the channel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer1.org1.stock.com peer channel fetch config -o orderer.stock.com:7050 -c mychannel
2018-12-19 00:42:11.228 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:42:11.254 UTC [cli.common] readBlock -> INFO 002 Received block: 0
2018-12-19 00:42:11.269 UTC [cli.common] readBlock -> INFO 003 Received block: 0
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer1.org1.stock.com peer channel join -b mychannel_config.block
2018-12-19 00:42:11.531 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:42:11.748 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
edit 3: if I want to install bna file at amazon side, it cannot be done.
it will give me this error
✖ Installing business network. This may take a minute...
Error: Error trying install business network. Error: The business network failed to install on 1 or more peers: Response from attempted peer comms was an error: Error: Failed to connect before the deadline
Command failed
On the other hand, if I install on azure side., I get error LSCC at azure side, but it will gives me a succeed message
2018-12-27 05:16:46.972 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.2.0
Commit SHA: cae2ad4
Go version: go1.10
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.10
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2018-12-27 05:16:46.972 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2018-12-27 05:16:46.972 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2018-12-27 05:16:47.114 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.241 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.492 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.994 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:49.163 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 008 Created state database _users
2018-12-27 05:16:49.203 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 009 Created state database _replicator
2018-12-27 05:16:49.269 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a Created state database _global_changes
2018-12-27 05:16:49.344 UTC [kvledger] NewProvider -> INFO 00b ledger provider Initialized
2018-12-27 05:16:49.344 UTC [ledgermgmt] initialize -> INFO 00c ledger mgmt initialized
2018-12-27 05:16:49.344 UTC [peer] func1 -> INFO 00d Auto-detected peer address: 172.25.0.3:7051
2018-12-27 05:16:49.344 UTC [peer] func1 -> INFO 00e Returning peer1.org1.example.com:7051
2018-12-27 05:16:49.345 UTC [peer] func1 -> INFO 00f Auto-detected peer address: 172.25.0.3:7051
2018-12-27 05:16:49.345 UTC [peer] func1 -> INFO 010 Returning peer1.org1.example.com:7051
2018-12-27 05:16:49.346 UTC [eventhub_producer] start -> INFO 011 Event processor started
2018-12-27 05:16:49.347 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2018-12-27 05:16:49.347 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer1.org1.example.com:7052
2018-12-27 05:16:49.348 UTC [nodeCmd] createChaincodeServer -> WARN 014 peer.chaincodeListenAddress is not set, using peer1.org1.example.com:7052
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 015 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 016 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 017 system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2018-12-27 05:16:49.354 UTC [gossip/gossip] NewGossipService -> INFO 018 Creating gossip service with self membership of { [] [211 55 188 245 219 253 179 85 254 143 15 136 54 239 192 58 60 153 254 80 243 208 48 137 183 237 162 71 84 184 182 206] peer1.org1.example.com:7051 <nil> <nil>}
2018-12-27 05:16:49.355 UTC [gossip/gossip] NewGossipService -> WARN 019 External endpoint is empty, peer will not be accessible outside of its organization
2018-12-27 05:16:49.355 UTC [gossip/gossip] start -> INFO 01a Gossip instance peer1.org1.example.com:7051 started
2018-12-27 05:16:49.356 UTC [cscc] Init -> INFO 01b Init CSCC
2018-12-27 05:16:49.356 UTC [sccapi] deploySysCC -> INFO 01c system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-27 05:16:49.357 UTC [sccapi] deploySysCC -> INFO 01d system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-27 05:16:49.357 UTC [qscc] Init -> INFO 01e Init QSCC
2018-12-27 05:16:49.357 UTC [sccapi] deploySysCC -> INFO 01f system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2018-12-27 05:16:49.357 UTC [nodeCmd] serve -> INFO 020 Deployed system chaincodes
2018-12-27 05:16:49.358 UTC [discovery] NewService -> INFO 021 Created with config TLS: false, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2018-12-27 05:16:49.358 UTC [nodeCmd] registerDiscoveryService -> INFO 022 Discovery service activated
2018-12-27 05:16:49.358 UTC [nodeCmd] serve -> INFO 023 Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2018-12-27 05:16:49.359 UTC [nodeCmd] serve -> INFO 024 Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2018-12-27 05:16:57.465 UTC [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [mychannel] with genesis block
2018-12-27 05:16:57.478 UTC [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
2018-12-27 05:16:57.533 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 027 Created state database mychannel_
2018-12-27 05:16:57.564 UTC [kvledger] CommitWithPvtData -> INFO 028 Channel [mychannel]: Committed block [0] with 1 transaction(s)
2018-12-27 05:16:57.564 UTC [pvtdatastorage] func1 -> INFO 029 Purger started: Purging expired private data till block number [0]
2018-12-27 05:16:57.565 UTC [pvtdatastorage] func1 -> INFO 02a Purger finished
2018-12-27 05:16:57.615 UTC [ledgermgmt] CreateLedger -> INFO 02b Created ledger [mychannel] with genesis block
2018-12-27 05:16:57.654 UTC [cscc] Init -> INFO 02c Init CSCC
2018-12-27 05:16:57.654 UTC [sccapi] deploySysCC -> INFO 02d system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-27 05:16:57.654 UTC [sccapi] deploySysCC -> INFO 02e system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-27 05:16:57.655 UTC [qscc] Init -> INFO 02f Init QSCC
2018-12-27 05:16:57.655 UTC [sccapi] deploySysCC -> INFO 030 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2018-12-27 05:17:03.656 UTC [gossip/election] beLeader -> INFO 031 [211 55 188 245 219 253 179 85 254 143 15 136 54 239 192 58 60 153 254 80 243 208 48 137 183 237 162 71 84 184 182 206] : Becoming a leader
2018-12-27 05:18:54.408 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 032 Created state database mychannel_lscc
2018-12-27 05:18:54.413 UTC [lscc] executeInstall -> INFO 033 Installed Chaincode [stock-inquiry] Version [0.0.2] to peer
2018-12-27 05:19:12.469 UTC [endorser] ProcessProposal -> ERRO 034 [][c4b74ceb] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: c4b74cebeae32b1584387b0b12398c880a928723a8d200c205f3c96eff3e9dfc

problem fixed, amazon side cannot see himself. I need to open his own port connection to be seen by himself.

Related

Hyperledger Fabric 2.4 approve chaincode error

I'm setting up an hyperledger fabric network with docker compose.
All the containers are up and running but i'm having problems with the appprovemyorg command.
These are the logs of the peer after joining the channel:
2022-05-24 07:41:54.316 UTC 0023 INFO [ledgermgmt] CreateLedger -> Creating ledger [mychannel] with genesis block
2022-05-24 07:41:54.319 UTC 0024 INFO [blkstorage] newBlockfileMgr -> Getting block information from block storage
2022-05-24 07:41:54.328 UTC 0025 INFO [kvledger] commit -> [mychannel] Committed block [0] with 1 transaction(s) in 6ms (state_validation=0ms block_and_pvtdata_commit=3ms state_commit=1ms) commitHash=[]
2022-05-24 07:41:54.328 UTC 0026 INFO [kvledger] updateLedgerStatus -> Updating ledger [mychannel] status to [ACTIVE]
2022-05-24 07:41:54.329 UTC 0027 INFO [ledgermgmt] CreateLedger -> Created ledger [mychannel] with genesis block
2022-05-24 07:41:54.332 UTC 0028 INFO [gossip.gossip] JoinChan -> Joining gossip network of channel mychannel with 1 organizations
2022-05-24 07:41:54.332 UTC 0029 INFO [gossip.gossip] learnAnchorPeers -> No configured anchor peers of org1MSP for channel mychannel to learn about
2022-05-24 07:41:54.333 UTC 002a INFO [gateway] configUpdate -> Updating orderer config channel=mychannel
2022-05-24 07:41:54.333 UTC 002b INFO [gossip.state] NewGossipStateProvider -> Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1
2022-05-24 07:41:54.333 UTC 002c INFO [endorser] callChaincode -> finished chaincode: cscc duration: 21ms channel= txID=a704dc84
2022-05-24 07:41:54.333 UTC 002d INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59204 grpc.code=OK grpc.call_duration=22.209824ms
2022-05-24 07:42:00.335 UTC 002e INFO [gossip.election] beLeader -> 49ad88f230e73d14bb6f9b8a891c0f5bc47a35cd793ff62222e489f762864a33 : Becoming a leader
2022-05-24 07:42:00.335 UTC 002f INFO [gossip.service] func1 -> Elected as a leader, starting delivery service for channel mychannel
2022-05-24 07:42:00.335 UTC 0030 INFO [deliveryClient] StartDeliverForChannel -> This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel
2022-05-24 07:30:08.206 UTC 0031 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint &apos;orderer2:8050&apos;: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:8050: connect: connection refused" channel=mychannel
2022-05-24 07:30:08.307 UTC 0032 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint &apos;orderer3:9050&apos;: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:9050: connect: connection refused" channel=mychannel
2022-05-24 07:30:08.428 UTC 0033 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint &apos;orderer1:7050&apos;: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:7050: connect: connection refused" channel=mychannel
As you can see, i have some warnings but I can safely join the channel and I have no problems at all when i install the chaincode (the warnings disappear too).
These are the logs on the peer after installing the chaincode:
2022-05-24 07:45:17.017 UTC 0052 INFO [chaincode.externalbuilder.ccaas_builder] waitForExit -> ::Detect command=detect
2022-05-24 07:45:17.017 UTC 0053 INFO [chaincode.externalbuilder.ccaas_builder] waitForExit -> ::Error: chaincode type not supported: java command=detect
2022-05-24 07:45:17.023 UTC 0054 INFO [lifecycle] InstallChaincode -> Successfully installed chaincode with package ID 'testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7'
2022-05-24 07:45:17.023 UTC 0055 INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 14ms channel= txID=694acf7b
2022-05-24 07:45:17.023 UTC 0056 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59206 grpc.code=OK grpc.call_duration=15.8101ms
When i try to approve the chaincode with this command:
peer lifecycle chaincode approveformyorg --tls --cafile /tmp/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-tls-ca-7052.pem -o orderer1:7050 --ordererTLSHostnameOverride orderer1 --channelID mychannel --name mycc --version 1 --sequence 1 --waitForEvent --init-required --package-id testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7
I have this error:
Error: timed out waiting for txid on all peers
With these logs on the peer:
2022-05-24 07:46:54.303 UTC 0059 INFO [lifecycle] ApproveChaincodeDefinitionForOrg -> Successfully endorsed chaincode approval with name 'mycc', package ID 'testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7', on channel 'mychannel' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()}
2022-05-24 07:46:54.303 UTC 005a INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 0ms channel=mychannel txID=d56b21b6
2022-05-24 07:46:54.308 UTC 005b INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59210 grpc.code=OK grpc.call_duration=6.78249ms
2022-05-24 07:46:55.194 UTC 005c WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer1:7050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:7050: connect: connection refused" channel=mychannel
2022-05-24 07:47:24.311 UTC 005d INFO [comm.grpc.server] 1 -> streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.request_deadline=2022-05-24T07:47:24.31Z grpc.peer_address=172.22.0.9:59212 error="context finished before block retrieved: context deadline exceeded" grpc.code=Unknown grpc.call_duration=30.0006887s
2022-05-24 07:47:54.260 UTC 005e WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer2:8050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:8050: connect: connection refused" channel=mychannel
So i can't approve the chaincode and advance in the process.
Can anyone help me solve this problem?
Thanks

FabCar Hyperledger Fabric ./startFabric.sh execution is not completely working

Im experimenting Hyperledger Fabric FabCar basic example.
Successfully registered admin and user, using registerAdmin.js and registerUser.js. I am currently facing this error after running node query.js.
~/fabric-samples/fabcar$ node query.js
Store path:/home/****/fabric-samples/fabcar/hfc-key-store
Successfully loaded user1 from persistence
2020-02-21T07:08:00.564Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpc://localhost:7051
Query has completed, checking results
error from query = { Error: Failed to connect before the deadline URL:grpc://localhost:7051
at checkState (/home/****/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client.js:833:16) connectFailed: true }
That was mentioned similarly in my previous question
While checking docker ps -a , I could find the peer got exited
~/fabric-samples/fabcar$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1619413cd23c hyperledger/fabric-peer "peer node start" 13 minutes ago Exited (2) 12 minutes ago peer0.org1.example.com
de74d2459574 hyperledger/fabric-couchdb "tini -- /docker-ent…" 13 minutes ago Up 13 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
356fb281acbe hyperledger/fabric-orderer "orderer" 13 minutes ago Up 13 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
5e52be445c99 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 13 minutes ago Up 13 minutes 0.0.0.0:7054->7054/tcp ca.example.com
after checking the workflow I found that the ./startFabric.sh execution is not completely running, it got exited after INFO 001 Endorser and orderer connections initialized.
~/fabric-samples/fabcar$ ./startFabric.sh
# don't rewrite paths for Windows Git Bash users
export MSYS_NO_PATHCONV=1
docker-compose -f docker-compose.yml down
Removing network net_basic
docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb
Creating network "net_basic" with the default driver
Creating ca.example.com ... done
Creating couchdb ... done
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
export FABRIC_START_TIMEOUT=10
#echo ${FABRIC_START_TIMEOUT}
sleep ${FABRIC_START_TIMEOUT}
# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
2020-02-21 07:07:06.183 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 07:07:06.222 UTC [channelCmd] InitCmdFactory -> INFO 002 Endorser and orderer connections initialized
2020-02-21 07:07:06.432 UTC [main] main -> INFO 003 Exiting.....
# Join peer0.org1.example.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.example.com/msp" peer0.org1.example.com peer channel join -b mychannel.block
2020-02-21 07:07:06.907 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
:~/fabric-samples/fabcar$
Kindly advise.
*Updated with the Docker logs of the Conatiner:
2020-02-21 08:51:13.123 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.1.0
Go version: go1.9.2
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.6
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2020-02-21 08:51:13.123 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2020-02-21 08:51:13.123 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2020-02-21 08:51:13.795 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 004 Created state database _users
2020-02-21 08:51:14.058 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 005 Created state database _replicator
2020-02-21 08:51:14.326 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 006 Created state database _global_changes
2020-02-21 08:51:14.366 UTC [kvledger] NewProvider -> INFO 007 ledger provider Initialized
2020-02-21 08:51:14.366 UTC [ledgermgmt] initialize -> INFO 008 ledger mgmt initialized
2020-02-21 08:51:14.367 UTC [peer] func1 -> INFO 009 Auto-detected peer address: 172.25.0.5:7051
2020-02-21 08:51:14.368 UTC [peer] func1 -> INFO 00a Returning peer0.org1.example.com:7051
2020-02-21 08:51:14.368 UTC [peer] func1 -> INFO 00b Auto-detected peer address: 172.25.0.5:7051
2020-02-21 08:51:14.368 UTC [peer] func1 -> INFO 00c Returning peer0.org1.example.com:7051
2020-02-21 08:51:14.373 UTC [eventhub_producer] start -> INFO 00d Event processor started
2020-02-21 08:51:14.374 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00e Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
2020-02-21 08:51:14.375 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00f Exit with ccEndpoint: peer0.org1.example.com:7052
2020-02-21 08:51:14.375 UTC [nodeCmd] createChaincodeServer -> WARN 010 peer.chaincodeListenAddress is not set, using peer0.org1.example.com:7052
2020-02-21 08:51:14.378 UTC [chaincode] NewChaincodeSupport -> INFO 011 Chaincode support using peerAddress: peer0.org1.example.com:7052
2020-02-21 08:51:14.379 UTC [sccapi] registerSysCC -> INFO 012 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2020-02-21 08:51:14.380 UTC [sccapi] registerSysCC -> INFO 013 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2020-02-21 08:51:14.380 UTC [sccapi] registerSysCC -> INFO 014 system chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
2020-02-21 08:51:14.380 UTC [sccapi] registerSysCC -> INFO 015 system chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
2020-02-21 08:51:14.380 UTC [sccapi] registerSysCC -> INFO 016 system chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc) registered
2020-02-21 08:51:14.382 UTC [gossip/service] func1 -> INFO 017 Initialize gossip with endpoint peer0.org1.example.com:7051 and bootstrap set [127.0.0.1:7051]
2020-02-21 08:51:14.386 UTC [msp] DeserializeIdentity -> INFO 018 Obtaining identity
2020-02-21 08:51:14.389 UTC [gossip/discovery] NewDiscoveryService -> INFO 019 Started { [] [61 97 241 125 96 173 40 203 239 81 147 191 102 161 39 23 0 117 69 217 56 120 139 152 120 223 29 9 23 115 238 6] peer0.org1.example.com:7051 <nil>} incTime is 1582275074389049506
2020-02-21 08:51:14.389 UTC [gossip/gossip] NewGossipService -> INFO 01a Creating gossip service with self membership of { [] [61 97 241 125 96 173 40 203 239 81 147 191 102 161 39 23 0 117 69 217 56 120 139 152 120 223 29 9 23 115 238 6] peer0.org1.example.com:7051 <nil>}
2020-02-21 08:51:14.392 UTC [gossip/gossip] NewGossipService -> WARN 01b External endpoint is empty, peer will not be accessible outside of its organization
2020-02-21 08:51:14.392 UTC [gossip/gossip] start -> INFO 01c Gossip instance peer0.org1.example.com:7051 started
2020-02-21 08:51:14.393 UTC [cscc] Init -> INFO 01d Init CSCC
2020-02-21 08:51:14.393 UTC [sccapi] deploySysCC -> INFO 01e system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2020-02-21 08:51:14.394 UTC [sccapi] deploySysCC -> INFO 01f system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2020-02-21 08:51:14.395 UTC [escc] Init -> INFO 020 Successfully initialized ESCC
2020-02-21 08:51:14.395 UTC [sccapi] deploySysCC -> INFO 021 system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
2020-02-21 08:51:14.395 UTC [sccapi] deploySysCC -> INFO 022 system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
2020-02-21 08:51:14.396 UTC [qscc] Init -> INFO 023 Init QSCC
2020-02-21 08:51:14.396 UTC [sccapi] deploySysCC -> INFO 024 system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2020-02-21 08:51:14.396 UTC [nodeCmd] initSysCCs -> INFO 025 Deployed system chaincodes
2020-02-21 08:51:14.397 UTC [nodeCmd] serve -> INFO 026 Starting peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051]
2020-02-21 08:51:14.398 UTC [nodeCmd] serve -> INFO 027 Started peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051]
2020-02-21 08:51:24.451 UTC [ledgermgmt] CreateLedger -> INFO 028 Creating ledger [mychannel] with genesis block
2020-02-21 08:51:24.488 UTC [fsblkstorage] newBlockfileMgr -> INFO 029 Getting block information from block storage
2020-02-21 08:51:25.005 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 02a Created state database mychannel_
2020-02-21 08:51:25.145 UTC [kvledger] CommitWithPvtData -> INFO 02b Channel [mychannel]: Committed block [0] with 1 transaction(s)
2020-02-21 08:51:25.151 UTC [couchdb] CreateCouchDatabase -> ERRO 02c Error during CouchDB CreateDatabaseIfNotExist() for dbName: mychannel_ error: json: cannot unmarshal string into Go struct field DBInfo.purge_seq of type int
panic: Error during commit to txmgr:json: cannot unmarshal string into Go struct field DBInfo.purge_seq of type int
goroutine 87 [running]:
github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).CommitWithPvtData(0xc420058180, 0xc4215a7200, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger.go:251 +0x921
github.com/hyperledger/fabric/core/ledger/kvledger.(*Provider).Create(0xc4201aa200, 0xc4216da360, 0x27, 0xc421708250, 0x1, 0x1)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:107 +0x37f
github.com/hyperledger/fabric/core/ledger/ledgermgmt.CreateLedger(0xc4216da360, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:88 +0x1ac
github.com/hyperledger/fabric/core/peer.CreateChainFromBlock(0xc4216da360, 0x40000000000, 0x10)
/opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:433 +0x64
github.com/hyperledger/fabric/core/scc/cscc.joinChain(0xc42165d360, 0x9, 0xc4216da360, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:212 +0x65
github.com/hyperledger/fabric/core/scc/cscc.(*PeerConfiger).Invoke(0x169e160, 0x166f740, 0xc42032d220, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:140 +0xa1e
github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4202419d0, 0xc4216bed80)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:329 +0x4f3
created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:295 +0x49
I solved the above issues, by editing the file start.sh from the path fabric-samples/basic-network with the below,
# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
#FABRIC_START_TIMEOUT changed to 90 instead of 10
export FABRIC_START_TIMEOUT=90 #default=10
#echo ${FABRIC_START_TIMEOUT}
sleep ${FABRIC_START_TIMEOUT}
along with that I followed the answer,
I included
dns_search: .
to the peer containers in the docker-compose.yml file located in fabric-samples/basic-network with the below.
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer
dns_search: .
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
- CORE_LOGGING_PEER=debug
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
# # 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}_basic
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
# provide the credentials for ledger to connect to CouchDB. The username and password must
# match the username and password set for the associated CouchDB.
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
# command: peer node start --peer-chaincodedev=true
ports:
- 7051:7051
- 7053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users
- ./config:/etc/hyperledger/configtx
depends_on:
- orderer.example.com
- couchdb # ***i included couchdb***
networks:
- basic
The above edits resolved my issues, and now ./startFabric.sh and node query.js were working properly.
~/fabric-samples/fabcar$ node query.js
Store path:/home/inforios/fabric-samples/fabcar/hfc-key-store
Successfully loaded user1 from persistence
Query has completed, checking results
Response is [{"Key":"CAR0", "Record":{"colour":"blue","make":"Toyota","model":"Prius","owner":"Tomoko"}},{"Key":"CAR1", "Record":{"colour":"red","make":"Ford","model":"Mustang","owner":"Brad"}},{"Key":"CAR2", "Record":{"colour":"green","make":"Hyundai","model":"Tucson","owner":"Jin Soo"}},{"Key":"CAR3", "Record":{"colour":"yellow","make":"Volkswagen","model":"Passat","owner":"Max"}},{"Key":"CAR4", "Record":{"colour":"black","make":"Tesla","model":"S","owner":"Adriana"}},{"Key":"CAR5", "Record":{"colour":"purple","make":"Peugeot","model":"205","owner":"Michel"}},{"Key":"CAR6", "Record":{"colour":"white","make":"Chery","model":"S22L","owner":"Aarav"}},{"Key":"CAR7", "Record":{"colour":"violet","make":"Fiat","model":"Punto","owner":"Pari"}},{"Key":"CAR8", "Record":{"colour":"indigo","make":"Tata","model":"Nano","owner":"Valeria"}},{"Key":"CAR9", "Record":{"colour":"brown","make":"Holden","model":"Barina","owner":"Shotaro"}}]
thanks to Faisal and Aditya Arora for their valuable responses.

Hyperledger Fabric 1.4.2 - first network - error getting endorser client - chains missing

I am trying to run the Hyperledger Fabric for the first time.
Installed the binaries according to this:
https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html
Then trying to start the sample first network: https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html
I am running the: ./byfn.sh generate then: ./byfn.sh up
Unfortunately the the up command gives me this:
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer0.org1.example.com: no such host"
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
It seem that the: peer0.org1.example.com has quit, so
I've displayed its logs.
docker logs -f peer0.org1.example.com
2019-08-05 07:44:57.356 UTC [fsblkstorage] preRestHtFiles -> INFO 021 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:57.356 UTC [fsblkstorage] LoadPreResetHeight -> INFO 022 Pre-reset heights loaded
2019-08-05 07:44:57.356 UTC [nodeCmd] func7 -> INFO 023 Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:57.364 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.363Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=131.772µs
2019-08-05 07:44:57.368 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.365Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.991758ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f6064357259]
It does look like it has received quit signal, because of: Dir [/var/hyperledger/production/ledgersData/chains/chains] missing
How do I proceed?
EDIT:
Since last line mentions that is an RPC error to: peer1.org1.example.com, below are the logs from: peer1.org1.example.com.
It seems that peer0 can't connect to peer1, whilst peer1 can't connect to peer0
2019-08-05 07:44:56.292 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.4.2
Commit SHA: c6cc550
Go version: go1.11.5
OS/Arch: linux/amd64
Chaincode:
Base Image Version: 0.4.15
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2019-08-05 07:44:56.293 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2019-08-05 07:44:56.293 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2019-08-05 07:44:56.330 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2019-08-05 07:44:56.373 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 007 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 009 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.374 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer1.org1.example.com:8052
2019-08-05 07:44:56.377 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2019-08-05 07:44:56.380 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer1.org1.example.com:8051 and bootstrap set [peer0.org1.example.com:7051]
2019-08-05 07:44:56.384 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer1.org1.example.com:8051, InternalEndpoint: peer1.org1.example.com:8051, PKI-ID: 54f785fe4477fcb3e57f7f5b817d6b542ff311ec1dd66dfb0ac2ac6abf50e08f, Metadata:
2019-08-05 07:44:56.384 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer1.org1.example.com:8051 started
2019-08-05 07:44:56.385 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-08-05 07:44:56.386 UTC [cscc] Init -> INFO 015 Init CSCC
2019-08-05 07:44:56.386 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-08-05 07:44:56.387 UTC [qscc] Init -> INFO 017 Init QSCC
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-08-05 07:44:56.387 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes
2019-08-05 07:44:56.388 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2019-08-05 07:44:56.388 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:56.388 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights
2019-08-05 07:44:56.388 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded
2019-08-05 07:44:57.365 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.365Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=160.286µs
2019-08-05 07:44:57.369 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.367Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=1.830335ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f39285ea259]
This answer solves the problem: https://stackoverflow.com/a/49649678/2263395
Basically you need to set the ENV variable: GODEBUG=netdns=go to docker-compose files.

Peer node is not starting in commercial paper samples

I am trying to run the ./start.sh as specified in the tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
I am getting the error:
Error response from daemon: Container 3098af67969c5388c78f3ed97b9941ac637c7292342cd90e109a6c5e3ef2a5ea is not running
Basically Peer node container is not getting up. Can you please help me?
This Ubuntu VM is hosted in Cloud
Please check the peer node container Logs:
root#UbuntuVM:/home/NagaRajeshK/hyperledgerdev/fabric-samples/basic-network# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e60a0578eae4 hyperledger/fabric-orderer "orderer" 3 minutes ago Up 2 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
c1c5510432f5 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 3 minutes ago Up 2 minutes 0.0.0.0:7054->7054/tcp ca.example.com
9cf315b8946c hyperledger/fabric-couchdb "tini -- /docker-ent…" 3 minutes ago Up 2 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
root#UbuntuVM:/home/NagaRajeshK/hyperledgerdev/fabric-samples/basic-network# docker logs 3098af67969c
2019-04-05 13:51:59.154 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.4.1-rc1
Commit SHA: 29433f0
Go version: go1.11.5
OS/Arch: linux/amd64
Chaincode:
Base Image Version: 0.4.15
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2019-04-05 13:51:59.155 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2019-04-05 13:51:59.155 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2019-04-05 13:51:59.495 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2019-04-05 13:51:59.791 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 005 Created state database _users
2019-04-05 13:51:59.890 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 006 Created state database _replicator
2019-04-05 13:51:59.891 UTC [ledgermgmt] initialize -> INFO 007 ledger mgmt initialized
2019-04-05 13:51:59.891 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.18.0.5:7051
2019-04-05 13:51:59.891 UTC [peer] func1 -> INFO 009 Returning peer0.org1.example.com:7051
2019-04-05 13:51:59.891 UTC [peer] func1 -> INFO 00a Auto-detected peer address: 172.18.0.5:7051
2019-04-05 13:51:59.891 UTC [peer] func1 -> INFO 00b Returning peer0.org1.example.com:7051
2019-04-05 13:51:59.893 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
2019-04-05 13:51:59.893 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00d Exit with ccEndpoint: peer0.org1.example.com:7052
2019-04-05 13:51:59.894 UTC [nodeCmd] createChaincodeServer -> WARN 00e peer.chaincodeListenAddress is not set, using peer0.org1.example.com:7052
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f803c547259]
runtime stack:
Can you update your fabric-samples, git pull from root of fabric-samples, and run the start.sh script again. You have the rc-1 script, which should work, but 1.4.1 officially released yesterday, can you see if the new tutorial works.

Run test case failed in fabric project , version release1.2

In the directory of ./core/chaincode/exectransaction_test.go
Run the TestExecuteDeployTransaction function of line 795 , got error :
2019-01-17 09:37:18.925 CST [ledgermgmt] initialize -> INFO 003 Initializing ledger mgmt
2019-01-17 09:37:18.925 CST [kvledger] NewProvider -> INFO 004 Initializing ledger provider
2019-01-17 09:37:20.113 CST [kvledger] NewProvider -> INFO 005 ledger provider Initialized
2019-01-17 09:37:20.114 CST [ledgermgmt] initialize -> INFO 006 ledger mgmt initialized
2019-01-17 09:37:20.118 CST [sccapi] registerSysCC -> INFO 007 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2019-01-17 09:37:20.118 CST [sccapi] registerSysCC -> INFO 008 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2019-01-17 09:37:20.118 CST [sccapi] registerSysCC -> INFO 009 system chaincode (qscc,github.com/hyperledger/fabric/core/scc/qscc,true) disabled
2019-01-17 09:37:20.443 CST [ledgermgmt] CreateLedger -> INFO 00a Creating ledger [testchainid] with genesis block
2019-01-17 09:37:20.493 CST [fsblkstorage] newBlockfileMgr -> INFO 00b Getting block information from block storage
2019-01-17 09:37:20.731 CST [kvledger] CommitWithPvtData -> INFO 00c Channel [testchainid]: Committed block [0] with 1 transaction(s)
2019-01-17 09:37:20.731 CST [pvtdatastorage] func1 -> INFO 00d Purger started: Purging expired private data till block number [0]
2019-01-17 09:37:20.732 CST [pvtdatastorage] func1 -> INFO 00e Purger finished
2019-01-17 09:37:20.884 CST [ledgermgmt] CreateLedger -> INFO 00f Created ledger [testchainid] with genesis block
2019-01-17 09:37:20.886 CST [cscc] Init -> INFO 010 Init CSCC
2019-01-17 09:37:20.887 CST [sccapi] deploySysCC -> INFO 011 system chaincode cscc/testchainid(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-01-17 09:37:20.887 CST [sccapi] deploySysCC -> INFO 012 system chaincode lscc/testchainid(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-01-17 09:37:20.887 CST [sccapi] deploySysCC -> INFO 013 system chaincode (qscc,github.com/hyperledger/fabric/core/scc/qscc) disabled
getting deployment spec for chaincode spec: type:GOLANG chaincode_id:<path:"github.com/hyperledger/fabric/examples/chaincode/go/example01" name:"example01" version:"0" > input:<args:"init" args:"a" args:"100" args:"b" args:"200" >
2019-01-17 09:37:22.129 CST [msp] DeserializeIdentity -> INFO 014 Obtaining identity
2019-01-17 09:37:22.777 CST [dockercontroller] func2 -> INFO 015 Container example01-0 has closed its IO channel
2019-01-17 09:37:22.940 CST [dockercontroller] Start -> ERRO 016 start-could not start container: API error (400): OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown
2019-01-17 09:37:22.983 CST [chaincode] Launch -> ERRO 017 start failed: API error (400): OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown
error starting container
error starting container

Resources