---
title: "升级或重装 OCP Agent 时遇到报错：Unexpected error: reload config properties error 的原因和解决方法-OceanBase数据库使用指南"
description: "了解OceanBase数据库在实际应用中关于升级或重装 OCP Agent 时遇到报错：Unexpected error: reload config properties error 的原因和解决方法相关的常见问题和使用技巧，帮助您快速解决升级或重装 OCP Agent 时遇到报错：Unexpected error: reload config properties error 的原因和解决方法的难题。"
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# 升级或重装 OCP Agent 时遇到报错：Unexpected error: reload config properties error 的原因和解决方法

更新时间：2026-07-08 08:01

适用版本： V1.x、V2.x、V3.x、V4.x 内容类型：Troubleshoot  

## 问题现象

通过 OCP Web 界面或者 OCP 开放出来的 RESTful AP 接口来升级或重装 OCP Agent 时遇到报错：

```shell
错误信息操作 OCP-Agent 失败，错误信息：Unexpected error: reload config properties err: load config properties from path /home/admin/ocp_agent/conf/config_properties, err:read config files from dir:/home/admin/ocp_agent/conf/config_properties, err:open /home/admin/ocp_agent/conf/config_properties: no such file or directory

```

![image01](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/OCP/20251112error-occurred-while-upgrading-reinstalling-ocp-agent-unexpected-reload-config-properties01.png)

反复重试依旧无效，将这一步标记成功后，后续的步骤还是会继续报错。

## 问题原因

报错的直接原因是对应主机上 OCP Agent 相关的目录文件缺失了：

```shell
[root@ob64 ~]# ls /home/admin/ocp_agent/conf/config_properties
ls: cannot access '/home/admin/ocp_agent/conf/config_properties': No such file or directory
[root@ob64 ~]#
[root@ob64 ~]# ls /home/admin/ocp_agent/conf
ls: cannot access '/home/admin/ocp_agent/conf': No such file or directory
[root@ob64 ~]#
[root@ob64 ~]# ls /home/admin/ocp_agent
log  snapshots
[root@ob64 ~]#
正常环境上的目录结构如下：
[root@ob64 ~]# ls -ltr /home/admin/ocp_agent
total 8
drwxr-xr-x 2 root root    6 Aug 15 11:32 tmp
drwxr-xr-x 2 root root    6 Aug 15 11:32 backup
drwxr-xr-x 2 root root  106 Sep 22 13:24 bin
drwxr-xr-x 8 root root  257 Sep 22 13:24 site-packages
drwxr-xr-x 2 root root   60 Sep 22 13:24 pkg_store
drwxr-xr-x 2 root root  294 Sep 22 13:24 log
drwxr-xr-x 2 root root  201 Sep 22 13:24 run
drwxr-xr-x 8 root root  322 Sep 22 13:24 conf
drwxr-xr-x 2 root root 4096 Sep 22 13:24 position_store
drwxr-xr-x 2 root root  199 Sep 22 13:26 task_store
drwxr-xr-x 6 root root 4096 Sep 22 13:26 snapshots
[root@ob64 ~]# ls -ltr /home/admin/ocp_agent/conf
total 20
-rw-r--r-- 1 root root  302 Aug 15 11:32 monagent.yaml
-rw-r--r-- 1 root root  454 Aug 15 11:32 mgragent.yaml
-rw-r--r-- 1 root root 1101 Aug 15 11:32 agentd.yaml
-rw-r--r-- 1 root root  652 Aug 15 11:32 agentctl.yaml
drwxr-xr-x 2 root root   76 Sep 22 13:24 shell_templates
drwxr-xr-x 2 root root  213 Sep 22 13:24 scripts
drwxr-xr-x 2 root root 4096 Sep 22 13:24 module_config
drwxr-xr-x 4 root root   64 Sep 22 13:24 2025-09-22T13:24:33.4177+08:00
drwxr-xr-x 2 root root  243 Sep 22 13:24 config_properties
drwxr-xr-x 4 root root   64 Sep 22 13:24 2025-09-22T13:24:41.2191+08:00
[root@ob64 ~]# ls -ltr /home/admin/ocp_agent/conf/config_properties/
total 104
-rw-r--r-- 1 root root   765 Aug 15 11:32 log.yaml
-rw-r--r-- 1 root root   917 Aug 15 11:32 common_meta.yaml
-rw-r--r-- 1 root root   591 Sep 22 13:24 basic_auth.yaml
-rw-r--r-- 1 root root  1454 Sep 22 13:24 mgragent_pipeline.yaml
-rw-r--r-- 1 root root   237 Sep 22 13:24 default_config.yaml
-rw-r--r-- 1 root root  2736 Sep 22 13:24 ob_logcleaner.yaml
-rw-r--r-- 1 root root 43050 Sep 22 13:24 monagent_pipeline.yaml
-rw-r--r-- 1 root root 34747 Sep 22 13:24 ob_logtailer.yaml

```

## 问题的风险及影响

OCP Agent 重装或升级失败。

## 适用版本

OCP 所有版本。

## 解决方法

重装 OCP Agent 时，如果当前主机上的 `ocp_mgragent` 进程正在运行，OCP 会尝试将对应的重装命令下发给 `ocp_mgragent` 进程来执行：

```shell
[root@ob64 ~]# ps -ef | grep ocp
root       28059       1  0 Sep03 ?        01:27:01 /home/admin/ocp_agent/bin/ocp_mgragent
root       28060       1 20 Sep03 ?        3-21:43:20 /home/admin/ocp_agent/bin/ocp_monagent
root     2085752 2044109  0 11:52 pts/0    00:00:00 grep --color=auto ocp

```

如果对应的 `ocp_mgragent` 进程不存在，则会通过 ssh+主机凭据的方式远程登录到对应的主机上执行直接重装 OCP Agent 的脚本。 因此这边可以先回滚失败的任务，同时将所有存活的 OCP Agent 进程都手动 Kill 掉，再执行重装任务，让 OCP 通过 ssh 的方式来重装 OCP Agent，就可以成功了：

```shell
[root@ob64 ~]# ps -ef | grep ocp
root       28059       1  0 Sep03 ?        01:27:17 /home/admin/ocp_agent/bin/ocp_mgragent
root       28060       1 20 Sep03 ?        3-22:03:44 /home/admin/ocp_agent/bin/ocp_monagent
root     2214033 2044109  0 13:23 pts/0    00:00:00 grep --color=auto ocp
[root@ob64 ~]#
[root@ob64 ~]# kill -9 28059 28060
[root@ob64 ~]#
[root@ob64 ~]# ps -ef | grep ocp
root     2214367 2044109  0 13:23 pts/0    00:00:00 grep --color=auto ocp

```

![image02](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/OCP/20251112error-occurred-while-upgrading-reinstalling-ocp-agent-unexpected-reload-config-properties02.png)

## 规避方式

无。

Previous

[OCP 启动失败](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000006078472)

Next

[通过 systemd 来实现 OCP Agent/OBServer/OBProxy 开机自启动功能不生效的处理方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000001757539) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
