Support Questions
Find answers, ask questions, and share your expertise

Issue while test connection in Hive

Highlighted

Issue while test connection in Hive

Hi All

I am facing issue while doing database connection in Hive configuration. Can anyone please help me on this.

Below is the error.

2017-06-01 07:25:51,449 - Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 416, in execute_db_connection_check
    download_file(check_db_connection_url, check_db_connection_path)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 58, in download_file
    force_download_file(link, destination, chunk_size, progress_func = progress_func)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 126, in force_download_file
    response = urllib2.urlopen(request)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
2017-06-01 07:25:51,451 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 531, in <module>
    CheckHost().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 206, in actionexecute
    raise Fail(error_message)
resource_management.core.exceptions.Fail: Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable

stdout:
2017-06-01 07:24:02,829 - Host checks started.
2017-06-01 07:24:02,829 - Check execute list: db_connection_check
2017-06-01 07:24:02,830 - DB connection check started.
2017-06-01 07:25:51,449 - Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 416, in execute_db_connection_check
    download_file(check_db_connection_url, check_db_connection_path)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 58, in download_file
    force_download_file(link, destination, chunk_size, progress_func = progress_func)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 126, in force_download_file
    response = urllib2.urlopen(request)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
2017-06-01 07:25:51,451 - Host checks completed.
2017-06-01 07:25:51,451 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable

Command failed after 1 tries
15 REPLIES 15
Highlighted

Re: Issue while test connection in Hive

Super Mentor

@Ankit Saxena

Please check if the following JAR is present on the ambari server first:

# ls -l /var/lib/ambari-server/resources/DBConnectionVerification.jar

.

- Are you using Default Database for HIve? You can get Hive Database Details from ambari UI

15889-hive-db-hostport-details.png

For non default databases you will need to setup the Database first : https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-administration/content/using_hive...

.

Please make sure that you are able to login to the Database using standard DB utilities form the ambari server host. Just to isolate the Firewall/Network Issue

# From Ambari Server Host try to connect to Hive Database Host & Port to verify connectivity
telnet   $HIVE_DB_HostName    $HIve_DB_Port

.

Highlighted

Re: Issue while test connection in Hive

Hi

I able to login with postgres user.

I have created Hive user and passsword also. Not sure what is the exact issue.

dewdfglp01611:~ # su - postgres

postgres@dewdfglp01611:~>

Regards

Ankit

Highlighted

Re: Issue while test connection in Hive

HI

I am still facing the same issue in cluster. Can anyone please help.

Regards
Ankit

Highlighted

Re: Issue while test connection in Hive

@Jay SenSharma

I am still facing this issue with DBConnectionVerification.jar file in cluster . Can you please help.

Regards

Ankit

Re: Issue while test connection in Hive

Expert Contributor
@Ankit Saxena

Can you please check you have followed the steps given in: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.0/bk_ambari-reference/content/using_hive_with...

this is to setup the Postgres JDBC jar with Ambari.

Thanks

Venkat

Highlighted

Re: Issue while test connection in Hive

Super Mentor

@Ankit Saxena

Are you still getting the same error as following?

2017-06-01 07:25:51,451 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.HTTP Error 503: Service Unavailable

.

If yes, then it might be a proxy issue. Can you please check if there is any N/W proxy configured at your end which is causing the request to ambari pass through the Proxy server? If proxy is configured then please check the web proxy server log?

https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-administration/content/ch_setting...

If that is the case then you will need to check the following file: "/var/lib/ambari-server/ambari-env.sh" and edit the "AMBARI_JVM_ARGS" variable to include the proxy information's.

-Dhttp.proxyHost=<yourProxyHost> -Dhttp.proxyPort=<yourProxyPort>

.

Also please check the following files to see if there is any proxy setting added?

# grep 'proxy'  /etc/yum.conf
# grep 'proxy' ~/.profile 
# grep 'proxy' ~/.bash_profile

.

Highlighted

Re: Issue while test connection in Hive

Super Mentor
Highlighted

Re: Issue while test connection in Hive

@Jay SenSharma

I am working SLES 12 SP2 version. Is this slution applies for this version of linux.

I am have 4 servers in cluster. Also i have created one other user "cluster_admin" with root access. Is that canbe the issue.

Hive i have configured in same host as ambari server.

Below posting the log again.

2017-08-24 08:10:06,623 - Host checks started.
2017-08-24 08:10:06,623 - Check execute list: db_connection_check
2017-08-24 08:10:06,623 - DB connection check started.
2017-08-24 08:10:16,105 - Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 416, in execute_db_connection_check
    download_file(check_db_connection_url, check_db_connection_path)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 59, in download_file
    force_download_file(link, destination, chunk_size, progress_func = progress_func)
  File "/usr/lib/python2.6/site-packages/ambari_commons/inet_utils.py", line 138, in force_download_file
    response = urllib2.urlopen(request)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
2017-08-24 08:10:16,106 - Host checks completed.
2017-08-24 08:10:16,106 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 503: Service Unavailable
 

Command failed after 1 tries

Regards

Ankit

Highlighted

Re: Issue while test connection in Hive

Hi

Also below are proxy in our server.

# env | grep proxy

http_proxy=http://proxy:8080/

ftp_proxy=http://proxy:8080/

socks_proxy=

gopher_proxy=

https_proxy=http://proxy:8080/

no_proxy=.sap.corp,.sap-ag.de

Regards

Ankit

Don't have an account?