goproxy / goproxy.cn

The most trusted Go module proxy in China.
https://goproxy.cn
MIT License
6.83k stars 394 forks source link

问题:配置了 go proxy,还是出现下载失败的问题 #203

Closed sgwhat closed 7 months ago

sgwhat commented 8 months ago

你确定我们的常见问题页面中没有你想要询问的问题吗?

确定

当你执行 go version 命令后的输出结果是什么?

$ go version
go version go1.22.1 windows/amd64

当你执行 go env 命令后的输出结果是什么?

go env 的输出结果
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\arda\AppData\Local\go-build
set GOENV=C:\Users\arda\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\arda\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\arda\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\arda\sgwhat\ollama\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\arda\AppData\Local\Temp\go-build2530848256=/tmp/go-build -gno-record-gcc-switches

你做了什么?

执行了 go build .

你期望看到的结果是什么?

go download 成功。

你实际看到的结果是什么?

go: downloading github.com/mitchellh/mapstructure v1.5.0 go: downloading github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1 go: downloading github.com/pdevine/tensor v0.0.0-20240228013915-64ccaa8d9ca9 go: downloading github.com/x448/float16 v0.8.4 llm\gguf.go:13:2: github.com/d4l3k/go-bfloat16@v0.0.0-20211005043715-690c3bdd05f1: Get "https://goproxy.cn/github.com/d4l3k/go-bfloat16/@v/v0.0.0-20211005043715-690c3bdd05f1.zip": dial tcp 146.112.61.106:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. llm\gguf.go:14:2: github.com/pdevine/tensor@v0.0.0-20240228013915-64ccaa8d9ca9: Get "https://goproxy.cn/github.com/pdevine/tensor/@v/v0.0.0-20240228013915-64ccaa8d9ca9.zip": dial tcp 146.112.61.106:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. llm\gguf.go:15:2: github.com/pdevine/tensor@v0.0.0-20240228013915-64ccaa8d9ca9: Get "https://goproxy.cn/github.com/pdevine/tensor/@v/v0.0.0-20240228013915-64ccaa8d9ca9.zip": dial tcp 146.112.61.106:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. llm\gguf.go:16:2: github.com/x448/float16@v0.8.4: Get "https://goproxy.cn/github.com/x448/float16/@v/v0.8.4.zip": dial tcp 146.112.61.106:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. convert\convert.go:16:2: github.com/mitchellh/mapstructure@v1.5.0: Get "https://goproxy.cn/github.com/mitchellh/mapstructure/@v/v1.5.0.zip": dial tcp 146.112.61.106:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

aofei commented 8 months ago

connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

这类错误的意思指的是你的系统中存在的系统级代理(比如 HTTP_PROXY、HTTPS_PROXY、SOCKS_PROXY 等)工作异常,导致 Go HTTP client 建立连接失败。

sgwhat commented 8 months ago

connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

这类错误的意思指的是你的系统中存在的系统级代理(比如 HTTP_PROXY、HTTPS_PROXY、SOCKS_PROXY 等)工作异常,导致 Go HTTP client 建立连接失败。

我关掉了所有的系统代理,还是存在同样的问题

aofei commented 8 months ago

dial tcp 146.112.61.106:443

你提供的错误信息里的这个 IP 地址就是你的系统级代理的。

抱歉这个我就没法帮忙了,你需要自己研究下你的系统代理哪里配置有问题,有些奇怪的代理即使是关闭了也不会还原配置。

aofei commented 7 months ago

由于长时间没有新的回复,且问题是本地系统环境异常导致的,这个 issue 我就先关闭了,如果还有其他问题欢迎随时开新 issue 提问。