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

执行结果:任务执行异常 ValueError: Invalid key size #654

Open
f2elab opened this issue Oct 9, 2022 · 4 comments
Open

执行结果:任务执行异常 ValueError: Invalid key size #654

f2elab opened this issue Oct 9, 2022 · 4 comments

Comments

@f2elab
Copy link

f2elab commented Oct 9, 2022

image

咨询下这个问题是什么情况引发的,能否提供分析排查方向

docker部署:bash ./quick_install.sh docker deploy

centos环境

分析的项目是前端vue工程

@Lingghh
Copy link
Collaborator

Lingghh commented Oct 9, 2022

可以点击“下载执行日志”下载日志,贴一下哈

@f2elab
Copy link
Author

f2elab commented Oct 9, 2022

执行日志:

2022-10-09 19:04:28,691-INFO: start to run task: EslintVue, execute_processes: ['analyze', 'datahandle']
2022-10-09 19:04:28,695-ERROR: Update_task_progress fail. upload msg:开始执行子任务
Traceback (most recent call last):
File "/CodeAnalysis/client/util/reporter.py", line 91, in update_task_progress
token = Crypto(settings.PASSWORD_KEY).decrypt(encrypted_token)
File "util/crypto.py", line 64, in util.crypto.c.c.decrypt
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 557, in init
AESBlockModeOfOperation.init(self, key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 304, in init
self._aes = AES(key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 134, in init
raise ValueError('Invalid key size')
ValueError: Invalid key size
2022-10-09 19:04:28,696-INFO: Load tool config: https://git.code.tencent.com/TCA/tca-tools/puppy-tools-config.git
2022-10-09 19:04:28,696-INFO: USE_LOCAL_TOOL=True, use local tool dir: /CodeAnalysis/tools/puppy-tools-config
2022-10-09 19:04:28,705-INFO: Initing common tools ...
2022-10-09 19:04:28,705-INFO: USE_LOCAL_TOOL=True, use local tool dir: /CodeAnalysis/tools/linux-git-lfs-v3.1.2
2022-10-09 19:04:28,705-INFO: USE_LOCAL_TOOL=True, use local tool dir: /CodeAnalysis/tools/linux-scc
2022-10-09 19:04:28,705-INFO: USE_LOCAL_TOOL=True, use local tool dir: /CodeAnalysis/tools/linux-7z
2022-10-09 19:04:28,705-INFO: Initing 3 tools, please wait a minute ...

[Tools init]: 0%| | 0/3 [00:00<?, ?it/s]
[Tools init]: 100%|█████████████████████████████████████████████████| 3/3 [00:00<00:00, 3229.70it/s]
2022-10-09 19:04:28,709-INFO: Initialize tools done.(use time: 0.00s)
2022-10-09 19:04:28,709-INFO: run cmd: git lfs install
2022-10-09 19:04:28,747-INFO: Updated Git hooks.
2022-10-09 19:04:28,747-INFO: Git LFS initialized.
2022-10-09 19:04:28,811-ERROR: Update_task_progress fail. upload msg:更新扫描工具
Traceback (most recent call last):
File "/CodeAnalysis/client/util/reporter.py", line 91, in update_task_progress
token = Crypto(settings.PASSWORD_KEY).decrypt(encrypted_token)
File "util/crypto.py", line 64, in util.crypto.c.c.decrypt
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 557, in init
AESBlockModeOfOperation.init(self, key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 304, in init
self._aes = AES(key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 134, in init
raise ValueError('Invalid key size')
ValueError: Invalid key size
2022-10-09 19:04:28,811-INFO: Initing other tools ...
2022-10-09 19:04:28,815-INFO: USE_LOCAL_TOOL=True, use local tool dir: /CodeAnalysis/tools/linux-node-v12.16.3
2022-10-09 19:04:28,815-INFO: Initing 1 tools, please wait a minute ...

[Tools init]: 0%| | 0/1 [00:00<?, ?it/s]
[Tools init]: 100%|█████████████████████████████████████████████████| 1/1 [00:00<00:00, 2200.58it/s]
2022-10-09 19:04:28,816-INFO: Initialize tools done.(use time: 0.00s)
2022-10-09 19:04:28,820-INFO: task start : <class 'task.model.analyze.AnalyzeTask'>
2022-10-09 19:04:28,820-INFO: pre_analyze start.
2022-10-09 19:04:28,820-INFO: start __checkout_source_dir.
2022-10-09 19:04:28,820-INFO: 常规项目,直接拉取或复用本地缓存资源.
2022-10-09 19:04:28,821-WARNING: task status code is 201
2022-10-09 19:04:28,821-WARNING: task messsage: ValueError: Invalid key size
2022-10-09 19:04:28,821-WARNING: task result:
Traceback (most recent call last):
File "task/puppytask.py", line 63, in run
response = TaskRunner(self._request_file, self._response_file).run_task()
File "task/runtask.py", line 129, in task.runtask.tskr.tskr.run_task
File "/CodeAnalysis/client/task/taskmgr.py", line 70, in taskrunner
params = source.pre_task()
File "/CodeAnalysis/client/task/sourcemgr.py", line 123, in pre_task
return self._pre_analyze()
File "/CodeAnalysis/client/task/sourcemgr.py", line 175, in _pre_analyze
self.src_loader.load_source_dir()
File "/CodeAnalysis/client/task/sourcemgr.py", line 282, in load_source_dir
self.__checkout_data()
File "/CodeAnalysis/client/task/sourcemgr.py", line 340, in __checkout_data
scm_mgr = SCMMgr(self.params)
File "task/scmmgr.py", line 525, in task.scmmgr.c
File "task/scmmgr.py", line 80, in task.scmmgr.c.c.init
File "task/scmmgr.py", line 130, in task.scmmgr.c.c.__init_scm_client
File "util/crypto.py", line 64, in util.crypto.c.c.decrypt
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 557, in init
AESBlockModeOfOperation.init(self, key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 304, in init
self._aes = AES(key)
File "/usr/local/lib/python3.7/site-packages/pyaes/aes.py", line 134, in init
raise ValueError('Invalid key size')
ValueError: Invalid key size

2022-10-09 19:04:28,822-INFO: task result: /CodeAnalysis/client/data/taskdirs/task_35/task_response.json

@f2elab
Copy link
Author

f2elab commented Oct 9, 2022

这个项目在tca平台关联仓库后,有跑过,执行了多个任务后才会触发下载github.com中linux-dart-v2.7.2资源超时情况

本次出现的情况是执行后立即会出现这个问题,没有修改其他配置项

@Lingghh
Copy link
Collaborator

Lingghh commented Oct 11, 2022

config.ini文件之前有做过什么调整么

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

2 participants