使用oat安装ocp,takeover metadb阶段报错

【 使用环境 】测试环境
【 OB or 其他组件 】oat
【 使用版本 】oat 4.1.0
【问题描述】
使用oat安装ocp时,安装过程报错如下,显示 remote address \'173.74.44.182\' is invalid, 返回码401,是权限问题吗?
【附件及日志】

[2025-01-26T10:03:20.106+0800] INFO - Dependencies all met for <TaskInstance: init_ocp.takeover_metadb manual__2025-01-24T12:52:46.168886+00:00 [queued]>
[2025-01-26T10:03:20.116+0800] INFO - Dependencies all met for <TaskInstance: init_ocp.takeover_metadb manual__2025-01-24T12:52:46.168886+00:00 [queued]>
[2025-01-26T10:03:20.116+0800] INFO - 
--------------------------------------------------------------------------------
[2025-01-26T10:03:20.116+0800] INFO - Starting attempt 13 of 13
[2025-01-26T10:03:20.116+0800] INFO - 
--------------------------------------------------------------------------------
[2025-01-26T10:03:20.131+0800] INFO - Executing <Task(_PythonDecoratedOperator): takeover_metadb> on 2025-01-24 12:52:46.168886+00:00
[2025-01-26T10:03:20.133+0800] INFO - Started process 626517 to run task
[2025-01-26T10:03:20.137+0800] INFO - Running: ['airflow', 'tasks', 'run', 'init_ocp', 'takeover_metadb', 'manual__2025-01-24T12:52:46.168886+00:00', '--job-id', '145', '--raw', '--subdir', 'DAGS_FOLDER/init_ocp.py', '--cfg-path', '/tmp/tmp83lrc96r']
[2025-01-26T10:03:20.140+0800] INFO - Job 145: Subtask takeover_metadb
[2025-01-26T10:03:20.195+0800] INFO - Running <TaskInstance: init_ocp.takeover_metadb manual__2025-01-24T12:52:46.168886+00:00 [running]> on host localhost.localdomain
[2025-01-26T10:03:20.255+0800] INFO - Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=airflow
AIRFLOW_CTX_DAG_ID=init_ocp
AIRFLOW_CTX_TASK_ID=takeover_metadb
AIRFLOW_CTX_EXECUTION_DATE=2025-01-24T12:52:46.168886+00:00
AIRFLOW_CTX_TRY_NUMBER=13
AIRFLOW_CTX_DAG_RUN_ID=manual__2025-01-24T12:52:46.168886+00:00
[2025-01-26T10:03:20.256+0800] INFO - start takeover metadb
[2025-01-26T10:03:20.263+0800] INFO - Running statement: select a.id, a.ip, a.hardware, b.name as idc, b.region from oat_server a, oat_idc b where a.idc_id=b.id and a.id in (%s), parameters: [1]
[2025-01-26T10:03:20.263+0800] INFO - Rows affected: 1
[2025-01-26T10:03:20.264+0800] INFO - OCP entry is http://173.74.44.182:8080
[2025-01-26T10:03:20.273+0800] INFO - http://173.74.44.182:8080/api/v2/time is ready(200)
[2025-01-26T10:03:20.273+0800] INFO - 2022, Eq-OsNYWnF4ne, [{'id': 1, 'ip': '173.74.44.182', 'hardware': '{"cpu": 128, "memory": 509, "disk": ""}', 'idc': 'IDC', 'region': 'DongGuan'}]
[2025-01-26T10:03:20.276+0800] ERROR - Task failed with exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airflow/decorators/base.py", line 217, in execute
    return_value = super().execute(context)
  File "/usr/local/lib/python3.9/site-packages/airflow/operators/python.py", line 175, in execute
    return_value = self.execute_callable()
  File "/usr/local/lib/python3.9/site-packages/airflow/operators/python.py", line 192, in execute_callable
    return self.python_callable(*self.op_args, **self.op_kwargs)
  File "/oat/task_engine/dags/init_ocp.py", line 271, in takeover_metadb
    ocp_add_server(
  File "/oat/task_engine/plugins/utils.py", line 167, in ocp_add_server
    host_type_id = add_resource(url='%s/compute/hostTypes' % ocp_base_api, auth=auth, resource_name='MetaDB_server')
  File "/oat/task_engine/plugins/utils.py", line 159, in add_resource
    raise RuntimeError(_r.text)
RuntimeError: {"duration":0,"error":{"code":0,"debugMessage":"remote address '173.74.44.182' is invalid","message":"remote address '173.74.44.182' is invalid"},"server":"64c560d6ac","status":401,"successful":false,"timestamp":"2025-01-26T10:03:20.275+08:00","traceId":"4fd98087c8c34401"}
[2025-01-26T10:03:20.282+0800] INFO - Marking task as FAILED. dag_id=init_ocp, task_id=takeover_metadb, execution_date=20250124T125246, start_date=20250126T020320, end_date=20250126T020320
[2025-01-26T10:03:20.283+0800] INFO - Running statement: update oat_audit set status='failed', update_time=utc_timestamp(), failed_reason=%s where id=%s, parameters: ['failed task instance is init_ocp__takeover_metadb__20250124 and exception information is {"duration":0,"error":{"code":0,"debugMessage":"remote address \'173.74.44.182\' is invalid","message":"remote address \'173.74.44.182\' is invalid"},"server":"64c560d6ac","status":401,"successful":false,"timestamp":"2025-01-26T10:03:20.275+08:00","traceId":"4fd98087c8c34401"}', 14]
[2025-01-26T10:03:20.284+0800] INFO - Rows affected: 1
[2025-01-26T10:03:20.314+0800] ERROR - Failed to execute job 145 for task takeover_metadb ({"duration":0,"error":{"code":0,"debugMessage":"remote address '173.74.44.182' is invalid","message":"remote address '173.74.44.182' is invalid"},"server":"64c560d6ac","status":401,"successful":false,"timestamp":"2025-01-26T10:03:20.275+08:00","traceId":"4fd98087c8c34401"}; 626517)
[2025-01-26T10:03:20.349+0800] INFO - Task exited with return code 1
[2025-01-26T10:03:20.369+0800] INFO - 0 downstream tasks scheduled from follow-on schedule check

感谢您的解答!

1 个赞

oat是企业版的安装部署工具,开源这边用的都是obd,没用过该工具 :grinning:
建议你咨询商业技术支持同学。
1.如你所在的企业客户已签署OceanBase企业版销售合同,请你联系客户经理;
2.如你所在的企业客户尚未签署OceanBase企业版销售合同,你可通过OceanBase官网商务咨询页面留下你的联系方式,OceanBase企业版的业务顾问会在一个工作日内与你联系。
OceanBase官网商务咨询

https://www.oceanbase.com/contactus?fromPage=https%3A%2F%2Fwww.oceanbase.com%2Fsoftwarecenter-enterprise&dataSources=softwarecenter-enterprise_footercontact_d2022

1 个赞