hhyo / Archery

SQL 审核查询平台
https://archerydms.com
Apache License 2.0
6.1k stars 1.69k forks source link

RDS使用AK后,会话管理无法使用 #2184

Open chris486 opened 1 year ago

chris486 commented 1 year ago

重现步骤

数据库类型:mysql(阿里云 RDS) 操作:阿里云 RDS 启用 AK 配置,用于查看慢查 SQL

预期外的结果

启用AK配置之后,在会话管理选择对应的 RDS 数据库实例,页面弹窗提示:未知错误,请联系管理员处理!

日志文本

[2023-06-09 13:40:15,279][MainThread:140338061895488][task_id:default][exception_logging_middleware.py:12][ERROR]- Traceback (most recent call last):
File "/opt/venv4archery/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/opt/archery/sql/db_diagnostic.py", line 42, in process
result = aliyun_process_status(request)
File "/opt/archery/sql/aliyun_rds.py", line 116, in process_status
process_info = Aliyun(rds=instance_info).RequestServiceOfCloudDBA(
File "/opt/archery/common/utils/aliyun_sdk.py", line 96, in RequestServiceOfCloudDBA
result = self.request_api(request, values)
File "/opt/archery/common/utils/aliyun_sdk.py", line 33, in request_api
result = self.clt.do_action_with_exception(request)
File "/opt/venv4archery/lib/python3.9/site-packages/aliyunsdkcore/client.py", line 476, in do_action_with_exception
raise exception
aliyunsdkcore.acs_exception.exceptions.ServerException: HTTP Status: 404 Error:InvalidAction.NotFound Specified api is not found, please check your url and method.

版本

v1.9.1

部署方式

K8S

是否还有其他可以辅助定位问题的信息?比如数据库版本等

RDS :mysql 8.0

jingj38765 commented 1 year ago

兄弟, 我也遇到了!

hhyo commented 1 year ago

这个是18年的CloudDBA内的api了,阿里云应该已经移除了

jingj38765 commented 1 year ago

那启用AK这个功能不能用了吗,还是可以替换成新的api

sscash commented 1 year ago

我也是这样,请问后面有解决了吗

jiahuiss commented 4 months ago

也遇到这个问题了 ,慢日志可以查看,但是会话管理就看不了了。有解决的大神么?

cslingjun commented 2 months ago

直接去阿里云找到这个包放到对应目录下就好了呀 ,如果k8s部署 ,直接编辑Dockerfile文件 COPY custom_packages/RequestServiceOfCloudDBARequest.py /opt/venv4archery/lib/python3.11/site-packages/aliyunsdkrds/request/v20140815/

w492418915 commented 2 months ago

直接去阿里云找到这个包放到对应目录下就好了呀 ,如果k8s部署 ,直接编辑Dockerfile文件 COPY custom_packages/RequestServiceOfCloudDBARequest.py /opt/venv4archery/lib/python3.11/site-packages/aliyunsdkrds/request/v20140815/

阿里云说 RequestServiceOfCloudDBA 这个接口已经停用了,你说的这个现在还能解决吗?Docker 部署的要怎么操作啊?