Reputation: 348
Can anyone help me fixing below error. I'm trying to install chaincode on peer via cli. I configured cli container correctly. But somehow Im getting this error..
grpc: addrConn.createTransport failed to connect to {peer0.org1.example.com:7051 0 <nil>}. Err :connection error: desc = “transport: Error while dialing dial tcp: lookup peer0.org1.example.com on 127.0.0.11:53: connection refused
Here is my docker-compose-cli.yaml
Upvotes: 6
Views: 23254
Reputation: 1
solution 1 : use the command: sudo echo "nameserver 8.8.8.8" and start once again
Solution 2 : check your container logs and see
use the command "docker logs container-id"
Solution 3 :add "dns_serach: ." in docker-compose.yaml file and start once again as below
** dns_search: . **
Upvotes: -1
Reputation: 12013
You can run into odd DNS resolution issues depending on the configuration of DNS on your host system. The easiest thing to try is to add the dns_search
config value to your Compose file:
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
stdin_open: true
dns_search: .
See https://stackoverflow.com/a/45916717/6160507 as well ... you might need this for all of your services.
Upvotes: 0