При попытке инициализировать SDK с моей локальной сетью я сталкиваюсь с проблемой ниже. Я видел несколько похожих постов, в которых упоминается, что добавление entityMachers в файл config.yaml исправляет эту проблему, но даже после добавления entityMatchers я сталкиваюсь с этой проблемой.
alpha@GHOST-RIDER:/c/Projects/Go/src/github.com/hyperledger/firstproject$ ./firstproject
SDK created
Resource management client created
value of req is: {testchannelid <nil> /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/artifacts/channel.tx [0xc0001e0fa0]}
Value of setup.Orderer is: orderer.firstproject.com
Unable to initialize the Fabric SDK: failed to save channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7050]
config.yaml
orderers:
orderer.firstproject.com:
url: localhost:7050
grpcOptions:
ssl-target-name-override: orderer.firstproject.com
keep-alive-time: 0s
keep-alive-timeout: 20s
keep-alive-permit: false
fail-fast: false
allow-insecure: true
tlsCACerts:
# Certificate location absolute path
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem
entityMatchers:
orderer:
- pattern: (\w+).firstproject.(\w+):(\d+)
urlSubstitutionExp: localhost:7050
sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com
mappedHost: orderer.firstproject.com
- pattern: (\w+).firstproject.(\w+)
urlSubstitutionExp: localhost:7050
sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com
mappedHost: orderer.firstproject.com
Статус докера
alpha@GHOST-RIDER:/c/Projects/Go/src/github.com/hyperledger/firstproject$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6ccd2d384082 hyperledger/fabric-peer:latest "peer node start" 33 minutes ago Up 33 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.firstproject.com
0956d1988170 hyperledger/fabric-peer:latest "peer node start" 33 minutes ago Up 33 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.firstproject.com
6a5018a5cca4 hyperledger/fabric-orderer:latest "orderer" 33 minutes ago Up 33 minutes 0.0.0.0:7050->7050/tcp orderer.firstproject.com
4f6e8e0f6c48 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 33 minutes ago Up 33 minutes 0.0.0.0:7054->7054/tcp ca.org1.firstproject.com