starsliao / TenSunS

🦄后羿 - TenSunS(原ConsulManager):基于Consul的运维平台:更优雅的Consul管理UI&多云与自建ECS/MySQL/Redis同步Prometheus/JumpServer&ECS/MySQL/Redis云监控指标采集&Blackbox站点监控维护&漏洞通知/资源到期余额告警&各类资源Grafana看板展示
https://StarsL.cn
Do What The F*ck You Want To Public License
1.33k stars 244 forks source link

阿里云ecs同步到 jumpserver 报错 #90

Closed hale177 closed 1 year ago

hale177 commented 1 year ago

阿里云 ecs 同步到 jumpserver(v2.28.14)一直顺利,今天就重启了 服务(docker-compose部署) 启动成功后,后台ui 点击同步,界面报错 500 ,日志报错如下: 配置在当初成功同步后 ,一直未变更过。

图片

flask-consul  | [2023-09-04 10:59:08,615] ERROR in app: Exception on /api/jobs [POST]
flask-consul  | Traceback (most recent call last):
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
flask-consul  |     rv = self.dispatch_request()
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
flask-consul  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper
flask-consul  |     resp = resource(*args, **kwargs)
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask_httpauth.py", line 172, in decorated
flask-consul  |     return self.ensure_sync(f)(*args, **kwargs)
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 84, in view
flask-consul  |     return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
flask-consul  |     resp = meth(*args, **kwargs)
flask-consul  |   File "/flask/views/jobs.py", line 142, in post
flask-consul  |     Scheduler.run_job(job_dict['jobid'])
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/flask_apscheduler/scheduler.py", line 284, in run_job
flask-consul  |     job.func(*job.args, **job.kwargs)
flask-consul  |   File "/flask/units/cloud/alicloud.py", line 131, in ecs
flask-consul  |     ak,sk = consul_kv.get_aksk('alicloud',account)
flask-consul  |   File "/flask/units/consul_kv.py", line 97, in get_aksk
flask-consul  |     ak = myaes.decrypt(aksk_dict['ak'])
flask-consul  |   File "/flask/units/myaes.py", line 19, in decrypt
flask-consul  |     data = unpad(cipher.decrypt(data[16:]), 16)
flask-consul  |   File "/usr/local/lib/python3.10/site-packages/Crypto/Util/Padding.py", line 92, in unpad
flask-consul  |     raise ValueError("Padding is incorrect.")
flask-consul  | ValueError: Padding is incorrect.
starsliao commented 1 year ago

这个报错是aksk加解密报错了,你确认下,是不是这个报错日志,另外是否有其他操作报错,还有使用的tensuns版本? 如有需要可以加群详细处理

hale177 commented 1 year ago

这个报错是aksk加解密报错了,你确认下,是不是这个报错日志,另外是否有其他操作报错,还有使用的tensuns版本? 如有需要可以加群详细处理

对的,仔细查看了,只有上面这段报错日志且不断重复,没有其他有用信息 , 是我的 aksk 填错了吗 ? 我本地部署的 tensuns 版本 v0.12.0

starsliao commented 1 year ago

你先更新下版本到最新版试试, 另外可以加我微信 starsliao 远程看下.