Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go build or go mod vendor need do retries when trying to download modules #46237

Closed
volvofixthis opened this issue May 18, 2021 · 1 comment

Comments

@volvofixthis
Copy link

volvofixthis commented May 18, 2021

What version of Go are you using (go version)?

go version go1.16.4 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY="bitbucket.rbc.ru/pro/*,bitbucket.rbc.ru/go/*"
GONOSUMDB="bitbucket.rbc.ru/pro/*,bitbucket.rbc.ru/go/*"
GOOS="linux"
GOPATH="/go"
GOPRIVATE="bitbucket.rbc.ru/pro/*,bitbucket.rbc.ru/go/*"
GOPROXY="https://web-registry.k8s.public.ru/repository/goproxy/"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org https://athens.infra.rbc.ru/sumdb/sum.golang.org/"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="/usr/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/app/billing-sp/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3813495580=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Tried to run go build

What did you expect to see?

All dependencies are downloaded successfully, executable is built.

What did you see instead?

Sometimes there are errors like:

  1. http2: server sent GOAWAY and closed the connection; LastStreamID=1999, ErrCode=NO_ERROR
  2. unexpected EOF

Can we do some retries when such thing happens? It becomes almost impossible to build application when one of repositories is not stable or in case of our goproxy have wrong settings. We solved problem on our side by increasing http2_max_requests for web server of our nexus from 1000(default) to 10000.

@dmitshur
Copy link
Contributor

Thanks for the report. I believe this is a duplicate of #28194.

CC @bcmills, @jayconrod, @matloob.

@golang golang locked and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants