---
title: OMS 数据迁移预检查报服务器内部错误-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于OMS 数据迁移预检查报服务器内部错误相关的常见问题和使用技巧，帮助您快速解决OMS 数据迁移预检查报服务器内部错误的难题。
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)划线反馈

# OMS 数据迁移预检查报服务器内部错误

更新时间：2026-06-23 09:11

适用版本： V4.0.x、V3.4.x、V3.1.x、V3.2.x、V3.3.x、V2.1.x、V2.2.x、V1.3.x、V1.4.x、V2.0.x 内容类型：Troubleshoot  

本文为您介绍数据迁移项目预检查报服务器内部错误的原因和解决方法。

## 适用版本

适用于 OceanBase 迁移服务（OceanBase Migration Service，OMS）V4.1.0 之前版本。

## 问题描述

使用 OMS 新建迁移对象较多（8500+）的数据迁移项目时，预检查报服务器内部错误。

![oms](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/OMS/img8sHyrTCS5h.png)

## 问题原因

进入 OMS 容器查看如下日志。

```shell
# docker exec -it oms bash -c 'ls -lth /home/admin/logs/ghana/Ghana/common-default.log'
-rw-r--r-- 1 root root 880K Jun 27 16:41 /home/admin/logs/ghana/Ghana/common-default.log

```

您可以将该日志同步给 OMS 技术支持人员。

```shell
# docker cp oms:/home/admin/logs/ghana/Ghana/common-default.log .

```

通过查看日志文件，发现是由于 `meta_cluster` (metadb) 中 `oms_meta` 租户的 `max_allowed_packet` 默认值 `4194304` 较小导致该问题。

```sql
2023-06-27 16:10:30.925 [http-nio-8090-exec-7] ERROR c.a.o.c.a.OmsControllerAop 158 - [cea2ec77-026b-454c-a7cf-62e7caca68db] Occur unknown exception when calling method OmsApiReturnResult com.alipay.oms.v3.controller.TransferLinkController.submitPreCheck(SubmitPreCheckRequest)
org.springframework.dao.TransientDataAccessResourceException:
### Error updating database.  Cause: java.sql.SQLTransientConnectionException: (conn=1809072) query size (4194304) is >= to max_allowed_packet (4194304)
### The error may exist in com/alipay/oms/common/dal/mapper/common/OmsTaskMapper.java (best guess)
### The error may involve com.alipay.oms.common.dal.mapper.common.OmsTaskMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO oms_task  ( id,  task_type,   task_param, task_status, task_result,   extra_info )  VALUES  ( ?,  ?,   ?, ?, ?,   ? )
### Cause: java.sql.SQLTransientConnectionException: (conn=1809072) query size (4194304) is >= to max_allowed_packet (4194304)
; (conn=1809072) query size (4194304) is >= to max_allowed_packet (4194304); nested exception is java.sql.SQLTransientConnectionException: (conn=1809072) query size (4194304) is >= to max_allowed_packet (4194304)

```

## 解决方法

- 方法一：通过 OCP 修改参数

  在 OCP 上将 `meta_cluster` (metadb) 中 `oms_meta` 租户的 `max_allowed_packet` 参数调整为 `67108864` 或允许的最大值 `1073741824`。

  由于参数需要重新连接才生效，您可以考虑在 OMS 本机通过如下命令重新启动 OMS 等方式强制重新连接。

  ```shell
  docker restart oms

  ```
 - 方法二：通过命令行修改参数

  确认是在 metadb 本机。

  ```shell
  # docker ps|grep -E 'oms|metadb'
  6859xxxxbc4d        reg.docker.alibaba-inc.com/oboms/oms-all-in-one:feature_4.0.2-bp1                                    "/bin/sh -c '/usr/bi…"   2 weeks ago         Up 2 weeks                                                             oms
  9ddxxxxd01d6        reg.docker.alibaba-inc.com/antman/ob-docker:OB2277_OBP329_x86_20230330                               "/root/init.sh"          3 weeks ago         Up 3 weeks                                                             metadb

  ```

  在 metadb 本机执行如下命令，例如，oms meta 租户名不一样，改成相应的租户名即可。

  ```shell
  # obclient -h127.0.0.1 -P2881 -uroot@oms_meta -pxxx
  Welcome to the MariaDB monitor.  Commands end with ; or \g.
  Your MySQL connection id is 3221606251
  Server version: 5.7.25 OceanBase 2.2.77 (r116010032023022813-4f4fbb6de5d7xxxxx500c21c) (Built Feb 28 2023 13:48:43)

  Copyright (c) 2000, 2018, xxx, xxxxx.

  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  MySQL [(none)]> show databases;
  +--------------------+
  | Database           |
  +--------------------+
  | oceanbase          |
  | information_schema |
  | mysql              |
  | test               |
  | oms_cm             |
  | oms_rm             |
  | oms_cm_heartbeat   |
  +--------------------+
  7 rows in set (0.00 sec)

  MySQL [(none)]> SHOW VARIABLES LIKE '%max_allowed_packet%';
  +--------------------+---------+
  | Variable_name      | Value   |
  +--------------------+---------+
  | max_allowed_packet | 4194304 |
  +--------------------+---------+
  1 row in set (0.01 sec)
  MySQL [(none)]> SET GLOBAL max_allowed_packet=67108864;
  Query OK, 0 rows affected (0.022 sec)

  ```

  ```

Previous

[OMS 新建数据同步项目预检查报错目标端 DataBase 不存在](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000321578)

Next

[OMS 数据迁移预检查时最大允许包大小检查项不通过](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000321580) ![有帮助](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) 咨询
