Closed lubaolalala closed 3 years ago
My first suspicion is that you might be behind a proxy and didn't configure docker properly or just have a very slow network connection (the go get pulls in quite some dependency and takes a bit of time). That said, to help you better, could you please fill out below template (which is what you would have got iff you selected the bug template when creating an issue ..). Primarily the steps to reproduce and the environment is important. Also if you could attach the complete log-file from make also might help ...
Describe the bug <-- Add a clear and concise description of what the bug is. -->
To Reproduce <-- Add steps to reproduce the behavior, e.g.
Expected behavior <-- Add a clear and concise description of what you expected to happen. -->
Log-filesScreenshots <-- If applicable, add screenshots to help explain your problem. -->
Environment (please complete the following information) <--
Additional context <-- Add any other context about the problem here. -->
Describe the bug
when I run the command make
,it shows that Step 17/21 : RUN go get golang.org/x/tools/cmd/goimports && go get google.golang.org/protobuf/cmd/protoc-gen-go && GO111MODULE=off go get github.com/maxbrunsfeld/counterfeiter
couldn't correctly run.(timeout or connection refused)
To Reproduce
cd fabric-private-chaincode
make
Log-filesScreenshots
Step 14/21 : ENV GOROOT=/usr/local/go
---> Using cache
---> 3df63d737fc1
Step 15/21 : RUN GO_TAR=go${GO_VERSION}.linux-amd64.tar.gz && wget -q https://dl.google.com/go/${GO_TAR} && tar -xf ${GO_TAR} && mv go /usr/local && rm ${GO_TAR} && mkdir -p /project
---> Using cache
---> 13b3be17b020
Step 16/21 : ENV PATH=${GOPATH}/bin:${GOROOT}/bin:${PATH}
---> Using cache
---> f7d7027fdf8f
Step 17/21 : RUN go get golang.org/x/tools/cmd/goimports && go get google.golang.org/protobuf/cmd/protoc-gen-go && GO111MODULE=off go get github.com/maxbrunsfeld/counterfeiter
---> Running in 0b6d1bfc7f71
_package golang.org/x/tools/cmd/goimports: unrecognized import path "golang.org/x/tools/cmd/goimports": https fetch: Get "https://golang.org/x/tools/cmd/goimports?go-get=1": proxyconnect tcp: dial tcp 127.0.0.1:12333: connect: connection refused_
The command '/bin/sh -c go get golang.org/x/tools/cmd/goimports && go get google.golang.org/protobuf/cmd/protoc-gen-go && GO111MODULE=off go get github.com/maxbrunsfeld/counterfeiter' returned a non-zero code: 1
make[2]: *** [Makefile:162: base-dev] Error 1
make[2]: Leaving directory '/home/luabolalala/go/src/github.com/hyperledger-labs/fabric-private-chaincode/utils/docker'
make[1]: *** [Makefile:11: build] Error 2
make[1]: Leaving directory '/home/luabolalala/go/src/github.com/hyperledger-labs/fabric-private-chaincode/utils'
make: *** [Makefile:22: build] Error 2
Environment Ubuntu 20.04 FPC the newest version hyperledger fabric v2.2.0 docker 19.03.9 docker-compose 1.25.0-rc1
Additional context It seems like I didn't set the proxy.Therefore I followed the description of working from behind a proxy.But it showed connetction refused.But the proxy doesn't exist problems.
Hmm, Ubuntu 20.04 is not officially supported (and should actually fail with the recommended SGX version!). There is a current open PR (#509) which should improve on this, though. Not that your problem seems related to this, though. If you don't use a proxy, then i have no other good idea why it fails for you. If you really run make
from FPC top-level then a go get
for goimports must have succeeded on your host and it just fails inside a docker build. So something with your docker setup must seem broken.
BTW: also note that as the README.md
states, master
is not a recommended version on would be better to start with Concept Release 2.0 (i.e., branch concept-release-2.0
and/or tag cr2.0.0
).
Thank you for solving my problems! I will check my docker setup , and try your suggestions.
Let's close this one. Please feel free to re-open if there is still an issue. Thanks
Step 17/21 : RUN go get golang.org/x/tools/cmd/goimports && go get google.golang.org/protobuf/cmd/protoc-gen-go && GO111MODULE=off go get github.com/maxbrunsfeld/counterfeiter ---> Running in e7caf029ea10 package golang.org/x/tools/cmd/goimports: unrecognized import path "golang.org/x/tools/cmd/goimports": https fetch: Get "https://golang.org/x/tools/cmd/goimports?go-get=1": dial tcp 216.239.37.1:443: i/o timeout The command '/bin/sh -c go get golang.org/x/tools/cmd/goimports && go get google.golang.org/protobuf/cmd/protoc-gen-go && GO111MODULE=off go get github.com/maxbrunsfeld/counterfeiter' returned a non-zero code: 1 make[2]: *** [Makefile:162: base-dev] Error 1 make[2]: Leaving directory '/home/luabolalala/go/src/github.com/hyperledger-labs/fabric-private-chaincode/utils/docker' make[1]: *** [Makefile:11: build] Error 2 make[1]: Leaving directory '/home/luabolalala/go/src/github.com/hyperledger-labs/fabric-private-chaincode/utils' make: *** [Makefile:22: build] Error 2
I've struggled with the problem for many days. I would be appreciative if you could help me solve it.