henson / proxypool

Golang实现的IP代理池
Apache License 2.0
1.65k stars 341 forks source link

已经正常启动,获取https代理时报错 #31

Closed lxl315 closed 5 years ago

lxl315 commented 5 years ago

2019/03/20 17:25:33 http: panic serving [::1]:14121: runtime error: invalid memory address or nil pointer dereference goroutine 1023 [running]: net/http.(conn).serve.func1(0xc000056b40) C:/Go/src/net/http/server.go:1769 +0x140 panic(0xb127a0, 0xa68160) C:/Go/src/runtime/panic.go:522 +0x1c3 github.com/henson/proxypool/pkg/storage.ProxyFind(0xb9f032, 0x5, 0xba5f21) D:/goworker/src/github.com/henson/proxypool/pkg/storage/filter.go:102 +0x5a github.com/henson/proxypool/api.FindHandler(0xc7a400, 0xc0001e0540, 0xc0000e2800) D:/goworker/src/github.com/henson/proxypool/api/api.go:41 +0x145 net/http.HandlerFunc.ServeHTTP(0xbd41a0, 0xc7a400, 0xc0001e0540, 0xc0000e2800) C:/Go/src/net/http/server.go:1995 +0x4b net/http.(ServeMux).ServeHTTP(0xc0001b0100, 0xc7a400, 0xc0001e0540, 0xc0000e2800) C:/Go/src/net/http/server.go:2375 +0x1dd net/http.serverHandler.ServeHTTP(0xc000286000, 0xc7a400, 0xc0001e0540, 0xc0000e2800) C:/Go/src/net/http/server.go:2774 +0xaf net/http.(conn).serve(0xc000056b40, 0xc7b8c0, 0xc0001b0fc0) C:/Go/src/net/http/server.go:1878 +0x858 created by net/http.(Server).Serve C:/Go/src/net/http/server.go:2884 +0x2fb

sndnvaps commented 5 years ago

你确认已经存在数据在数据库中了吗。。 有可能,没有fetch到https代理库(即数据库中没有可用的https代理),这也是会出错的。 你看看能否获取http代理 @lxl315

lxl315 commented 5 years ago

@sndnvaps http代理可以获取了。谢谢

sndnvaps commented 5 years ago

就这问题,我已经提交了解决方案 @lxl315 @henson

henson commented 5 years ago

谢谢@sndnvaps,问题已解决。