阿里云日志服务 python SDK 请求日志查询 发生错误 Max retries exceeded with url url超过最大重试次数
我是用任务 请求 查询日志的,但是经常发生 如下错误, 拉取到的数据 也比 阿里云里面少。
aliyun.log.logexception.LogException: {"errorCode": "LogRequestError", "errorMessage": "HTTPConnectionPool(host='offeradmin-log.cn-hongkong.log.aliyuncs.com', port=80): Max retries exceeded with url: /logstores/offer_admin-bi?from=1667354579&to=1667354640&type=log&line=1000&offset=0&reverse=true&powerSql=False&query=%2A%7CSELECT+offer_id%2Caff_id%2Cdsp_id%2Ccount_if%28type%3D%27click%27+AND+status+%3D+302%29+as+click%2Ccount_if%28type%3D%27click%27+AND+status+%3D+475%29+as+click_fail%2Ccount_if%28type%3D%27install%27+AND++status+%3D+200+and+%28blocked_reason+%3D%27%27+OR+blocked_reason+is+null%29%29+as+install%2Ccount_if%28type%3D%27install%27+AND+status+%3D+200+and+blocked_reason+is+NOT+null+and+blocked_reason+%21%3D%27%27%29+as+reject%2Ccount_if%28type%3D%27event%27%29+as+event%2Cdate_trunc%28%27minute%27%2C+__time__%29+as+ctime%2Cdate_format%28date_trunc%28%27minute%27%2C+__time__%29%2C+%27%25H%27%29+AS+h+WHERE+offer_id+IS+NOT+null+and+aff_id+is+not+null+GROUP+by+offer_id%2Cctime%2Caff_id%2Cdsp_id+LIMIT+0%2C10000 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc36758dac0>: Failed to establish a new connection: [Errno -2] Name or service not known'))", "requestId": ""}
www/wwwroot/offeradmin/a6b6692a7fc1687025bf3b1b1d59d9ee_venv/lib/python3.9/site-packages/apscheduler/util.py:436: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return tzinfo.localize(dt)
日志请求 发生错,是什么原因?是请求次数限制还是 网络问题
这个是网络不通,你可以先在机器上, curl 一下域名是否能联通:offeradmin-log.cn-hongkong.log.aliyuncs.com
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。