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

macOS挂代理后,导致0.0.0.0:9090相关API递归请求,直至资源消耗殆尽 #696

Open
ztwo opened this issue Nov 2, 2022 · 3 comments

Comments

@ztwo
Copy link

ztwo commented Nov 2, 2022

Description
macOS-设置代理后,查看lyrebird中的日志, http://0.0.0.0:9090/socket.io会递归请求,直至出现too many open file等情况

To Reproduce

  1. macOS(10.14.6) macOS M1(11.6)
  2. Python3.9.4,虚拟环境中启动 lyrebird -v
  3. 打开系统网络设置-高级-代理-网页代理与安全网络代理设置 127.0.0.1, 4272,应用
  4. 已通过mitm.it安装证书,且在钥匙串中信任证书
  5. 查看lyrebird日志,会看到 http://0.0.0.0:9090/socket.io等无延迟的递归请求

Expected behavior
不出现递归请求,因出现递归后,短时间内程序会出现报错

Log
2022-11-02 11: 11: 20,
994 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
001 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
009 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
029 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
030 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
044 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
060 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
074 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
075 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
086 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
102 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/blueprints/apis/init.py: 35
INFO [On API
]200 GET http: //0.0.0.0:9090/api/event
2022-11-02 11: 11: 21,
105 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
131 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
147 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
148 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
163 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac
2022-11-02 11: 11: 21,
182 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 200 https: //p24-caldav.icloud.com/mm/sub?token=a24e42231e244db05c386431c020596845bd6b0ad195ada809f7743284d8e21b&key=467048548
2022-11-02 11: 11: 21,
188 /Users/jk/Desktop/zz/ltm/venv/lib/python3.9/site-packages/lyrebird/mock/handlers/proxy_handler.py: 60
INFO SUCCESS 400 http: //0.0.0.0:9090/socket.io/?EIO=3&transport=polling&t=OGsKScL&sid=12dcec648fd24bc7a14d0e9721ff49ac

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS(10.14.6) macOS M1(11.6)
  • Browser [e.g. chrome, safari] chrome: 107.0.5304.87
  • Version [e.g. 22] v2.9.2

Additional context
1.单独使用mitmproxy无此问题
2.尝试升级mitmproxy和requests未解决此问题

@zhaoye
Copy link
Member

zhaoye commented Nov 2, 2022

这里发生递归的是一个前端push的连接。
在我们搞清楚问题之前,您可以先尝试在代理设置中将0.0.0.0添加到忽略列表中。
@ztwo

@ztwo
Copy link
Author

ztwo commented Nov 3, 2022

@zhaoye 感谢开发者回复,我先按照你提供的方法尝试。

@zhaoye
Copy link
Member

zhaoye commented Nov 3, 2022

@zhaoye 感谢开发者回复,我先按照你提供的方法尝试。

不客气,有进展也可以同步在这里以获得更多的帮助。

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

2 participants