You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

mlgradle执行mlDeployDatabase未创建副本森林问题咨询

mlgradle 4.6.1执行mlDeployDatabase未生成副本森林问题排查

问题背景

去年使用类似配置可正常创建副本森林,但当前使用mlgradle 4.6.1在新数据库执行mlDeployDatabase时,仅生成主森林,无副本。执行mlPrintForestPlan时,输出的JSON包含正确的副本规划描述,两者输出存在明显差异。

配置信息

mlForestsPerHost=he-content,2,he-content-MEDIA,2,he-media-content-TRIGGERS,1,he-media-content-SCHEMAS,1,he-content-TRIGGERS,1,he-content-SCHEMAS,1,he-test-triggers,1,he-test-schemas,1,he-test-content,1
mlDatabaseNamesAndReplicaCounts=he-content,2,he-content-MEDIA,1,he-content-media-TRIGGERS,1,he-content-media-SCHEMAS,1,he-content-TRIGGERS,1,he-content-SCHEMAS,1,he-test-triggers,0,he-test-schemas,0,he-test-content,0

任务输出对比

mlPrintForestPlan输出(含副本规划)

{
  "forest-name" : "he-content-1",
  "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-1-replica-1"
  }, {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-1-replica-2"
  } ]
}
{
  "forest-name" : "he-content-2",
  "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-2-replica-1"
  }, {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-2-replica-2"
  } ]
}
{
  "forest-name" : "he-content-3",
  "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-3-replica-1"
  }, {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-3-replica-2"
  } ]
}
{
  "forest-name" : "he-content-4",
  "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-4-replica-1"
  }, {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-4-replica-2"
  } ]
}
{
  "forest-name" : "he-content-5",
  "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-5-replica-1"
  }, {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-5-replica-2"
  } ]
}
{
  "forest-name" : "he-content-6",
  "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-6-replica-1"
  }, {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-6-replica-2"
  } ]
}

mlDeployDatabase输出(仅主森林)

{
      "forest-name" : "he-content-1",
      "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-2",
      "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-3",
      "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-4",
      "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-5",
      "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-6",
      "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
      "database" : "he-content"
    } 

排查方向与解决方案

  1. 版本兼容性验证:mlgradle 4.6.1可能存在副本创建逻辑的bug,尝试升级到最新稳定版,或回退到之前能正常工作的版本复现验证。
  2. 权限检查:确认执行mlDeployDatabase的用户具备manage-forest和manage-database权限,无权限会导致副本创建失败。
  3. 配置名称一致性核对:检查mlDatabaseNamesAndReplicaCounts与mlForestsPerHost中的数据库名称是否完全匹配,比如配置里的he-content-media-TRIGGERS和he-media-content-TRIGGERS疑似笔误,名称不匹配会导致副本规则不生效。
  4. 拆分执行任务:先单独执行mlCreateForests创建包含副本的森林,再执行mlDeployDatabase关联数据库,验证是否能生成副本。
  5. MarkLogic服务器配置检查:确认服务器已开启森林副本功能,且主机数量满足副本部署要求(当前3台主机符合2个副本的部署条件)。

内容的提问来源于stack exchange,提问作者Marc Messéant

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 17:07:03