ledgetech / ledgetech/lua-resty-http
proxy exception, error connection timeout
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 2.1k
- Forks
- 630
- PR merge metrics
- No merged PRs in 30d
Description
使用了proxy 功能,一直连接超时,下边是日志,就是显示已经走了代理,proxy IP: http://8ec525e5ed1f4586:30102906103665@49.70.150.136:31149, 但是超时,然后我实际测试了代理地址是可用的,测试方式是curl -x http://8ec525e5ed1f4586:158295654881503@117.68.38.165:49668 -I http://47.93.177.135/123.jpg 是可以用的。
2024/05/16 23:41:28 [error] 6#6: *30 lua tcp socket read timed out, client: 172.17.208.11, server: _, request: "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", host: "172.17.243.208"
2024/05/16 23:41:28 [error] 6#6: *30 [lua] proxy_request.lua:179: proxy_request(): failed to request via proxy: timeout, proxy IP: http://8ec525e5ed1f4586:30102906103665@49.70.150.136:31149, client: 172.17.208.11, server: _, request: "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", host: "172.17.243.208"
2024/05/16 23:42:28 [error] 6#6: *30 lua tcp socket read timed out, client: 172.17.208.11, server: _, request: "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", host: "172.17.243.208"
2024/05/16 23:42:28 [error] 6#6: *30 [lua] proxy_request.lua:179: proxy_request(): failed to request via proxy: timeout, proxy IP: http://8ec525e5ed1f4586:250299687038506@180.118.241.215:34324, client: 172.17.208.11, server: _, request: "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", host: "172.17.243.208"
{ "timestamp": "2024-05-16T23:42:28+08:00", "remote_addr": "172.17.208.11", "body_bytes_sent": 57, "request_time": 121.731, "response_status": 200, "request": "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", "request_method": "GET", "host": "172.17.243.208","upstream_addr": "","args": "url=http://47.93.177.135/123.jpg","http_x_forwarded_for": "","http_referrer": "", "http_user_agent": "curl/7.61.1", "http_version": "HTTP/1.1", "proxy_ip": "http://8ec525e5ed1f4586:250299687038506@180.118.241.215:34324", "nginx_access": true }
2024/05/16 23:42:28 [error] 6#6: *30 attempt to set status 500 via ngx.exit after sending out the response status 200, client: 172.17.208.11, server: _, request: "GET /?url=http://47.93.177.135/123.jpg HTTP/1.1", host: "172.17.243.208"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proxy_request.lua:179 location named in the logs and reproduce the request using the reported target URL and proxy configuration. Compare the client behavior with the successful curl proxy test, then determine and address why the proxy request reaches a socket read timeout. Done means the request completes through a usable proxy or the failure is reported with an identified cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100