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

较大的包下载过程出错 #14

Open
zsy5172 opened this issue Nov 23, 2022 · 3 comments
Open

较大的包下载过程出错 #14

zsy5172 opened this issue Nov 23, 2022 · 3 comments

Comments

@zsy5172
Copy link

zsy5172 commented Nov 23, 2022

docker环境下,以较慢的速度(kb/s)下载大文件的时候,时不时会出错

2022/11/23 09:11:21 172.31.1.82 "GET http://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/n/networkd-dispatcher/networkd-dispatcher_2.1-2%7eubuntu20.04.3_all.deb HTTP/1.1" (OK) 15476 MISS 454.480627ms
2022/11/23 09:11:21 rewrote "/ubuntu/pool/main/s/systemd/udev_245.4-4ubuntu3.19_amd64.deb" to "http://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/s/systemd/udev_245.4-4ubuntu3.19_amd64.deb"
2022/11/23 09:12:13 rewrote "/ubuntu/pool/main/s/systemd/udev_245.4-4ubuntu3.19_amd64.deb" to "http://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/s/systemd/udev_245.4-4ubuntu3.19_amd64.deb"
panic: net/http: abort Handler
goroutine 760 [running]:
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc000262e60, {0x79ef78?, 0xc000016510}, 0xc0002f0000)
	/opt/hostedtoolcache/go/1.19.2/x64/src/net/http/httputil/reverseproxy.go:363 +0xee9
github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).passUpstream.func1()
	/home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:253 +0x3d
created by github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).passUpstream
	/home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:252 +0x1fb
@soulteary
Copy link
Owner

@zsy5172

感谢反馈,推测和 “timeout” 有关。我试试模拟下较慢速度 lol

@JoeyZhu
Copy link

JoeyZhu commented Feb 1, 2023

类似问题:
2023/02/01 22:25:54 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/a/avahi/avahi-daemon_0.7-3.1ubuntu1.3_arm64.deb HTTP/1.1" (OK) 56156 ^[[31;1mMISS^[[0m 1.140665658s
2023/02/01 22:25:55 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/a/avahi/avahi-utils_0.7-3.1ubuntu1.3_arm64.deb HTTP/1.1" (OK) 22200 ^[[31;1mMISS^[[0m 1.026803982s
2023/02/01 22:25:59 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/b/binutils/binutils-common_2.30-21ubuntu1%7e18.04.8_arm64.deb HTTP/1.1" (OK) 196816 ^[[31;1mMISS^[[0m 3.791026443s
2023/02/01 22:26:00 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/b/binutils/binutils_2.30-21ubuntu1%7e18.04.8_arm64.deb HTTP/1.1" (OK) 3364 ^[[31;1mMISS^[[0m 486.296309ms
2023/02/01 22:26:05 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/b/binutils/binutils-aarch64-linux-gnu_2.30-21ubuntu1%7e18.04.8_arm64.deb HTTP/1.1" (OK) 2167732 ^[[31;1mMISS^[[0m 5.246591655s
2023/02/01 22:26:08 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/b/binutils/libbinutils_2.30-21ubuntu1%7e18.04.8_arm64.deb HTTP/1.1" (OK) 416460 ^[[31;1mMISS^[[0m 3.400437817s
2023/02/01 22:26:11 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/main/b/bluez/bluez-obexd_5.48-0ubuntu3.9_arm64.deb HTTP/1.1" (OK) 141384 ^[[31;1mMISS^[[0m 2.260814118s
2023/02/01 22:26:16 192.168.2.144 "GET http://ports.ubuntu.com/ubuntu-ports/pool/universe/r/runc/runc_1.1.0-0ubuntu1%7e18.04.1_arm64.deb HTTP/1.1" (OK) 3329220 ^[[31;1mMISS^[[0m 5.402605655s
2023/02/01 22:28:12 httputil: ReverseProxy read error during body copy: read tcp 192.168.2.171:41000->185.125.190.36:80: read: connection reset by peer
panic: net/http: abort Handler

goroutine 3790 [running]:
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc00056a820, {0x79efb8?, 0xc0001aa1b0}, 0xc0000d2000)
/opt/hostedtoolcache/go/1.19.3/x64/src/net/http/httputil/reverseproxy.go:363 +0xee9
github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).passUpstream.func1()
/home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:253 +0x3d
created by github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).passUpstream
/home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:252 +0x1fb

@HorseLuke
Copy link

确实存在类似问题:

Mar 06 19:10:28 localhost bash[1458814]: 2023/03/06 19:10:28 172.17.0.2 "GET https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bullseye-updates/main/binary-amd64/by-hash/SHA256/2d610aa901b664eca2109e5cfb03cf8eecefaf95746ce7398e360f2ab02c010c HTTP/1.1" (OK) 14608 MISS 649.125916ms
Mar 06 19:10:46 localhost bash[1458814]: panic: net/http: abort Handler
Mar 06 19:10:46 localhost bash[1458814]: goroutine 506 [running]:
Mar 06 19:10:46 localhost bash[1458814]: net/http/httputil.(*ReverseProxy).ServeHTTP(0xc00024e140, {0x79efb8?, 0xc000a86120}, 0xc0004a4000)
Mar 06 19:10:46 localhost bash[1458814]:         /opt/hostedtoolcache/go/1.19.3/x64/src/net/http/httputil/reverseproxy.go:363 +0xee9
Mar 06 19:10:46 localhost bash[1458814]: github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).pipeUpstream.func1()
Mar 06 19:10:46 localhost bash[1458814]:         /home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:218 +0x3d
Mar 06 19:10:46 localhost bash[1458814]: created by github.com/soulteary/apt-proxy/pkg/httpcache.(*Handler).pipeUpstream
Mar 06 19:10:46 localhost bash[1458814]:         /home/runner/work/apt-proxy/apt-proxy/pkg/httpcache/handler.go:217 +0x165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants