This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 5b39079f2f AMBARI-26334: Fix execute_db_connection_check failed error
(#3958)
5b39079f2f is described below
commit 5b39079f2fc381c4801175d49ae24459c3187158
Author: jialiang <[email protected]>
AuthorDate: Tue Mar 18 13:16:02 2025 +0800
AMBARI-26334: Fix execute_db_connection_check failed error (#3958)
---
.../stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py | 2 +-
ambari-server/src/main/resources/custom_actions/scripts/check_host.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git
a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
index edaeecb655..08aec2fdd0 100644
---
a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
+++
b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
@@ -47,7 +47,7 @@ def hive_service(name, action="start"):
or params.hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver"
):
db_connection_check_command = format(
- "{java64_home}/bin/java -cp
{check_db_connection_jar}:/usr/share/java/{jdbc_jar_name}
org.apache.ambari.server.DBConnectionVerification {hive_jdbc_connection_url}
{hive_metastore_user_name} {hive_metastore_user_passwd} {hive_jdbc_driver}"
+ "{ambari_java_home}/bin/java -cp
{check_db_connection_jar}:/usr/share/java/{jdbc_jar_name}
org.apache.ambari.server.DBConnectionVerification {hive_jdbc_connection_url}
{hive_metastore_user_name} {hive_metastore_user_passwd} {hive_jdbc_driver}"
)
Execute(
db_connection_check_command,
path="/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin"
diff --git
a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
index a8226dba19..f3deffa4a8 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
@@ -371,7 +371,8 @@ class CheckHost(Script):
ambari_server_hostname = config["commandParams"]["ambari_server_host"]
check_db_connection_jar_name = "DBConnectionVerification.jar"
jdk_location = config["commandParams"]["jdk_location"]
- java_home = config["commandParams"]["java_home"]
+ ambari_java_home = config["ambariLevelParams"]["ambari_java_home"]
+ java_home = ambari_java_home
db_name = config["commandParams"]["db_name"]
no_jdbc_error_message = None
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]