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

无法校验查询语句权限,请联系管理员,错误信息:list index out of range #1627

Closed
1 task
honghongwo opened this issue Jun 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@honghongwo
Copy link

问题是否已经被报告?

  • 我已经搜索了当前存在的问题

重现步骤

  1. RDS非直连,是通过ssh隧道连接的。
  2. admin账号可以正常查询
  3. 其他的普通账号,赋权后遇到这个报错:
    无法校验查询语句权限,请联系管理员,错误信息:list index out of range

预期外的结果

image

日志文本

[2022-06-15 17:56:03,088][MainThread:140563078104896][task_id:default][query_privileges.py:85][ERROR]- 无法校验查询语句权限,RDS,select * from accessory,Traceback (most recent call last):
  File "/opt/archery/sql/query_privileges.py", line 69, in query_priv_check
    table_ref = _table_ref(sql_content, instance, db_name)
  File "/opt/archery/sql/query_privileges.py", line 409, in _table_ref
    query_tree = engine.query_print(instance=instance, db_name=db_name, sql=sql_content).get('query_tree')
  File "/opt/archery/sql/engines/goinception.py", line 163, in query_print
    print_info = self.query(db_name=db_name, sql=sql).to_dict()[1]
IndexError: list index out of range

版本

1.8.5

部署方式

Docker

是否还有其他可以辅助定位问题的信息?比如数据库、浏览器、goInception等

goInception的日志:
time="2022/06/15 17:56:03.087" level=error msg="con:15 con:15 dial tcp 127.0.0.1:37827: connect: connection refused" file=session_inception.go func=parseOptions line=2114

@honghongwo honghongwo added the bug Something isn't working label Jun 15, 2022
@hhyo
Copy link
Owner

hhyo commented Jun 15, 2022

参考#1362
goinception无法访问查询的mysql,可以采取host方式进行部署

@honghongwo
Copy link
Author

谢谢大佬,问题解决了
部署方式是docker-compose的,把所有的service服务都改成了host模式,然后在/etc/hosts 里面加了个mysql、redis、goinception的ip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants