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

1.10.0版本执行mongodb工单报错 Json decode failed. #2439

Open
qingmengxinghe opened this issue Dec 4, 2023 · 3 comments
Open

1.10.0版本执行mongodb工单报错 Json decode failed. #2439

qingmengxinghe opened this issue Dec 4, 2023 · 3 comments

Comments

@qingmengxinghe
Copy link

重现步骤

1、执行工单的时候报错, Json decode failed. 校验的时候不报错,
语句如下

db.xxxxxxxx.deleteMany({
"msgTime": {
"$gt": "20231201051234",
"$lt": "20231201141234"
}
});

预期外的结果

不知道怎么解决

日志文本

archery.log 内容如下

[2023-12-04 17:54:40,769][MainThread:139713478596416][task_id:default][notify.py:492][ERROR]- failed to notify using `MailNotifier(workflow=<SqlWorkflow: 删除易盾记录>, sys_config=<common.config.SysConfig object at 0x7f1165903610>, name='mail', sys_config_key='mail', event_type=<EventType.AUDIT: 'audit'>, audit=None, audit_detail=None, messages=[])`: 'NoneType' object has no attribute 'audit_id'
[2023-12-04 19:05:13,227][MainThread:139713478596416][task_id:default][mongo.py:498][WARNING]- mongo语句执行报错,语句: db.xxxxxxxx.deleteMany({
     "msgTime": {
            "$gt": "20231201051234",
            "$lt": "20231201141234"
        }
}),错误信息Traceback (most recent call last):
  File "/data/apps/wendy/sql/engines/mongo.py", line 481, in execute
    actual_affected_rows = r.get("deletedCount", 0)
AttributeError: 'str' object has no attribute 'get'

版本

1.10.0

部署方式

K8S

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

mongodb 的版本 4.2
部署的archery 使用的 mongo客户端3.6

@qingmengxinghe
Copy link
Author

部署方式选错了,是手工部署的

@nick2wang
Copy link
Collaborator

nick2wang commented Dec 14, 2023

麻烦在qcluster日志里找到执行结果发出来看下

logger.debug("执行结果:" + r)

@frui85
Copy link

frui85 commented Jan 18, 2024

$变量方式不支持吗?我也是

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

3 participants