附上日志
2022-01-26 10:14:30,086-INFO-util.logutil: Tencent Cloud Code Analysis (OpenSource Beta)
2022-01-26 10:14:30,298-INFO-util.logutil: ------------------------------
2022-01-26 10:14:30,298-INFO-util.logutil: ####### #### #
2022-01-26 10:14:30,298-INFO-util.logutil: # # # #
2022-01-26 10:14:30,298-INFO-util.logutil: # # ###
2022-01-26 10:14:30,298-INFO-util.logutil: # # # #
2022-01-26 10:14:30,298-INFO-util.logutil: # # #####
2022-01-26 10:14:30,298-INFO-util.logutil: # # # # #
2022-01-26 10:14:30,298-INFO-util.logutil: # #### ## ##
2022-01-26 10:14:30,298-INFO-util.logutil: ------------------------------
2022-01-26 10:14:31,006-INFO-util.logutil: using config file: /root/CodeAnalysis/client/codedog.ini
2022-01-26 10:14:31,011-INFO-util.logutil: connect to server: http://192.168.20.103/
2022-01-26 10:16:35,485-ERROR-util.api.httpclient: error code: 504, reason: Gateway Time-out, headers: Server: nginx/1.20.1
Date: Wed, 26 Jan 2022 02:16:35 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 167
Connection: close
2022-01-26 10:16:35,485-ERROR-util.wrapper: method(is_repo_existed) call fails on error: HTTP Error 504: Gateway Time-out
2022-01-26 10:16:35,485-INFO-util.wrapper: retrying method(is_repo_existed) after 5 seconds
2022-01-26 10:16:40,569-INFO-util.wrapper: method(is_repo_existed) call succeed after 1 retries
2022-01-26 10:18:40,607-ERROR-util.api.httpclient: error code: 504, reason: Gateway Time-out, headers: Server: nginx/1.20.1
Date: Wed, 26 Jan 2022 02:18:40 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 167
Connection: close
2022-01-26 10:18:40,608-ERROR-util.wrapper: method(get_repo_schemes) call fails on error: HTTP Error 504: Gateway Time-out
2022-01-26 10:18:40,608-INFO-util.wrapper: retrying method(get_repo_schemes) after 5 seconds
2022-01-26 10:19:45,715-INFO-util.wrapper: method(get_repo_schemes) call succeed after 1 retries
2022-01-26 10:19:45,716-INFO-util.logutil: scan plan(默认) already exists: http://192.168.20.103/t/Euxw03OlH3c/p/uama/code-analysis/repos/1/schemes/1/basic
2022-01-26 10:20:45,800-INFO-util.logutil: Use the already existed project(id: 2).
2022-01-26 10:20:46,240-INFO-util.logutil: Project url: http://192.168.20.103/t/Euxw03OlH3c/p/uama/code-analysis/repos/1/projects/2/overview
2022-01-26 10:21:46,372-ERROR-util.api.httpclient: error code: 504, reason: Gateway Time-out, headers: Server: nginx/1.20.1
Date: Wed, 26 Jan 2022 02:21:46 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 167
Connection: close
2022-01-26 10:21:46,372-ERROR-util.wrapper: method(init_job) call fails on error: HTTP Error 504: Gateway Time-out
2022-01-26 10:21:46,373-INFO-util.wrapper: retrying method(init_job) after 5 seconds
2022-01-26 10:22:51,381-ERROR-util.api.httpclient: error code: 504, reason: Gateway Time-out, headers: Server: nginx/1.20.1
Date: Wed, 26 Jan 2022 02:22:51 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 167
Connection: close
2022-01-26 10:22:51,381-ERROR-util.wrapper: method(init_job) call fails on error: HTTP Error 504: Gateway Time-out
2022-01-26 10:22:51,381-INFO-util.wrapper: retrying method(init_job) after 5 seconds
2022-01-26 10:23:56,389-ERROR-util.api.httpclient: error code: 504, reason: Gateway Time-out, headers: Server: nginx/1.20.1
Date: Wed, 26 Jan 2022 02:23:56 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 167
Connection: close
2022-01-26 10:23:56,389-ERROR-util.wrapper: method(init_job) call fails on error: HTTP Error 504: Gateway Time-out
2022-01-26 10:23:56,389-WARNING-util.wrapper: method(init_job) call still fails after 2 retries
2022-01-26 10:23:56,390-INFO-util.logutil:
****************************************************************************************************
代码分析结果:
HTTPError: HTTP Error 504: Gateway Time-out
****************************************************************************************************
2022-01-26 10:23:56,390-INFO-util.logutil: json report: /root/CodeAnalysis/client/scan_status.json
2022-01-26 10:23:56,390-ERROR-util.logutil: HTTPError: HTTP Error 504: Gateway Time-out
Traceback (most recent call last):
File "/root/CodeAnalysis/client/node/localrunner.py", line 384, in run
request_generator.generate_request(proj_conf)
File "/root/CodeAnalysis/client/node/localtask/requestgenerator.py", line 112, in generate_request
task_name_list, self._create_from)
File "/root/CodeAnalysis/client/node/localtask/initjob.py", line 31, in init_job
job_params = dog_server.init_job(repo_id, proj_id, init_data, org_sid, team_name)
File "util/wrapper.py", line 20, in util.wrapper._MethodWrapper.__call__
File "util/wrapper.py", line 40, in util.wrapper.SyncWrapper._call_method
File "util/wrapper.py", line 42, in util.wrapper.SyncWrapper._call_method
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 "/root/CodeAnalysis/client/util/api/dogapi.py", line 97, in init_job
rsp = CodeDogHttpClient(self._server_url, rel_url, headers=self._headers, json_data=init_data).post()
File "/root/CodeAnalysis/client/util/api/httpclient.py", line 78, in post
result = HttpRequest.request(url=self.url, headers=self.headers, body=self.data, method="POST")
File "/root/CodeAnalysis/client/util/api/httpclient.py", line 43, in request
response = urlopen(req).read()
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 504: Gateway Time-out