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

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.

Related

Error in running byfn: failed to endorse chaincode install, rpc error code unavailable

I am on CentOS 7, installed all prerequisites, cloned the fabric-samples git repository.
I am referring to the tutorial "Building Your First Network", found here. At this point I have successfully run the command
./byfn.sh generate
Now I want to execute the Java chaincode, so I run
./byfn.sh up -l java
Right after the START sign, I see the following output:
Build your first network (BYFN) end-to-end test
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Channel name : mychannel
Creating channel...
+ res=0
+ set +x
2020-02-21 09:14:36.439 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:36.463 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}
2020-02-21 09:14:36.466 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-02-21 09:14:36.667 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:36.670 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized
2020-02-21 09:14:36.871 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:36.876 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized
2020-02-21 09:14:37.077 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.081 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized
2020-02-21 09:14:37.281 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.284 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized
2020-02-21 09:14:37.486 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.489 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized
2020-02-21 09:14:37.692 UTC [cli.common] readBlock -> INFO 00e Received block: 0
===================== Channel 'mychannel' created =====================
But the test still continues with no issues until the chaincode installation part.
===================== Chaincode is packaged on peer0.org1 =====================
Installing chaincode on peer0.org1...
+ peer lifecycle chaincode install mycc.tar.gz
+ res=1
+ set +x
Error: failed to endorse chaincode install: rpc error: code = Unavailable desc = transport is closing
!!!!!!!!!!!!!!! Chaincode installation on peer0.org1 has failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
The test stalls for quite some time at the Installing chaincode on peer0.org1... line, before ending in this error message.
The following is the full output:
Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
LOCAL_VERSION=2.0.0
DOCKER_IMAGE_VERSION=2.0.0
/root/hyperledger/fabric/bin/cryptogen
##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x
Generate CCP files for Org1 and Org2
/root/hyperledger/fabric/bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
2020-02-21 17:14:15.274 +08 [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-02-21 17:14:15.309 +08 [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: etcdraft
2020-02-21 17:14:15.310 +08 [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 Orderer.EtcdRaft.Options unset, setting to tick_interval:"500ms" election_tick:10 heartbeat_tick:1 max_inflight_blocks:5 snapshot_interval_size:16777216
2020-02-21 17:14:15.310 +08 [common.tools.configtxgen.localconfig] Load -> INFO 004 Loaded configuration: /root/hyperledger/fabric/fabric-samples/first-network/configtx.yaml
2020-02-21 17:14:15.312 +08 [common.tools.configtxgen] doOutputBlock -> INFO 005 Generating genesis block
2020-02-21 17:14:15.312 +08 [common.tools.configtxgen] doOutputBlock -> INFO 006 Writing genesis block
#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
2020-02-21 17:14:15.347 +08 [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-02-21 17:14:15.390 +08 [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /root/hyperledger/fabric/fabric-samples/first-network/configtx.yaml
2020-02-21 17:14:15.391 +08 [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 003 Generating new channel configtx
2020-02-21 17:14:15.393 +08 [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 004 Writing new channel tx
+ res=0
+ set +x
#################################################################
####### Generating anchor peer update for Org1MSP ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
2020-02-21 17:14:15.434 +08 [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-02-21 17:14:15.477 +08 [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /root/hyperledger/fabric/fabric-samples/first-network/configtx.yaml
2020-02-21 17:14:15.477 +08 [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update
2020-02-21 17:14:15.479 +08 [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update
+ res=0
+ set +x
#################################################################
####### Generating anchor peer update for Org2MSP ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
2020-02-21 17:14:15.525 +08 [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-02-21 17:14:15.576 +08 [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /root/hyperledger/fabric/fabric-samples/first-network/configtx.yaml
2020-02-21 17:14:15.576 +08 [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update
2020-02-21 17:14:15.578 +08 [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update
+ res=0
+ set +x
Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Creating volume "net_orderer2.example.com" with default driver
Creating volume "net_orderer3.example.com" with default driver
Creating volume "net_orderer4.example.com" with default driver
Creating orderer.example.com ... done
Creating cli ... done
Creating orderer4.example.com ...
Creating peer1.org2.example.com ...
Creating orderer3.example.com ...
Creating orderer5.example.com ...
Creating peer0.org2.example.com ...
Creating peer0.org1.example.com ...
Creating orderer.example.com ...
Creating orderer2.example.com ...
Creating cli ...
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a25f3414f14e hyperledger/fabric-tools:latest "/bin/bash" 1 second ago Up Less than a second cli
85e4e7490b95 hyperledger/fabric-orderer:latest "orderer" 4 seconds ago Up Less than a second 7050/tcp, 0.0.0.0:8050->8050/tcp orderer2.example.com
6f393ad561dc hyperledger/fabric-peer:latest "peer node start" 4 seconds ago Up Less than a second 0.0.0.0:7051->7051/tcp peer0.org1.example.com
6cfd44256f6d hyperledger/fabric-orderer:latest "orderer" 4 seconds ago Up Less than a second 0.0.0.0:7050->7050/tcp orderer.example.com
691f224ac19a hyperledger/fabric-orderer:latest "orderer" 5 seconds ago Up 1 second 7050/tcp, 0.0.0.0:11050->11050/tcp orderer5.example.com
930177cb2965 hyperledger/fabric-peer:latest "peer node start" 5 seconds ago Up 1 second 7051/tcp, 0.0.0.0:9051->9051/tcp peer0.org2.example.com
cc4fc902a8f0 hyperledger/fabric-peer:latest "peer node start" 5 seconds ago Up 1 second 7051/tcp, 0.0.0.0:10051->10051/tcp peer1.org2.example.com
b192db94069c hyperledger/fabric-orderer:latest "orderer" 5 seconds ago Up 1 second 7050/tcp, 0.0.0.0:10050->10050/tcp orderer4.example.com
6db78ac784c8 hyperledger/fabric-orderer:latest "orderer" 5 seconds ago Up 2 seconds 7050/tcp, 0.0.0.0:9050->9050/tcp orderer3.example.com
1bea7b96c621 hyperledger/fabric-peer:latest "peer node start" 5 seconds ago Up 1 second 7051/tcp, 0.0.0.0:8051->8051/tcp peer1.org1.example.com
d23e83c3cde5 hyperledger/fabric-javaenv:2.0 "/bin/sh -c ./build.…" 17 minutes ago Exited (0) 15 minutes ago goofy_goldstine
Sleeping 15s to allow Raft cluster to complete booting
Vendoring Go dependencies ...
~/hyperledger/fabric/fabric-samples/chaincode/abstore/go ~/hyperledger/fabric/fabric-samples/first-network
./byfn.sh: line 180: go: command not found
~/hyperledger/fabric/fabric-samples/first-network
Finished vendoring Go dependencies
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Channel name : mychannel
Creating channel...
+ res=0
+ set +x
2020-02-21 09:14:36.439 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:36.463 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}
2020-02-21 09:14:36.466 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-02-21 09:14:36.667 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:36.670 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized
2020-02-21 09:14:36.871 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:36.876 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized
2020-02-21 09:14:37.077 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.081 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized
2020-02-21 09:14:37.281 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.284 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized
2020-02-21 09:14:37.486 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}
2020-02-21 09:14:37.489 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized
2020-02-21 09:14:37.692 UTC [cli.common] readBlock -> INFO 00e Received block: 0
===================== Channel 'mychannel' created =====================
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2020-02-21 09:14:37.763 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:37.783 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org1 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2020-02-21 09:14:40.850 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:40.869 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org1 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2020-02-21 09:14:43.934 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:43.954 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org2 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2020-02-21 09:14:47.020 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:47.040 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org2 joined channel 'mychannel' =====================
Updating anchor peers for org1...
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2020-02-21 09:14:50.102 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:50.119 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org1MSP' on channel 'mychannel' =====================
Updating anchor peers for org2...
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2020-02-21 09:14:53.190 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-02-21 09:14:53.207 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org2MSP' on channel 'mychannel' =====================
+ peer lifecycle chaincode package mycc.tar.gz --path /opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/ --lang java --label mycc_1
+ res=0
+ set +x
===================== Chaincode is packaged on peer0.org1 =====================
Installing chaincode on peer0.org1...
+ peer lifecycle chaincode install mycc.tar.gz
+ res=1
+ set +x
Error: failed to endorse chaincode install: rpc error: code = Unavailable desc = transport is closing
!!!!!!!!!!!!!!! Chaincode installation on peer0.org1 has failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
EDIT 24/02/2020: I brought down the script, killed all active containers and pruned them, then re-ran the script.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6182b99f3483 hyperledger/fabric-javaenv:2.0 "/bin/sh -c ./build.…" 4 minutes ago Up 4 minutes suspicious_galileo
158e8bbd501b hyperledger/fabric-tools:latest "/bin/bash" 5 minutes ago Up 5 minutes cli
1d4f0e232e58 hyperledger/fabric-peer:latest "peer node start" 5 minutes ago Up 5 minutes 0.0.0.0:7051->7051/tcp peer0.org1.example.com
90ba9fb67fae hyperledger/fabric-orderer:latest "orderer" 5 minutes ago Up 5 minutes 7050/tcp, 0.0.0.0:11050->11050/tcp orderer5.example.com
e4f730446f05 hyperledger/fabric-orderer:latest "orderer" 5 minutes ago Up 5 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
a9c126e1e280 hyperledger/fabric-orderer:latest "orderer" 5 minutes ago Up 5 minutes 7050/tcp, 0.0.0.0:8050->8050/tcp orderer2.example.com
c53240f4d9fe hyperledger/fabric-peer:latest "peer node start" 5 minutes ago Up 5 minutes 7051/tcp, 0.0.0.0:9051->9051/tcp peer0.org2.example.com
7c96596eda01 hyperledger/fabric-peer:latest "peer node start" 5 minutes ago Up 5 minutes 7051/tcp, 0.0.0.0:10051->10051/tcp peer1.org2.example.com
4fabd60e9af4 hyperledger/fabric-peer:latest "peer node start" 5 minutes ago Up 5 minutes 7051/tcp, 0.0.0.0:8051->8051/tcp peer1.org1.example.com
c5ffe6032bdd hyperledger/fabric-orderer:latest "orderer" 5 minutes ago Up 5 minutes 7050/tcp, 0.0.0.0:10050->10050/tcp orderer4.example.com
04ec9beedce6 hyperledger/fabric-orderer:latest "orderer" 5 minutes ago Up 5 minutes 7050/tcp, 0.0.0.0:9050->9050/tcp orderer3.example.com
The Java container is running properly, but the error still persists.

The changed code in chaincode does not take effort after restart the BYFN network?

I'm writing chaincode application using the provided byfn network in hyperledger fabric V1.4. When i add or delete some codes, i shutdown the byfn network and remove the docker container, and then restart the byfn network, install and instantiate the code using the same name and version as before. I found if using the same version as before, the changed code does not take effort.
I think it is not the same as i expected since i shutdown the network and remove the container. I use docker volume ls and inspect command, found the file under net_peer0.org1.example.com cleard when the byfn network down, so there was no exsiting previous version of codes. I wonder why the changed code doesn't take effort and why it works after i upgrade to a new version which has not been used before.
The docker compose file is the same as provided by the byfn tutorial:
docker-compose-base.yaml
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
orderer.example.com:
container_name: orderer.example.com
extends:
file: peer-base.yaml
service: orderer-base
volumes:
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.example.com
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.example.com:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.org1.example.com:/var/hyperledger/production
ports:
- 7051:7051
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org1.example.com
- CORE_PEER_ADDRESS=peer1.org1.example.com:8051
- CORE_PEER_LISTENADDRESS=0.0.0.0:8051
- CORE_PEER_CHAINCODEADDRESS=peer1.org1.example.com:8052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls
- peer1.org1.example.com:/var/hyperledger/production
ports:
- 8051:8051
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.example.com
- CORE_PEER_ADDRESS=peer0.org2.example.com:9051
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_CHAINCODEADDRESS=peer0.org2.example.com:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:10051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.org2.example.com:/var/hyperledger/production
ports:
- 9051:9051
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.example.com
- CORE_PEER_ADDRESS=peer1.org2.example.com:10051
- CORE_PEER_LISTENADDRESS=0.0.0.0:10051
- CORE_PEER_CHAINCODEADDRESS=peer1.org2.example.com:10052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:9051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls
- peer1.org2.example.com:/var/hyperledger/production
ports:
- 10051:10051
Is the feature of hyperledger fabric 1.4 or there is something wrong in my operation? Currently i debug by adding output in the code and see them in dev_peer.org.example.com containers, Is there a better way to develop chaincode in hyperledger?
Update
I install the chaincode named master with version 1.0 in peer0.org1 and peer0.org2 from the cli container. I instantiated master in peer0.org2 from the cli container. And i use docker logs peerX.orgX.example.com command to get the log of every peer container.
The log is as follows:
#### the # statement is added by me to better understanding
### install in cli container
# peer0.org1
root#022d09eec585:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n master -v 1.0 -l java -p /opt/gopath/src/github.com/chaincode/master-liuqi/java/
2019-07-31 03:33:28.747 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-07-31 03:33:28.747 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-07-31 03:33:28.754 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
# peer0.org2
root#022d09eec585:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n master -v 1.0 -l java -p /opt/gopath/src/github.com/chaincode/master-liuqi/java/
2019-07-31 03:33:31.878 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-07-31 03:33:31.878 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-07-31 03:33:31.884 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
### instantiate in cli container
# peer0.org2
root#022d09eec585:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n master -l java -v 1.0 -c '{"Args":["init","mychannel"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
2019-07-31 03:33:44.978 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-07-31 03:33:44.979 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
root#022d09eec585:/opt/gopath/src/github.com/hyperledger/fabric/peer#
### log of peer containers(part)
# peer0.org1
2019-07-31 03:33:34.913 UTC [endorser] callChaincode -> INFO 069 [mychannel][f98c11ee] Entry chaincode: name:"mycc"
2019-07-31 03:33:34.916 UTC [endorser] callChaincode -> INFO 06a [mychannel][f98c11ee] Exit chaincode: name:"mycc" (3ms)
2019-07-31 03:33:34.916 UTC [comm.grpc.server] 1 -> INFO 06b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.7:34946 grpc.code=OK grpc.call_duration=3.875297ms
2019-07-31 03:33:36.936 UTC [gossip.privdata] StoreBlock -> INFO 06c [mychannel] Received block [4] from buffer
2019-07-31 03:33:36.938 UTC [committer.txvalidator] Validate -> INFO 06d [mychannel] Validated block [4] in 2ms
2019-07-31 03:33:36.944 UTC [kvledger] CommitWithPvtData -> INFO 06e [mychannel] Committed block [4] with 1 transaction(s) in 5ms (state_validation=0ms block_commit=3ms state_commit=0ms)
2019-07-31 03:33:48.969 UTC [gossip.privdata] StoreBlock -> INFO 06f [mychannel] Received block [5] from buffer
2019-07-31 03:33:48.971 UTC [committer.txvalidator] Validate -> INFO 070 [mychannel] Validated block [5] in 1ms
2019-07-31 03:33:48.971 UTC [cceventmgmt] HandleStateUpdates -> INFO 071 Channel [mychannel]: Handling deploy or update of chaincode [master]
2019-07-31 03:33:48.975 UTC [kvledger] CommitWithPvtData -> INFO 072 [mychannel] Committed block [5] with 1 transaction(s) in 4ms (state_validation=0ms block_commit=2ms state_commit=0ms)
# peer0.org2
2019-07-31 03:33:34.918 UTC [endorser] callChaincode -> INFO 060 [mychannel][f98c11ee] Entry chaincode: name:"mycc"
2019-07-31 03:33:34.920 UTC [endorser] callChaincode -> INFO 061 [mychannel][f98c11ee] Exit chaincode: name:"mycc" (2ms)
2019-07-31 03:33:34.920 UTC [comm.grpc.server] 1 -> INFO 062 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.7:38430 grpc.code=OK grpc.call_duration=3.319442ms
2019-07-31 03:33:36.936 UTC [gossip.privdata] StoreBlock -> INFO 063 [mychannel] Received block [4] from buffer
2019-07-31 03:33:36.937 UTC [committer.txvalidator] Validate -> INFO 064 [mychannel] Validated block [4] in 1ms
2019-07-31 03:33:36.942 UTC [kvledger] CommitWithPvtData -> INFO 065 [mychannel] Committed block [4] with 1 transaction(s) in 5ms (state_validation=0ms block_commit=3ms state_commit=0ms)
2019-07-31 03:33:44.980 UTC [endorser] callChaincode -> INFO 066 [mychannel][c3207bea] Entry chaincode: name:"lscc"
2019-07-31 03:33:46.959 UTC [endorser] callChaincode -> INFO 067 [mychannel][c3207bea] Exit chaincode: name:"lscc" (1979ms)
2019-07-31 03:33:46.960 UTC [comm.grpc.server] 1 -> INFO 068 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.7:38444 grpc.code=OK grpc.call_duration=1.980230957s
2019-07-31 03:33:48.976 UTC [gossip.privdata] StoreBlock -> INFO 069 [mychannel] Received block [5] from buffer
2019-07-31 03:33:48.977 UTC [committer.txvalidator] Validate -> INFO 06a [mychannel] Validated block [5] in 1ms
2019-07-31 03:33:48.977 UTC [cceventmgmt] HandleStateUpdates -> INFO 06b Channel [mychannel]: Handling deploy or update of chaincode [master]
2019-07-31 03:33:48.981 UTC [kvledger] CommitWithPvtData -> INFO 06c [mychannel] Committed block [5] with 1 transaction(s) in 4ms (state_validation=0ms block_commit=2ms state_commit=0ms)
While starting the byfn network hyperledger uses dev-peer where chaincode would be installed.
Updating the chaincode can be done in two ways
1.Instantiate with a new chaincode version.this can be done in the startfabric.sh itself
2.Remove the existing images of the dev-peers.
docker rmi -f $(docker images dev* -q)
Do revert in it doesnt work!

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.

connection problem Hyperledger Composer on aws-ec2 and 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.

endorser client failed to connect to peer0.org3.example.com:7051

I want to adding an org3 to an lanuched fabric-network based this tutorials:
https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html
but when I execute this command finally
peer channel join -b mychannel.block
it appears this error:
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org3.example.com:7051: failed to create new connection: context deadline exceeded
when I look the logs :
docker logs -f peer0.org1.example.com
it seems right:
2018-10-12 02:18:29.902 UTC [lscc] executeInstall -> INFO 032 Installed Chaincode [mycc] Version [1.0] to peer
2018-10-12 02:18:52.555 UTC [cceventmgmt] HandleStateUpdates -> INFO 033 Channel [mychannel]: Handling LSCC state update for chaincode [mycc]
2018-10-12 02:18:52.571 UTC [kvledger] CommitWithPvtData -> INFO 034 Channel [mychannel]: Committed block [3] with 1 transaction(s)
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 035 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 036 building chaincode with tags:
2018-10-12 02:19:17.969 UTC [kvledger] CommitWithPvtData -> INFO 037 Channel [mychannel]: Committed block [4] with 1 transaction(s)
2018-10-12 02:21:56.351 UTC [gossip/gossip] learnAnchorPeers -> INFO 038 Anchor peer with same endpoint, skipping connecting to myself
2018-10-12 02:21:56.404 UTC [kvledger] CommitWithPvtData -> INFO 039 Channel [mychannel]: Committed block [5] with 1 transaction(s)
so I want to ask why appears this question and how can I solve this problm? many thanks.
I have had the same problem with Hyperledger Fabric V1.4. I seems like the problem is with GOLANG. Add this 'GODEBUG=netdns=go' to your environment variables. I hope this helps.
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer:latest
environment:
- GODEBUG=netdns=go
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com

Resources