Hyperledger Fabric fails to trigger FSM event REGISTER - hyperledger-fabric

There are multiple peer nodes, a single orderer and a single CA authority for production and want to deploy the chaincode. I have the compiled chaincode and the go file in a directory called chaincode-app/
The peer node has a docker instance running with the name peer0-vm. I want to deploy my chaincode using this peer. When I run
docker exec peer0-vm peer chaincode install -n mycc -v 1.0 -p chaincode-app/
I receive the following error:
2018-01-03 05:35:30.577 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-01-03 05:35:30.578 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: Error getting chaincode code chaincode: <go, [env]>: failed with error: "exec: not started"
The peer logs are as follows:
2018-01-02 11:00:29.826 UTC [gossip/gossip] NewGossipService -> WARN 014 External endpoint is empty, peer will not be accessible outside of its organization
2018-01-02 11:00:29.829 UTC [gossip/gossip] start -> INFO 015 Gossip instance 0.0.0.0:7051 started
2018-01-02 11:00:29.830 UTC [cscc] Init -> INFO 016 Init CSCC
2018-01-02 11:00:29.830 UTC [sccapi] deploySysCC -> INFO 017 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-01-02 11:00:29.830 UTC [sccapi] deploySysCC -> INFO 018 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-01-02 11:00:29.831 UTC [escc] Init -> INFO 019 Successfully initialized ESCC
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01a system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01b system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-01-02 11:00:29.831 UTC [qscc] Init -> INFO 01c Init QSCC
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01d system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-01-02 11:00:29.832 UTC [nodeCmd] initSysCCs -> INFO 01e Deployed system chaincodess
2018-01-02 11:00:29.832 UTC [nodeCmd] serve -> INFO 01f Starting peer with ID=[name:"fabsmbqxc-peer0.org1.example.com" ], network ID=[dev], address=[0.0.0.0:7051]
2018-01-02 11:00:29.832 UTC [nodeCmd] serve -> INFO 020 Started peer with ID=[name:"fabsmbqxc-peer0.org1.example.com" ], network ID=[dev], address=[0.0.0.0:7051]
2018-01-02 14:06:22.467 UTC [chaincode] notifyDuringStartup -> WARN 021 trying to manually run chaincode when not in devmode ?
2018-01-02 14:06:22.467 UTC [chaincode] HandleMessage -> ERRO 022 []Failed to trigger FSM event REGISTER: transition canceled with error: peer will not accepting external chaincode connection name:"chaincode-app:1.0" (except in dev mode)
2018-01-02 14:06:22.467 UTC [chaincode] processStream -> ERRO 023 []Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"chaincode-app:1.0" (except in dev mode)
On a quick read, I understood that the chaincode cannot be executed by the user and should be instead done by the peer. Can someone point out how I could deploy this chaincode?
I've tried to follow the lifecycle of package -> install -> instantiate -> upgrade and tried to package the chaincode before signing and installing using the command but failed.
docker exec peer0-vm peer chaincode package -n mycc -v 1.0 -p chaincode-app -s -S ccpack.out
Could someone point out where I am going wrong and a possible solution?

The peer node has a docker instance running with the name peer0-vm. I want to deploy my chaincode using this peer.
Running CLI install from the peer container won't work.
If you are using docker to execute CLI you should use containers built from hyperledger/fabric-tools. The e2e_cli samples under fabric/examples/e2e_cli is a good reference for all this. In particular do take a look at how the CLI is constructed in docker-compose-cli.yaml please.
There may be other issues but this would be the first one to fix to make sure install works.

Related

Cannot instantiate chaincode on hyperledger fabric network

I tried instantiating well tested chaincode onto my fabric network but got issue summarized as "cannot register chaincode".
There is no trace of chaincode container. I have tested my chaincodes and they pass all the base tests so there is no issue with the code. No matter on whichever orgs peer I run this, instantiation keeps failing.
Can someone help?
Hyperledger fabric version controlling platform mentions a same bug filed but I don't see what solution they came up with (https://jira.hyperledger.org/browse/FAB-14638). They seem to say something about the node version mismatch.
cli logs :
peer chaincode instantiate -o orderer.flightcommand.com:7050 -C flightcommandchannel -l node -n TripCC -v v0 -c '{"Args":["init"]}' -P 'AND ("CapitalcityMSP.member")' 2019-05-08 05:40:55.146 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-05-08 05:40:55.150 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0**
peer logs :
[flightcommandchannel][97cbe635] Exit chaincode: name:"lscc" (98834ms)
2019-05-08 05:42:33.897 UTC [endorser] SimulateProposal -> ERRO 18f [flightcommandchannel][97cbe635] failed to invoke chaincode name:"lscc" , error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed
2019-05-08 05:42:33.898 UTC [comm.grpc.server] 1 -> INFO 190 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=192.168.96.12:38100 grpc.code=OK grpc.call_duration=1m38.836283s
I have finally found the issue. I missed out a ENV Variable to specify in the peer docker-compose.yaml.
"- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=network_1.0"
Where network_1.0 is the name of the docker network. Although the error messages was not so descriptive, I took some pain and rebuilt my prevoius project where chaincode deployment did work and compared it with my current project. Found only this piece missing and after adding it, to my surprise, everything worked.
Port 7052 is unlikely to be the problem here. This is the explanation (from core.yaml) about port 7052.
# The endpoint this peer uses to listen for inbound chaincode connections.
# If this is commented-out, the listen address is selected to be
# the peer's address (see below) with port 7052
# chaincodeListenAddress: 0.0.0.0:7052
In your debug output I see "chaincodeBuildlevel":"1.4.1-rc1"
I think you are using Fabric Images for 1.4.1-rc1.
I would suggest removing the Docker Images on your system and replacing with 1.4.1 and then using fabric-shim 1.4.1 too for consistency. This might clear the problem, but will certainly be a better place to continue investigations.
Updated following comments
With Docker Compose, if your group of containers are started on the same Network Bridge (on the same host machine/VM) they can resolve each others' addresses and connect on any port.
The mapping of Ports in the docker-compose.yaml file maps ports from the host computer into the container (not between containers).
Port 7053 used to be used for Events in older versions of Fabric, but it is not used in 1.4.1
The error you have now shown in the comment is a Name Resolution error so not to do with the ports. Perhaps your containers are not on the same Docker Bridge?
I modified the logging level of the peer and got to see something bizzare. Following are the chaincode logs in debug mode.
2019-05-08 11:21:52.980 UTC [endorser] callChaincode -> INFO 04f [flightcommandchannel][d01daf8c] Entry chaincode: name:"lscc"
2019-05-08 11:21:54.424 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 050
2019-05-08 11:21:54.426 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 051 > trip#1.0.0 start /usr/local/src
2019-05-08 11:21:54.427 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 052 > **NODE_ENV=development node account.js "--peer.address" "peer0.onesky.flightcommand.com:7052"**
2019-05-08 11:21:54.428 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 053
2019-05-08 11:21:55.124 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 054 2019-05-08T11:21:55.118Z debug [lib/chaincode.js] debug: Starting chaincode using options {"_":[],"peer.address":"peer0.onesky.flightcommand.com:7052","chaincodeBuildlevel":"1.4.1-rc1","chaincodeLoggingLevel":"debug","chaincodeLoggingFormat":"%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}","chaincodeIdName":"AccountChaincode:v0","chaincodeLoggingShim":"debug","peerTlsEnabled":"false","grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1,"grpc.keepalive_time_ms":110000,"grpc.http2.min_time_between_pings_ms":110000,"grpc.keepalive_timeout_ms":20000,"grpc.http2.max_pings_without_data":0,"grpc.keepalive_permit_without_calls":1,"module-path":"/usr/local/src","modulePath":"/usr/local/src","chaincode-id-name":"AccountChaincode:v0","timestamp":"2019-05-08T11:21:55.118Z"}
2019-05-08 11:21:55.128 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 055 2019-05-08T11:21:55.127Z debug [lib/chaincode.js] debug: Peer URL {"0":"g","1":"r","2":"p","3":"c","4":":","5":"/","6":"/","7":"p","8":"e","9":"e","10":"r","11":"0","12":".","13":"o","14":"n","15":"e","16":"s","17":"k","18":"y","19":".","20":"f","21":"l","22":"i","23":"g","24":"h","25":"t","26":"c","27":"o","28":"m","29":"m","30":"a","31":"n","32":"d","33":".","34":"c","35":"o","36":"m","37":":","38":"7","39":"0","40":"5","41":"2","timestamp":"2019-05-08T11:21:55.127Z"}
2019-05-08 11:21:55.135 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 056 2019-05-08T11:21:55.135Z info [lib/chaincode.js] info: Registering with peer peer0.onesky.flightcommand.com:7052 as chaincode "AccountChaincode:v0" {"timestamp":"2019-05-08T11:21:55.135Z"}
2019-05-08 11:21:55.147 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 057 2019-05-08T11:21:55.146Z debug [lib/handler.js] debug: Sending chat message: {"type":1,"payload":{"type":"Buffer","data":[18,19,65,99,99,111,117,110,116,67,104,97,105,110,99,111,100,101,58,118,48]}} {"timestamp":"2019-05-08T11:21:55.146Z"}
2019-05-08 11:21:55.440 UTC [peer.chaincode.dev-peer0.onesky.flightcommand.com-AccountChaincode-v0] func2 -> INFO 058 2019-05-08T11:21:55.437Z error [lib/handler.js] error: Chat stream with peer - on error: "Error: 14 UNAVAILABLE: Name resolution failure\n at Object.exports.createStatusError (/usr/local/src/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:1306:15)\n at InterceptingListener._callNext (/usr/local/src/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:618:8)\n at /usr/local/src/node_modules/grpc/src/client_interceptors.js:1123:18" {"timestamp":"2019-05-08T11:21:55.437Z"}
2019-05-08 11:21:55.617 UTC [dockercontroller] func2 -> INFO 059 Container dev-peer0.onesky.flightcommand.com-AccountChaincode-v0 has closed its IO channel
2019-05-08 11:21:56.091 UTC [endorser] callChaincode -> INFO 05a [flightcommandchannel][d01daf8c] Exit chaincode: name:"lscc" (3111ms)
2019-05-08 11:21:56.091 UTC [endorser] SimulateProposal -> ERRO 05b [flightcommandchannel][d01daf8c] failed to invoke chaincode name:"lscc" , error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed
2019-05-08 11:21:56.091 UTC [comm.grpc.server] 1 -> INFO 05c unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.25.0.4:59932 grpc.code=OK grpc.call_duration=3.1157286s
So here lies the problem. My peer listens on port 7051, not 7052. Ideally the command should look like "NODE_ENV=development node account.js "--peer.address" "peer0.onesky.flightcommand.com:7051"". I have no idea from where it is getting 7052.
P.S.
I added following to get a better overview of the issue in the chaincode instantiation.
FABRIC_LOGGING_SPEC=info
CORE_CHAINCODE_LOGGING_SHIM=debug
CORE_CHAINCODE_LOGGING_LEVEL=debug
core.yaml says
# The endpoint this peer uses to listen for inbound chaincode connections.
# If this is commented-out, the listen address is selected to be
# the peer's address (see below) with port 7052
# chaincodeListenAddress: 0.0.0.0:7052
# The endpoint the chaincode for this peer uses to connect to the peer.
# If this is not specified, the chaincodeListenAddress address is selected.
# And if chaincodeListenAddress is not specified, address is selected from
# peer listenAddress.
# chaincodeAddress: 0.0.0.0:7052
So I concluded since both are commented, 7051 is used as the address to listen to chaincode.
I faced exactly the same problem whenever I tried to instantiate the chaincode, I got this error
peer logs:
2019-05-09 04:05:38.285 EDT [endorser] SimulateProposal -> ERRO 15c [mychannel][03349c15] failed to invoke chaincode name:"lscc" , error: container exited with 1
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/home/alex/go/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1337
chaincode registration failed
I was able to fix it by changing build.gradle file, make sure in your build.gradle you have set Main-Class in manifest attributes to your main java file.
shadowJar {
baseName = 'chaincode'
version = null
classifier = null
manifest {
attributes 'Main-Class': 'org.hyperledger.fabric.chaincode.XXX'
}
}
Where XXX is the XXX.java file where your main() function is defined
Not sure how can this be done in node. But I hope this will give you the idea.
i faced the same issue not find any solution yet.
2021-03-25 04:53:55.840 UTC [endorser] SimulateProposal -> ERRO 046 failed to invoke chaincode bankcc, error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/go/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:118
and this my chaincode container logs
Error starting Marbles02 chaincode: ccid must be specified
but i specified the ccid here
server := &shim.ChaincodeServer{
//CCID: ccid,
CCID: os.Getenv("CHAINCODE_CCID"),
Address: os.Getenv("CHAINCODE_ADDRESS"),
CC: chaincode,
TLSProps: shim.TLSProperties{
Disabled: true,
},
I had the same problem,and I have sloved it by change peer env,and I think this problem was caused by CORE_PEER_ADDRESSAUTODETECT,actual,I dont know why .
I set CORE_PEER_ADDRESSAUTODETECT=true ,commented CORE_PEER_CHAINCODEADDRESS and CORE_PEER_CHAINCODELISTENADDRESS,It is work.
my peer env like this :
CORE_PEER_ADDRESSAUTODETECT=true
#CORE_PEER_CHAINCODEADDRESS=peer0.org1.example.com:30012
#CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:30012

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.

Hyperledger - peer unable to instantiate chaincode after joining channel

I currently have a running Kafka-based hyperledger running on docker.
The full container list is as such:
2x orderer
2x peer
1x certificate-authority
3x zookeeper
4x kafka nodes
1x cli tools
I have sucessfully created a channel using cli by the following command
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/users/Admin#company/msp" peer0.company peer channel create -o orderer0.company:7050 -c messagebus -f /etc/hyperledger/configtx/channel.tx
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/users/Admin#company/msp" peer0.company peer channel join -b messagebus.block
I can see the peer is joined using the following command:
docker exec cli peer channel list
2019-01-07 16:54:41.784 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
Channels peers has joined:
messagebus
I then want to init and instantiate my chaincode as such
#install the chaincode
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/company/users/Admin#company/msp" cli peer chaincode install -n testnet -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE"
2019-01-07 16:46:23.154 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-01-07 16:46:23.154 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2019-01-07 16:46:23.615 UTC [chaincodeCmd] install -> INFO 005 Installed remotely response:<status:200 payload:"OK" >
#instantiate the chaincode
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/company/users/Admin#company/msp" cli peer chaincode instantiate -o orderer0.company:7050 -C messagebus -n testnet -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')"
2019-01-07 16:46:24.210 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-01-07 16:46:24.210 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
Error: error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [messagebus] creator org [Org1MSP]
As the final line shows, the access is denied to the channel.
I am also unable to join a Java SDK client to the channel and receive similar access denied errors.
I see the following logs in the peer0 container:
2019-01-07 16:46:23.611 UTC [endorser] callChaincode -> INFO 0f1 [][bfb2e2d4] Entry chaincode: name:"lscc"
2019-01-07 16:46:23.614 UTC [lscc] executeInstall -> INFO 0f2 Installed Chaincode [gmex] Version [1.0] to peer
2019-01-07 16:46:23.614 UTC [endorser] callChaincode -> INFO 0f3 [][bfb2e2d4] Exit chaincode: name:"lscc" (2ms)
2019-01-07 16:46:23.614 UTC [comm.grpc.server] 1 -> INFO 0f4 unary call completed {"grpc.start_time": "2019-01-07T16:46:23.61Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "XXX.XXX.X.XXX:123", "grpc.code": "OK", "grpc.call_duration": "3.771114ms"}
2019-01-07 16:46:24.214 UTC [protoutils] ValidateProposalMessage -> WARN 0f5 channel [messagebus]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.company")
this leads me to believe the peer is not correctly setup... however it is able to create the channel successfully.
Any pointers would be appreciated

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