mlgradle 版本:5.0.0
gradle mlDeploy 出现以下错误:
* What went wrong:
Execution failed for task ':mlDeployApp'.
> Error occurred while calling http://<some-DNS-address>:8003/v1/config/properties; java.net.SocketException: Connection reset ; possible reasons for the error include that a MarkLogic app server may not be listening on the port, or MarkLogic was stopped or restarted during the request; check the MarkLogic server logs for more information.
我们的防火墙只允许 HTTPS,我想这就是连接失败的原因。在 gradle.properties 中,我设置了以下内容来指定 HTTPS,但它仍然使用 HTTP 作为 8003 端口。
mlManageSimpleSsl=true
mlAdminSimpleSsl=true
mlRestSimpleSsl=true
mlAppServicesSimpleSsl=true
如何为端口 8003 指定 HTTPS?
为了启用 TLS/SSL 与应用服务器通信,请设置
mlSimpleSsl
https://github.com/marklogic/ml-gradle/issues/304#issuecomment-362588977
https://github.com/marklogic/ml-gradle/wiki/Property-reference#rest-api-server-connection-properties
查看示例 SSL 项目: https://github.com/marklogic/ml-gradle/blob/master/examples/ssl-project/gradle.properties