You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2014/02/21 12:16:20 UTC
git commit: AMBARI-4715 ambari-server fails to start at HTTPS mode
(dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk 77e37961e -> 44f0f2d97
AMBARI-4715 ambari-server fails to start at HTTPS mode (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/44f0f2d9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/44f0f2d9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/44f0f2d9
Branch: refs/heads/trunk
Commit: 44f0f2d9739070e0954f4aa0b3ed63fd3a7efaf7
Parents: 77e3796
Author: Dmitry Sen <ds...@hortonworks.com>
Authored: Fri Feb 21 13:15:52 2014 +0200
Committer: Dmitry Sen <ds...@hortonworks.com>
Committed: Fri Feb 21 13:15:52 2014 +0200
----------------------------------------------------------------------
.../scheduler/ExecutionScheduleManager.java | 22 +++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/44f0f2d9/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java b/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java
index 3623beb..2ebb76b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java
@@ -114,21 +114,23 @@ public class ExecutionScheduleManager {
}
protected void buildApiClient() {
- if (configuration.getApiSSLAuthentication()) {
- //TODO build SSL client
-
- } else {
- Client client = Client.create();
-
- this.ambariClient = client;
- String pattern = "http://localhost:%s/";
- String url = String.format(pattern, configuration.getClientApiPort());
+ Client client = Client.create();
+ this.ambariClient = client;
- this.ambariWebResource = client.resource(url);
+ String pattern;
+ String url;
+ if (configuration.getApiSSLAuthentication()) {
+ pattern = "https://localhost:%s/";
+ url = String.format(pattern, configuration.getClientSSLApiPort());
+ } else {
+ pattern = "http://localhost:%s/";
+ url = String.format(pattern, configuration.getClientApiPort());
}
+ this.ambariWebResource = client.resource(url);
+
//Install auth filters
ClientFilter csrfFilter = new CsrfProtectionFilter("RequestSchedule");
ClientFilter tokenFilter = new InternalTokenClientFilter(tokenStorage);