使用OCP4.2.1升级OB4.1.0.2到4.2.0.0报错

【 使用环境 】生产环境
【 OB or 其他组件 】
【 使用版本 】OB 4.1.0.2 OCP 4.2.1
【问题描述】
更新脚本运行到Install dependencies的时候报错如下
2023-12-06 08:36:03.429 INFO 3013778 — [pool-manual-subtask-executor16,895a0f87fc3b44e3,5f3e3dc8a2b1] c.o.o.e.internal.template.HttpTemplate : POST request to agent, url:http://10.10.10.146:62888/api/v1/task/status, request body:GetTaskStatusRequest(taskToken=1fb8bb8a-cf32-424e-93cd-779447c07dde), params:null
2023-12-06 08:36:03.436 INFO 3013778 — [pool-manual-subtask-executor16,895a0f87fc3b44e3,5f3e3dc8a2b1] c.o.o.s.task.util.AgentAsyncTaskHelper : try to request task result(EXECUTE), result:false,null,OcpAgentError: code = 3001, message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer,
2023-12-06 08:36:03.439 ERROR 3013778 — [pool-manual-subtask-executor16,895a0f87fc3b44e3,5f3e3dc8a2b1] c.o.o.s.task.util.AgentAsyncTaskHelper : failed to execute async task, task token: 1fb8bb8a-cf32-424e-93cd-779447c07dde, err: OcpAgentError: code = 3001, message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer
2023-12-06 08:36:03.441 ERROR 3013778 — [pool-manual-subtask-executor16,895a0f87fc3b44e3,5f3e3dc8a2b1] c.o.ocp.core.util.ExceptionUtils : Checked Exception: com.oceanbase.ocp.core.exception.UnexpectedException occurred with code error.common.agent.task.failed, and args [1fb8bb8a-cf32-424e-93cd-779447c07dde, OcpAgentError: code = 3001, message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer]
2023-12-06 08:36:03.444 ERROR 3013778 — [pool-manual-subtask-executor16,895a0f87fc3b44e3,5f3e3dc8a2b1] c.o.o.c.t.e.c.w.subtask.SubtaskExecutor : OCP-Agent task 1fb8bb8a-cf32-424e-93cd-779447c07dde failed, error message: OcpAgentError: code = 3001, message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer
com.oceanbase.ocp.core.exception.UnexpectedException: [OCP UnexpectedException]: status=500 INTERNAL_SERVER_ERROR, errorCode=COMMON_AGENT_TASK_FAILED, args=1fb8bb8a-cf32-424e-93cd-779447c07dde,OcpAgentError: code = 3001, message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer
at com.oceanbase.ocp.core.i18n.ErrorCodes$Kind$10.exception(ErrorCodes.java:1489)
at com.oceanbase.ocp.core.i18n.ErrorCodes.exception(ErrorCodes.java:1344)
at com.oceanbase.ocp.core.util.ExceptionUtils.newException(ExceptionUtils.java:169)
at com.oceanbase.ocp.core.util.ExceptionUtils.throwException(ExceptionUtils.java:162)
at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.checkSuccess(AgentAsyncTaskHelper.java:219)
at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.waitForExecuteFinish(AgentAsyncTaskHelper.java:172)
at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.installPackage(AgentAsyncTaskHelper.java:68)
at com.oceanbase.ocp.compute.host.service.HostOperationServiceImpl.installRpm(HostOperationServiceImpl.java:241)
at com.oceanbase.ocp.compute.host.service.HostOperationServiceImpl.downloadAndInstallRpm(HostOperationServiceImpl.java:141)
at com.oceanbase.ocp.service.task.business.cluster.InstallDepsTask.run(InstallDepsTask.java:47)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.execute(JavaSubtaskRunner.java:59)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.doRun(JavaSubtaskRunner.java:31)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.run(JavaSubtask
Runner.java:25)
at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.doRun(RunnerFactory.java:76)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.doRun(SubtaskExecutor.java:193)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.redirectConsoleOutput(SubtaskExecutor.java:187)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.lambda$submit$2(SubtaskExecutor.java:124)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Set state for subtask: 4010682, operation:EXECUTE, state: FAILED

message = Install software package failed, reason: previous installed package oceanbase-ce-libs prefix not matched. prev: /home, new: /home/admin/observer]
麻烦提供下ocp-server.log和observer.log日志吧

20231206.7z (2.3 MB)

解决方法:
查看每个ob节点的/home/admin/ocp-agent目录下的task_store、pkg_store,清理掉pkg_store目录下的oceanbase-ce-libs包以后,重新执行任务即可。

1 个赞

感谢王总,解决了!