问题现象
- 客户无法打开网络保护控制台。
- Acronis管理服务器服务和ZeroMQ网关服务都未启动。
- 检查日志后,可以找到以下错误消息:
zmq日志错误信息:
api-gateway日志错误信息:2022-12-02 10:58:40:613 Failed to register ZMQGW in ApiGateway. Error: Error 0xb90001: Registration in ApiGateway failed line: 0x8e0ed504b106a81c file: e:\jenkins_agent\workspace\common\abm-zmqgw\20549\product\zmqgw\main.cpp:216 function: Detail::RegisterService $module: zmqgw_vsa64_20549 error 0x2b10008: Failed to register in ApiGateway line: 0x4e3de39696b1a5ee file: e:\jenkins_agent\workspace\common\abm-zmqgw\20549\product\enterprise\common\interprocess\api_gateway.cpp:241 function: ApiGateway::RegisterOAuth2Client $module: zmqgw_vsa64_20549 error 0x2b10006: Request failed, HTTP status: 500 line: 0x4e3de39696b1a54c file: e:\jenkins_agent\workspace\common\abm-zmqgw\20549\product\enterprise\common\interprocess\api_gateway.cpp:79 function: `anonymous-namespace'::ValidateResponse $module: zmqgw_vsa64_20549Dec 7 13:20:23.022 |ERRO| ApiGateway.r: Request: build="967" int_request_id="mrkz7pAAETjRYAQXXFAG4B" request_id="SwxW4p9DBNmzbFxV2JT32n" source="api-gateway" token_uid="147c6524-084d-433b-8fc0-8e1546d4716b" session_id_hash="22279bb1d34b98484f64c4d73e6a4a0bb5e10db7570df016ac67b9122d6779c3" host=".." http_method="GET" url="/api/policy_management/v2/applications" original_uri="" proto="HTTP/1.1" http_code=500 size_outgoing=0 size_incoming=0 referer="" user_agent="sync-unit" elapsed_ns=2073100 err_msg="Auth: fill tenant.: fetch tenant c4e64c9c-273a-11ec-8b77-78ac4432e586 info from account-server: getTenant: failed to make HTTP request: code 401, response: {\"domain\":\"General\",\"code\":\"UnauthorizedRequest\",\"reason\":\"UnauthorizedRequest\",\"debug\":Unknown macro: {"msg"},\"message\":\"Invalid authorization header: 'token contains an invalid number of segments'\"}" @"middleware/logger.go:120" Dec 7 13:20:23.166 |ERRO| ApiGateway: ensureToken: failed to issue token. Error: %v build="967" field_0="Status code 403 Forbidden received instead of 200 OK" Dec 7 13:20:23.166 |ERRO| ApiGateway.dsc: DiscoveryUpdate: failed to register OAuth2 client in BAS build="967" error="failed to register service: BAS returned empty access token"
问题原因
在启动时的特定交换过程之后,BAS开始信任api-gateway OAuth2凭据。
解决方法
要解决此问题,应修复account_server.db:
- 打开https://www.sqlite.org/download.html并为系统下载“用于管理SQLite数据库文件的命令行工具”并解压缩。
- 停止Acronis Service Manager服务
- 做好C:\ProgramData\Acronis\AccountServer\account_server.db的备份(例如,将其压缩并复制到另一个文件夹)
- 打开cmd并将目录更改为sqlite3.exe所在的目录:cd path_to_sqlite3..exe
- 运行命令:
sqlite3 C:\ProgramData\Acronis\AccountServer\account_server.db<update_allowed_grant_types.sql - 再次启动Acronis Service Manager服务