Comments (17)
麻烦发一下客户端输出的完整日志,我们分析一下哈
from codeanalysis.
麻烦发一下客户端输出的完整日志,我们分析一下哈
在哪里呀
from codeanalysis.
可以把最后一行正常日志以及完整的异常堆栈都截一下图
from codeanalysis.
把最后一行正常日志
2022-01-10 09:53:36,493-INFO-util.logutil: Tencent Cloud Code Analysis (OpenSource Beta)
2022-01-10 09:53:36,505-INFO-util.logutil: ------------------------------
2022-01-10 09:53:36,505-INFO-util.logutil: ####### #### #
2022-01-10 09:53:36,506-INFO-util.logutil: # # # #
2022-01-10 09:53:36,506-INFO-util.logutil: # # ###
2022-01-10 09:53:36,506-INFO-util.logutil: # # # #
2022-01-10 09:53:36,506-INFO-util.logutil: # # #####
2022-01-10 09:53:36,506-INFO-util.logutil: # # # # #
2022-01-10 09:53:36,506-INFO-util.logutil: # #### ## ##
2022-01-10 09:53:36,507-INFO-util.logutil: ------------------------------
2022-01-10 09:53:36,829-INFO-util.logutil: using config file: /home/test/CodeAnalysis/client/codedog.ini
2022-01-10 09:53:36,833-INFO-util.logutil: connect to server: http://192.168.7.244:88/
2022-01-10 09:53:37,738-INFO-util.logutil: scan plan(默认) already exists: http://192.168.7.244:88/t/UGCRO9Lf4U/p/test/code-analysis/repos/1/schemes/1/basic
2022-01-10 09:53:37,835-INFO-util.logutil: Use the already existed project(id: 1).
2022-01-10 09:53:38,367-INFO-util.logutil: Project url: http://192.168.7.244:88/t/UGCRO9Lf4U/p/test/code-analysis/repos/1/projects/1/overview
2022-01-10 09:53:39,008-INFO-util.logutil: Job starts ...
2022-01-10 09:53:39,044-INFO-util.logutil: Initing 10 tools, please wait a minute ...
[Tools init]: 100%|██████████████████████████████████████████████| 10/10 [00:00<00:00, 52167.96it/s]
2022-01-10 09:53:39,052-INFO-util.logutil: Initialize tools done.(use time: 0.01s)
2022-01-10 09:53:39,277-INFO-util.logutil: run cmd: ['python3', '-m', 'flake8', '--version']
2022-01-10 09:53:39,353-INFO-util.logutil: /usr/local/bin/python3: No module named flake8
2022-01-10 09:53:39,378-INFO-util.logutil: 建议客户本地安装flake8工具,安装命令:pip install flake8 && pip install flake8-json
2022-01-10 09:53:39,379-INFO-util.logutil: 正在启用CodeDog内置的Python环境
2022-01-10 09:53:39,481-INFO-util.logutil: run cmd: ['python3', '-m', 'flake8', '--version']
2022-01-10 09:53:39,854-INFO-util.logutil: 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.2 on Linux
2022-01-10 09:53:40,096-INFO-util.logutil: run cmd: ['python3', '-m', 'pylint', '--version']
2022-01-10 09:53:41,124-INFO-util.logutil: pylint 2.6.0
2022-01-10 09:53:41,125-INFO-util.logutil: astroid 2.5
2022-01-10 09:53:41,125-INFO-util.logutil: Python 3.7.0 (default, Jan 6 2022, 15:33:43)
2022-01-10 09:53:41,125-INFO-util.logutil: [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
2022-01-10 09:53:41,510-INFO-util.logutil: Start to count code lines...
2022-01-10 09:53:41,512-INFO-util.logutil: Codemetric only scans main code (exclude test_source, auto_generate_source, third_party_source).
2022-01-10 09:53:41,513-INFO-util.logutil: Codelint only cans main code.
2022-01-10 09:53:41,576-INFO-util.logutil: [文件数]过滤前:181,过滤后:133
2022-01-10 09:53:41,577-INFO-util.logutil: ['/home/test/CodeAnalysis/client/data/tools/linux-scc/scc', '--by-file', '-c', '--no-cocomo', '-f', 'json', '-o', '/home/test/CodeAnalysis/client/data/taskdirs/task_95/scc_result_22f0de5071b811eca860002277c9372e.json', '/tmp/mini-shop-server']
2022-01-10 09:53:41,649-INFO-util.logutil: results written to /home/test/CodeAnalysis/client/data/taskdirs/task_95/scc_result_22f0de5071b811eca860002277c9372e.json
2022-01-10 09:53:41,658-INFO-util.logutil: Task_95 (Flake8) starts ...
2022-01-10 09:53:51,770-INFO-util.logutil: Task_95 is done.
2022-01-10 09:53:51,817-ERROR-util.wrapper: method(upload_file) call fails on error: Expecting value: line 1 column 1 (char 0)
2022-01-10 09:53:51,817-INFO-util.wrapper: retrying method(upload_file) after 5 seconds
2022-01-10 09:53:56,826-ERROR-util.wrapper: method(upload_file) call fails on error: Expecting value: line 1 column 1 (char 0)
2022-01-10 09:53:56,826-INFO-util.wrapper: retrying method(upload_file) after 5 seconds
2022-01-10 09:54:01,835-ERROR-util.wrapper: method(upload_file) call fails on error: Expecting value: line 1 column 1 (char 0)
2022-01-10 09:54:01,835-WARNING-util.wrapper: method(upload_file) call still fails after 2 retries
2022-01-10 09:54:01,836-INFO-util.logutil:
代码分析结果:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-01-10 09:54:01,836-INFO-util.logutil: json report: /home/test/CodeAnalysis/client/scan_status.json
2022-01-10 09:54:01,836-ERROR-util.logutil: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/test/CodeAnalysis/client/node/localrunner.py", line 386, in run
run_task_mgr.scan_project(cur_execute_request_list, proj_conf)
File "/home/test/CodeAnalysis/client/node/localtask/runlocaltask.py", line 90, in scan_project
self._proj_id).run()
File "/home/test/CodeAnalysis/client/node/localtask/runtask.py", line 164, in run
ResultCheck.upload_task_result(task, self._proj_id)
File "/home/test/CodeAnalysis/client/node/localtask/runtask.py", line 91, in upload_task_result
data_url, log_url = TaskRunner.upload_result_detail(proj_id, task.task_id, task_dir, data, task.task_log)
File "node/taskrunner.py", line 59, in node.taskrunner.TaskRunner.upload_result_detail
File "util/wrapper.py", line 51, in util.wrapper._RetryMethod.call
File "util/wrapper.py", line 107, in util.wrapper.Retry.__retry_call
File "util/wrapper.py", line 92, in util.wrapper.Retry.__retry_call
File "/home/test/CodeAnalysis/client/util/api/fileserver.py", line 97, in upload_file
return self.__upload_data(fp, rel_url, headers)
File "/home/test/CodeAnalysis/client/util/api/fileserver.py", line 81, in __upload_data
HttpClient(self._server_url, rel_url, headers=headers, data=data, proxies=self._proxies).put()
File "/home/test/CodeAnalysis/client/util/api/httpclient.py", line 76, in put
result = HttpRequest.request(url=self.url, headers=self.headers, body=self.data, method="PUT")
File "/home/test/CodeAnalysis/client/util/api/httpclient.py", line 39, in request
dict_result = json.loads(str_result)
File "/usr/local/python3/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/python3/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/python3/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
from codeanalysis.
config.ini文件中配置的文件服务器url与server url的域名是否一致呢?
from codeanalysis.
config.ini文件中配置的文件服务器url与server url的域名是否一致呢?
是一样的URL=http://192.168.7.244:88/server/files/
from codeanalysis.
from codeanalysis.
目前能正常运行了么?
如果报错了,可以看一下analysis-worker是否正常运行
from codeanalysis.
目前能正常运行了么? 如果报错了,可以看一下analysis-worker是否正常运行
最后会报错第三方依赖文件服务器异常,入库失败。请问我这个config.ini中的地址是否填写正确:
[SERVER_URL]
; [必填]请将<Server IP地址>替换为实际的tca server地址
URL=http://192.168.7.244:88/server/main/
[FILE_SERVER]
; [必填]文件服务器地址,请将<Server IP地址>替换为实际的tca server地址
URL=http://192.168.7.244:8888/server/files/
web平台访问的地址是http://192.168.7.244:88/
from codeanalysis.
文件服务器FILE_SERVER的链接可以调整为 URL=http://192.168.7.244:88/server/files/
from codeanalysis.
文件服务器FILE_SERVER的链接可以调整为
URL=http://192.168.7.244:88/server/files/
这两个端口是需要对外开放吗?还是一直卡在query result from server不动
from codeanalysis.
同样卡在这里
from codeanalysis.
不需要对外,这里可以检查一下analysis-worker
的日志,看看是什么问题
docker-compose exec analysis-worker /bin/bash
tail -F -n 1000 log/codedog.log
from codeanalysis.
-2022-01-12 10:19:18,813-INFO-util.fileserver: Downloading file from http://192.168.7.244:88/server/files/taskdata/projects/1/task_180/ee26bccc734b11ecb0a5002277c9372e/tmp_dir.zip to /var/www/django/codedog/tempdata/a523b62ae4126341c7d8946d7301636cb74f21c6/tmp_dir.zip
-2022-01-12 10:19:19,818-WARNING-urllib3.connectionpool: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffb32d48810>: Failed to establish a new connection: [Errno 113] No route to host')': /server/files/taskdata/projects/1/task_180/ee26bccc734b11ecb0a5002277c9372e/tmp_dir.zip
是不是因为是内网的docker部署的,没有ip地址所以报错?docker访问内网192.168.7.244是不通的
from codeanalysis.
@Lingghh 有空帮忙确认一下呀
from codeanalysis.
-2022-01-12 10:19:18,813-INFO-util.fileserver: Downloading file from http://192.168.7.244:88/server/files/taskdata/projects/1/task_180/ee26bccc734b11ecb0a5002277c9372e/tmp_dir.zip to /var/www/django/codedog/tempdata/a523b62ae4126341c7d8946d7301636cb74f21c6/tmp_dir.zip -2022-01-12 10:19:19,818-WARNING-urllib3.connectionpool: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffb32d48810>: Failed to establish a new connection: [Errno 113] No route to host')': /server/files/taskdata/projects/1/task_180/ee26bccc734b11ecb0a5002277c9372e/tmp_dir.zip
是不是因为是内网的docker部署的,没有ip地址所以报错?docker访问内网192.168.7.244是不通的
是这个原因导致的,目前这里是有什么限制么?为什么docker访问内网192.168.7.244是不通的呢?
from codeanalysis.
这里可以关闭宿主机的防火墙试试
from codeanalysis.
Related Issues (20)
- 使用Findbugs工具分析代码出现编译失败。 HOT 3
- 仓库登记时候显示错误,配置为ssh,显示自动将ssh替换为http HOT 1
- 【需求】一个小细节, jenkins插件assert .hpi文件命名带上tca信息 HOT 1
- 【BUG】安装TCA插件,配置TCA 测试任务,一触发任务jenkins就会shutdown,且所触发的构建#N在界面上会消失 HOT 3
- 【咨询】如何查看当前的扫描日志或是扫描状态 HOT 1
- 【需求】与LDAP集成
- 【需求】项目普通成员可配置是否允许标记处理 或是 提供类似read_only的角色 HOT 1
- 求一些提高服务可靠性的建议🫡
- 问下有除了腾讯csig以外用这个代码分析的用户吗? HOT 1
- 是否有Python静态代码解析结果的关系图功能,类似vs code中的“查找所有引用” HOT 1
- 基于客户端分析模式,怎么获取git代码的详情,代码库12G HOT 4
- 【需求】在标记处理问题时,能够支持填写标记的备注,方便回溯问题分析过程 HOT 1
- 圈复杂度的codefile报错,代码检测错误codefile正常 HOT 4
- 客户端扫描执行崩溃 HOT 1
- 【需求】调研集成 corax 社区版 HOT 1
- 使用findbugs时,指令gradle未找到 HOT 3
- web端部署最新资源执行 `sh build-source.sh`在windows环境下会导致configs.json路径问题
- cls生成的Server ID发生了变化 HOT 1
- 客户端本地分析失败,HTTP Error 500: Internal Server Error
- 打开问题详情复制文件名时,变成关闭 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeanalysis.