hyperledger fabric 2.0.0 fabcar running issue

I have installed hyperledger fabric 2.0.0. When I try to run the fabcar example, I am getting an error like this “Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded”.

When I checked in docker logs using docker logs peer0.org1.example.com, It shows warning “Retrying couchdb request in 250ms. Error:Get http://couchdb0:5984/: dial tcp 172.22.0.8:5984: connect: connection refused”.

I pruned all the docker images and installed again. I gave tried adding dns search in .yml files. And tried checking docker network inspect.

Source: StackOverflow