Comments (14)
报错内容:2022-01-07 11:54:28,645-ERROR-util.api.httpclient: error code: 400, reason: Bad Request, headers: Server: nginx/1.13.7
Date: Fri, 07 Jan 2022 03:54:28 GMT
Content-Type: application/json
Content-Length: 17
Connection: close
Vary: Accept, Origin
Allow: POST, OPTIONS
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
from codeanalysis.
{
"status": "error",
"error_code": 400,
"url": "http://172.17.18.113/t/Bti26HqmHem/p/test/code-analysis/repos/3/projects/3/scan-history",
"text": "扫描异常",
"description": "HTTPError: HTTP Error 400: Bad Request",
"scan_report": {}
}
from codeanalysis.
这里是连接server报错了,可以看一下 main服务的日志:log/codedog.log
from codeanalysis.
这里是连接server报错了,可以看一下 main服务的日志:
log/codedog.log
日志显示这个,令牌无效;请问是不是需要把client/config.ini里面的文件服务器的Token信息需要替换一下,这个值从哪去取;
-2022-01-07 12:27:29,456-DEBUG-urllib3.connectionpool: http://nginx:8000 "PUT /files/public_server_temp/jobdata/projects/3/job40/1e25266c6f7211ecbfa10242ac140009/job_context.json HTTP/1.1" 401 195
-2022-01-07 12:27:29,457-WARNING-util.retrylib: method <put_file> exception: 'HTTPResponse' object has no attribute 'text'
-2022-01-07 12:27:29,457-INFO-util.retrylib: retrying method <put_file> on 2 time
-2022-01-07 12:27:32,470-WARNING-util.handlers: exception response: {'detail': ErrorDetail(string='认证令牌无效。', code='authentication_failed')}
-2022-01-07 12:27:32,470-INFO-util.handlers: custom error response data: {'status_code': 401, 'code': 1000, 'msg': ErrorDetail(string='认证令牌无效。', code='authentication_failed')}
-2022-01-07 12:27:32,470-WARNING-django.request: Unauthorized: /api/authen/urlauth/
from codeanalysis.
这里的问题不是客户端config配置错误
目前使用CodeDog的Token还是使用了新用户的Token呢?或者有更新过默认的Token么?
from codeanalysis.
CodeDog默认的Token 和 新用户的Token都尝试过,都报'认证令牌无效'的错
from codeanalysis.
这里有更新过CodeDog默认的Token么?
如果默认的Token有更新,需要在server/scripts/config.sh
对FILE_SERVER_TOKEN
也做一下调整,然后重启一下server
from codeanalysis.
重新部署server,使用默认的Token;修改config.ini;
再次在客户端执行扫描,报以下错误:-2022-01-07 15:29:36,215-INFO-apps.authen.apis.v1: proxy server authentication user[CodeDog], original uri[/files/public_server_temp/jobdata/projects/1/job6/6eae15586f8b11ec82970242ac140007/job_context.json]
-2022-01-07 15:29:36,217-DEBUG-urllib3.connectionpool: http://nginx:8000 "PUT /files/public_server_temp/jobdata/projects/1/job6/6eae15586f8b11ec82970242ac140007/job_context.json HTTP/1.1" 502 173
-2022-01-07 15:29:36,217-WARNING-util.retrylib: method <put_file> exception: HTTPConnectionPool(host='nginx', port=8000): Max retries exceeded with url: /files/public_server_temp/jobdata/projects/1/job6/6eae15586f8b11ec82970242ac140007/job_context.json (Caused by ResponseError('too many 502 error responses'))
from codeanalysis.
这里麻烦更新一下代码
from codeanalysis.
代码更新后,依然扫描报错:-2022-01-07 16:56:41,752-DEBUG-urllib3.connectionpool: http://nginx:8000 "PUT /files/public_server_temp/jobdata/projects/1/job3/a2210d266f9711ecb6e00242ac150006/job_context.json HTTP/1.1" 500 145
-2022-01-07 16:56:41,752-WARNING-util.retrylib: method <put_file> exception: HTTPConnectionPool(host='nginx', port=8000): Max retries exceeded with url: /files/public_server_temp/jobdata/projects/1/job3/a2210d266f9711ecb6e00242ac150006/job_context.json (Caused by ResponseError('too many 500 error responses'))
-2022-01-07 16:56:41,753-INFO-util.retrylib: retrying method <put_file> on 3 time
from codeanalysis.
可以看一下file-server容器内的日志: cat log/codedog_file.log
存在什么报错
from codeanalysis.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 493, in dispatch
self.initial(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 410, in initial
self.perform_authentication(request)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 324, in perform_authentication
request.user
File "/usr/local/lib/python3.7/site-packages/rest_framework/request.py", line 220, in user
self._authenticate()
File "/usr/local/lib/python3.7/site-packages/rest_framework/request.py", line 373, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File "/var/www/django/codedog/codedog_file_server/authentication.py", line 89, in authenticate
user = User.objects.get_or_create(nickname=username)[0]
File "/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 573, in get_or_create
return self.get(**kwargs), False
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 425, in get
num = len(clone)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 269, in len
self._fetch_all()
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/usr/local/lib/python3.7/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/local/lib/python3.7/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/local/lib/python3.7/site-packages/pymysql/connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python3.7/site-packages/pymysql/connections.py", line 775, in _read_query_result
result.read()
File "/usr/local/lib/python3.7/site-packages/pymysql/connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python3.7/site-packages/pymysql/connections.py", line 725, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python3.7/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python3.7/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
django.db.utils.ProgrammingError: (1146, "Table 'codedog_file.authenmgr_userprofile' doesn't exist")
提示没这个表
from codeanalysis.
这里可以先执行一下 ./compose_init.sh
脚本
from codeanalysis.
重新执行./compose_init.sh 脚本 ,运行成功,感谢大佬~
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
- Gitlab Oauth 500 HOT 1
- 团队管理禁用团队失败 HOT 1
- 【bug】路径过滤与tscan_cpp扫描的问题
- helm-charts安装遇到一些问题及使用上的建议 HOT 1
- 日志显示异常 HOT 2
- Unable to obtain the worker node HOT 1
- 安卓代码在git仓库src时下执行androidlint失败 HOT 2
- tscan_lua工具扫描出问题后,会导致所有问题被关闭 HOT 1
- Bug 在分析方案列表中,点击一个分析方案时,如果它的方案描述里有内容,接着点其他分析方案时,其方案描述也会有和前面一样的内容,实际上后面的分析方案并没有设置方案描述,刷新页面就会正常
- localscan时可以取消代码统计任务吗?该任务结果似乎对MR扫描没有什么用,有点浪费时间 HOT 5
- 扫描失败,提示SCM鉴权失败 账号密码错误 HOT 3
- 关于扫描速度缓慢问题 HOT 5
- 同一个问题在不同的扫描id下会出现上一个扫描已经标注处理过,下次扫描又出现相同的问题 HOT 2
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.