【发布时间】:2021-04-15 05:38:11
【问题描述】:
我正在尝试使用 ml-Gradle 将我的应用程序部署到 AWS 中 EC2 实例上的 MarkLogic Server。我运行的任何 gradle 命令都出现以下错误,并且在网络上找不到任何有关它的信息。
错误:
Error occurred while loading REST modules: Error occurred while loading modules; host: <IP IS HERE BUT TAKEN OUT BY ME FOR THIS POST>; port: 8010; cause: Local message: /config/query not found for write. Server Message: Request failed. Error body not received from server
我知道我点击了正确的主机 IP 地址并拥有正确的凭据。有没有人见过这个?这在我们的 DEV 环境中部署得很好,所以奇怪的是它在这个环境中不起作用。
【问题讨论】:
-
您确定 8010 从外面可见吗?如果您通过 SSH 隧道进行部署,则需要区分 gradle 端使用的端口和用于配置 MarkLogic 的端口。
-
尝试通过您的网络浏览器访问 host:8010/v1/config/query 以查看是否可以解决。还要检查是否需要 SSL 连接。
-
@rjrudin 有趣的发现。在部署工作的 DEV 环境中,我通过对主机运行 curl 请求得到以下输出:8010/v1/config/query:
<rapi:query-options xmlns:rapi="http://marklogic.com/rest-api"> <rapi:options> <rapi:name>default</rapi:name> <rapi:uri>/v1/config/query/default</rapi:uri> </rapi:options> <rapi:options> <rapi:name>staging-entity-options</rapi:name> <rapi:uri>/v1/config/query/staging-entity-options</rapi:uri> </rapi:options> </rapi:query-options>我在失败的环境中什么也得不到。 -
@rjrudin 我查看了模块数据库并找到了这两个文件。它们与我们的 DEV 环境中的完全匹配,但 curl 请求没有返回任何内容。