0

It is solved, please see this: Connection timeout when installing chaincode using fabric-sdk-go

Dev ENV: Mac and Docker (3 CAs, 3 Orgs, 4 Peers)

Fabric SDK: fabric-sdk-go

Description: I use the sdk to install the chaincode but it errors out when sending proposal to the endorser. Seems that I cannot send the grpc request to the container. Things are working fine with the http request to the fabric CA containers.

ErrorMessage: unable to verify if cc is installed on grpcs://peer1-xxxx:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer1-xxxx:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1-xxxx:7051]

Dean Zhao
  • 99
  • 3
  • 13
  • Assuming you are running the SDK on your host, what happens if you try `ping peer1-xxxx` on your host system? – Gari Singh Jun 07 '18 at 09:24
  • @GariSingh 64 `bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.049 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.126 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.087 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.067 ms 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.093 ms` peer1-xxxx is mapped to 127.0.0.1 in the /etc/hosts file – Dean Zhao Jun 07 '18 at 09:29
  • How did you start your peers? Are you using Docker Compose? If so, can you post your compose file? It's likely that your peers are actually listening on different ports as you cannot expose them all on the same port on the host – Gari Singh Jun 07 '18 at 09:32
  • @GariSingh See the gist please https://gist.github.com/RealDeanZhao/49afda54103c76956a47bec167a93559 – Dean Zhao Jun 07 '18 at 09:42
  • So it looks like you should be able to connect to *peer1-xiaoyudian:7051* and *peer1-jinzun:7151* ? – Gari Singh Jun 07 '18 at 11:17
  • @GariSingh I can only send the https request to ica-xiaoyudian:8054 but still cannot send grpcs request to peer1-xiaoyudian:7051 and peer2-xiaoyudian:8051. – Dean Zhao Jun 07 '18 at 15:33
  • Hmm .... can you post the output of *sudo lsof -iTCP -sTCP:LISTEN -n -P* – Gari Singh Jun 08 '18 at 09:26
  • com.docke 66486 dean 54u IPv4 0xfd03d871caab9c63 0t0 TCP *:7051 (LISTEN) com.docke 66486 dean 55u IPv6 0xfd03d871cd9b525b 0t0 TCP [::1]:7051 (LISTEN) – Dean Zhao Jun 09 '18 at 13:33

0 Answers0