我正在使用MarkLogic版本9.0-3.1(免费社区版)并使用命令gradle mldeploy -i' gradle部署数据中心。在部署之前,我创建了一个'证书模板'在管理控制台中。
下面是我的gradle属性文件。我打算在端口8010(data-hub-STAGING)和8011(data-hub-FINAL)上启用ssl
mlAppName=data-hub
mlHost=localhost
mlUsername=xxxxx
mlPassword=xxxxx
mlStagingAuth=basic
mlFinalAuth=basic
mlAppServicesAuthentication=basic
mlTestRestPort=8015
mlTestRestServerName=data-hub-TEST
mlStagingAppserverName=data-hub-STAGING
mlStagingPort=8010
mlStagingDbName=data-hub-STAGING
mlStagingForestsPerHost=4
mlStagingAuth=digest
# To enable SSL for staging
mlStagingSimpleSsl=true
mlFinalAppserverName=data-hub-FINAL
mlFinalPort=8011
mlFinalDbName=data-hub-FINAL
mlFinalForestsPerHost=4
mlFinalAuth=digest
# To enable SSL for final
mlFinalSimpleSsl=true
mlTraceAppserverName=data-hub-TRACING
mlTracePort=8012
mlTraceDbName=data-hub-TRACING
mlTraceForestsPerHost=1
mlTraceAuth=digest
mlJobAppserverName=data-hub-JOBS
mlJobPort=8013
mlJobDbName=data-hub-JOBS
mlJobForestsPerHost=1
mlJobAuth=digest
mlModulesDbName=data-hub-MODULES
mlModulesForestsPerHost=1
mlTriggersDbName=data-hub-TRIGGERS
mlTriggersForestsPerHost=1
mlSchemasDbName=data-hub-SCHEMAS
mlSchemasForestsPerHost=1
# The name of the Role to create for Hub Access
mlHubUserRole=data-hub-role
mlHubUserName=data-hub-user
# this password is autogenerated for you via the 'gradle hubInit' task
mlHubUserPassword=xxxxxxx
以下是data-hub-STAGING服务器的user-config服务器属性文件的属性。 data-hub-FINAL的属性非常相似。
{
"server-name": "%%mlStagingAppserverName%%",
"server-type": "http",
"root": "/",
"group-name": "%%GROUP%%",
"port": "%%mlStagingPort%%",
"modules-database": "%%mlModulesDbName%%",
"content-database": "%%mlStagingDbName%%",
"authentication": "%%mlStagingAuth%%",
"default-error-format": "json",
"error-handler": "/MarkLogic/rest-api/error-handler.xqy",
"url-rewriter": "/MarkLogic/rest-api/rewriter.xml",
"rewrite-resolves-globally": true,
"ssl-allow-sslv3" : true,
"ssl-allow-tls" : true,
"ssl-disable-sslv3" : false,
"ssl-disable-tlsv1" : false,
"ssl-disable-tlsv1-1" : false,
"ssl-disable-tlsv1-2" : false,
"ssl-ciphers" : "ALL:!LOW:@STRENGTH",
"ssl-require-client-certificate" : false,
"ssl-hostname" : "localhost",
"ssl-certificate-template" : "https certificate"
}
我确认mlUsername在服务器上具有管理员权限,并且我通过mlPassword传递了正确的值,但仍然低于错误。
23:00:32.864 [DEBUG] [org.apache.http.impl.execchain.MainClientExec]目标身份验证状态:已挑战 23:00:32.864 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator]生成对身份验证的响应 消化方案 23:00:32.864 [DEBUG] [org.apache.http.impl.execchain.MainClientExec]代理身份验证状态:UNCHALLENGED 23:00:32.927 [DEBUG] [org.apache.http.impl.execchain.MainClientExec]连接可以保持5000 MILLISECONDS 23:00:32.927 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator]身份验证成功 23:00:32.927 [DEBUG] [org.apache.http.impl.client.TargetAuthenticationStrategy]缓存'摘要' http://的身份验证方案 本地主机:8002 23:00:32.927 [DEBUG] [org.springframework.web.client.RestTemplate] GET请求" http://localhost:8002/manage/v2/serv ERS /管理/属性组ID =默认&#34?;结果200(OK) 23:00:32.927 [DEBUG] [org.springframework.web.client.RestTemplate]读取[java.lang.String]为" application / xml; charse T = UTF-8"使用[org.springframework.http.converter.StringHttpMessageConverter@1ec08b7] 23:00:32.927 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection [id:1] [route:{} - > http:/ / localhost:8002]可以保持活动状态5.0秒 23:00:32.927 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager]已发布连接:[id:1] [route: {} - > http://localhost:8002][total保持活着:1;分配的路线:1的2;总分配:20个中的1个] 23:00:32.927 [DEBUG] [com.marklogic.client.impl.OkHttpServices]以管理员身份连接到8000的localhost 23:00:32.927 [DEBUG] [com.marklogic.client.impl.OkHttpServices]作为管理员在8010连接到localhost 23:00:32.927 [DEBUG] [com.marklogic.client.impl.OkHttpServices]发布评估 23:00:32.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter]删除任务artifac t来自上下文的状态。 23:00:32.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]完成执行任务':h ubPreInstallCheck' 23:00:32.927 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]:hubPreInstallCheck FAILED 23:00:32.927 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor]:hubPreInstallCheck(Thread [Daemon worker] 线程2,5,主要])完成。花了2.544秒。 23:00:32.927 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry]工作者root.1已完成(0 in 使用) 23:00:32.943 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor]任务工作者[Thread [Daemon worker Thread] 2,5,主]完成,忙:2.544秒,空闲:0.004秒 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter] 23:00:32.943 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE:构建因异常而失败。 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter] 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter] *出了什么问题: 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter]任务执行失败':hubPreInstallC 赫克&#39 ;. 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter]>本地消息:无法应用资源 在eval:未经授权。服务器消息:未经授权 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter] 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter] *尝试: 23:00:32.943 [错误] [org.gradle.internal.buildevents.BuildExceptionReporter]使用--stacktrace选项运行以获取st 确认。 23:00:32.943 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 23:00:32.943 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED 23:00:32.943 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 23:00:32.943 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]总时间:5.445秒 23:00:32.943 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess]释放任务历史记录的文件锁 y cache(G:\ Data-Hub \ EODH.gradle \ 3.4 \ taskHistory)
答案 0 :(得分:0)
除非您手动重新配置8000端口以将auth切换为非默认基本,否则您的问题很可能是需要将mlAppServicesAuthentication
设置为摘要而不是基本。
此外,您在gradle属性的顶部声明了许多基本身份验证,然后将其重新声明为摘要。我建议修复它,以便更容易理解实际设置的属性。