-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.7.5
-
Fix Version/s: 2.7.6
-
Component/s: ambari-server
-
Labels:
Problem statement : Hive Service Check Fails if the trustStorePassword has Special character $
the error logs say :
2020-04-10 08:20:14,748 - Execute['! (beeline -u 'jdbc:hive2://c4229-node3.coelab.cloudera.com:10000/;transportMode=binary;ssl=true;sslTrustStore=/tmp/keystore1.jks;trustStorePassword=[PROTECTED]' -n hive -e ';' 2>&1 | awk '{print}' | grep -vz -i -e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery')'] {'path': ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'], 'timeout_kill_strategy': 2, 'timeout': 30, 'user': 'ambari-qa'} 2020-04-10 08:20:19,509 - Connection to c4229-node3.coelab.cloudera.com on port 10000 failed 2020-04-10 08:20:24,513 - Execute['! (beeline -u 'jdbc:hive2://c4229-node3.coelab.cloudera.com:10000/;transportMode=binary;ssl=true;sslTrustStore=/tmp/keystore1.jks;trustStorePassword=[PROTECTED]' -n hive -e ';' 2>&1 | awk '{print}' | grep -vz -i -e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery')'] {'path': ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'], 'timeout_kill_strategy': 2, 'timeout': 30, 'user': 'ambari-qa'} 2020-04-10 08:20:28,927 - Connection to c4229-node3.coelab.cloudera.com on port 10000 failed
Root cause : the trustStorePassword should idaelly be passed in single quotes to ignore the $ sign, the fix lies in : https://github.com/apache/ambari/blob/a4b2901a9a16e356c230fb647471e099b2d965ba/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py#L61
changing
beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', 'trustStorePassword={ssl_password!p}'])
to :
beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', "trustStorePassword='{ssl_password!p}'"])
- links to