I have a problem that there is always a grpcs timeout when installing the chaincode using fabric-sdk-go. The GRCPS request is made from the local machine to its docker containers.
ErrorMsg:
lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]
ENV:
Mac OSX
docker version: 18.03.1-ce
docker-compose version 1.21.1, build 5a3f1a3
fabric-sdk-go: master
The local fabric network is set up by the official fabric-ca example.
docker-compose.yaml: Gist
local network-config.yaml: Gist
client go app: Gist
Is there anything wrong with my network-config.yaml???
What I've tried:
Tried to disable CORE_PEER_TLS_CLIENTAUTHREQUIRED in docker-compose.yaml, failed..
Edited /etc/hosts file with the line 127.0.0.1 peer1-xiaoyudian..., failed..
Increased the peer.timeout.connections and others timeout options in network-config.yaml, failed..
Increased the grpcOptions.keep-alive-time in network-config.yaml, failed..
Changed the host of peers.xxxx.url from localhost to the domain in network-config.yaml, failed...
Added the entityMathcers in network-config.yaml, failed...
Failed....
Answer: Someone from the rocket.chat told me:
- run: export GRPC_GO_LOG_SEVERITY_LEVEL=error
- run: export GRPC_GO_LOG_VERBOSITY_LEVEL=2
- in the client code add this line: grpclog.SetLogger(logger)
And the log says it a certificate issue for handshaking with peers.