You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2016/04/01 10:24:55 UTC
ambari git commit: AMBARI-15654. ambari-server database check is
failing due to EOF Error.(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/trunk 0ada5769a -> 0312e29ff
AMBARI-15654. ambari-server database check is failing due to EOF Error.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0312e29f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0312e29f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0312e29f
Branch: refs/heads/trunk
Commit: 0312e29ffe564ce56a5f82574a8a3ba9a7ba7d39
Parents: 0ada576
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Fri Apr 1 11:23:57 2016 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Fri Apr 1 11:23:57 2016 +0300
----------------------------------------------------------------------
.../org/apache/ambari/server/configuration/Configuration.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0312e29f/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 9a78dc2..5793b70 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -1604,12 +1604,17 @@ public class Configuration {
public String getDatabasePassword() {
String passwdProp = properties.getProperty(SERVER_JDBC_USER_PASSWD_KEY);
String dbpasswd = null;
+ boolean isPasswordAlias = false;
if (CredentialProvider.isAliasString(passwdProp)) {
dbpasswd = readPasswordFromStore(passwdProp);
+ isPasswordAlias =true;
}
if (dbpasswd != null) {
return dbpasswd;
+ } else if (dbpasswd == null && isPasswordAlias) {
+ LOG.error("Can't read db password from keystore. Please, check master key was set correctly.");
+ throw new RuntimeException("Can't read db password from keystore. Please, check master key was set correctly.");
} else {
return readPasswordFromFile(passwdProp, SERVER_JDBC_USER_PASSWD_DEFAULT);
}