yeasy/docker-compose-files

Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Post http://unix.sock/containers/create?name=dev-peer0.org1.example.com-mycc-1.0: dial unix /var/run/docker.sock: connect: permission denied

willenchou opened this issue · 3 comments

Environment

uname -a
3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/gopath"
GORACE=""
GOROOT="/usr/local/src/go"
GOTOOLDIR="/usr/local/src/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build764740552=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
docker version
Client:
Version: 1.12.6
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/yeasy/hyperledger-fabric-ca 1.0.0 963e8704e9b2 2 weeks ago 846.4 MB
hyperledger/fabric-ca latest 963e8704e9b2 2 weeks ago 846.4 MB
docker.io/yeasy/hyperledger-fabric-peer 1.0.0 c19c5a1ed806 2 weeks ago 1.024 GB
hyperledger/fabric-peer latest c19c5a1ed806 2 weeks ago 1.024 GB
hyperledger/fabric-tools latest c19c5a1ed806 2 weeks ago 1.024 GB
docker.io/yeasy/hyperledger-fabric-orderer 1.0.0 46bbc2cbac2d 2 weeks ago 1.013 GB
hyperledger/fabric-orderer latest 46bbc2cbac2d 2 weeks ago 1.013 GB
hyperledger/fabric-baseos latest 21e9f22bc020 3 weeks ago 987.1 MB
hyperledger/fabric-baseos x86_64-0.3.1 21e9f22bc020 3 weeks ago 987.1 MB
hyperledger/fabric-ccenv x86_64-1.0.0 21e9f22bc020 3 weeks ago 987.1 MB
docker.io/yeasy/hyperledger-fabric-base 1.0.0 21e9f22bc020 3 weeks ago 987.1 MB
hyperledger/fabric-base latest 21e9f22bc020 3 weeks ago 987.1 MB
hyperledger/fabric-baseimage latest 21e9f22bc020 3 weeks ago 987.1 MB
hyperledger/fabric-baseimage x86_64-0.3.1 21e9f22bc020 3 weeks ago 987.1 MB
docker.io/hyperledger/fabric-couchdb x86_64-1.0.0 2fbdbf3ab945 3 weeks ago 1.481 GB
hyperledger/fabric-couchdb latest 2fbdbf3ab945 3 weeks ago 1.481 GB
docker.io/hyperledger/fabric-kafka x86_64-1.0.0 dbd3f94de4b5 3 weeks ago 1.297 GB
hyperledger/fabric-kafka latest dbd3f94de4b5 3 weeks ago 1.297 GB
hyperledger/fabric-zookeeper latest e545dbf1c6af 3 weeks ago 1.312 GB
docker.io/hyperledger/fabric-zookeeper x86_64-1.0.0 e545dbf1c6af 3 weeks ago 1.312 GB

How to repeat the problem?

make start

docker-compose -f "docker-compose-2orgs-4peers.yaml" up -d # Start a fabric network
Creating network "10_default" with the default driver
Creating peer1.org1.example.com ...
Creating peer1.org2.example.com ...
Creating peer0.org2.example.com ...
Creating fabric-ca ...
Creating peer0.org1.example.com ...
Creating orderer.example.com ...
Creating peer0.org2.example.com
Creating peer1.org2.example.com
Creating orderer.example.com
Creating fabric-ca
Creating peer1.org1.example.com
Creating peer0.org1.example.com ... done
Creating fabric-cli ...
Creating fabric-cli ... done
make init
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Post http://unix.sock/containers/create?name=dev-peer0.org1.example.com-mycc-1.0: dial unix /var/run/docker.sock: connect: permission denied

Detailed steps to repeat the problem.
make init
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Post http://unix.sock/containers/create?name=dev-peer0.org1.example.com-mycc-1.0: dial unix /var/run/docker.sock: connect: permission denied

What solutions have u tried?

Potential solutions you have tried, e.g., search Google or restart the computer.

Other Information

Other information u think can help to fix the problem.

@willenchou Add sudo, sudo docker-compose -f docker-compose-2orgs-4peers.yaml up -d

anyone help?
I have the same problem