fabric-sdk-go connect failed

1k Views Asked by At

I start my network with “byfn.sh -m up”,and try to query and invoke the chaincode mycc with fabric-sdk-go. But i have an issue with following errors:

2018/05/24 09:24:06 Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051]

I tried to connect it with “telnet peer0.org1.example.com 7051” and it is ok.There is no log in the docker container where the peer is.How can I find out what the problem is.

here is my code

I tried to change "peer0.org1.example.com:7051" to "192.168.1.225:7051" and the Query function but still has the issue:

2018/05/24 10:18:57 Failed to invoke: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]

At this time, changing "orderer.example.com:7050'" to "192.168.1.225:7050" did not work.

It seems that it has something to do with the crypto-config because when I add an unmatched crypto-config it gets the same error.

1

There are 1 best solutions below

0
On

Because I have a proxy by shadowsocks. It caused the error of tls.