首页 > 解决方案 > Marklogic 内容泵没有可用的服务器问题

问题描述

我在集群上有 marklogic 9。我正在尝试在服务器上从一个集合执行 mlcp 到另一个集合。

请在下面找到随附的代码

            MlcpBean mlcpBean =  new MlcpBean(); 
            mlcpBean.setCommand("COPY");
            mlcpBean.setInput_database("somehost");

            mlcpBean.setCollection_filter("somecollection");
            mlcpBean.setInput_host("somehost"); 
            mlcpBean.setInput_port(some port);


            mlcpBean.setInput_username("some user id");


            mlcpBean.setInput_password("some password");

           String[] args1 = mlcpBean.buildArgs(); 

      String[] expandedArgs =
      OptionsFileUtil.expandArguments(args1); 
      // Invoke mlcp
      ContentPump.runCommand(expandedArgs); }



    When I run the above  class it gives me the following error


    01:01:00.104 [scheduling-1] WARN  c.m.mapreduce.MarkLogicInputFormat - Unable to connect to "********.com" to query source information

    01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Error getting input splits: 






    01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Unable to query source information, no usable hostname found.

它甚至不连接到主机。

我已经从另一个没有运行 mlcp 但使用 databaseclientfactory 的程序验证了可以建立连接

我也无法验证 -ssl_protocol 是否为 TLSv1.2

有人可以帮我解决这个问题。

标签: marklogicmarklogic-9mlcp

解决方案


看起来您正在使用 MLCP JAR 中的类来构建新的 Java 程序。这种方法实际上不受支持,并且会使您面临在未来版本中未经宣布的情况发生变化的风险。如果这是一次性副本,您可以使用 MLCP 作为命令行工具;如果这是你打算随着时间推移使用的东西,你应该使用 MarkLogic 的数据移动 SDK,用于这样的任务。

如果您在使用 DMSDK 时遇到问题,我鼓励您尝试一下,然后发布一个新问题。


推荐阅读