Support Questions

Find answers, ask questions, and share your expertise

Error downloading DBConnectionVerification.jar while testing connection in Ambari console

Explorer

Hi Team
Getting this issue while testing db connection in Ambari Server console for creating HDP cluster on single node.

Error

stderr:
2018-10-24 13:51:34,463 - 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 414, in execute_db_connection_check
    download_file(check_db_connection_url, check_db_connection_path)
  File "/usr/lib/ambari-agent/lib/ambari_commons/inet_utils.py", line 68, in download_file
    force_download_file(link, destination, chunk_size, progress_func = progress_func)
  File "/usr/lib/ambari-agent/lib/ambari_commons/inet_utils.py", line 171, 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 437, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
2018-10-24 13:51:34,466 - 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 546, in <module>
    CheckHost().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 351, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 207, 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:
2018-10-24 13:51:34,437 - Host checks started.
2018-10-24 13:51:34,438 - Check execute list: db_connection_check
2018-10-24 13:51:34,438 - DB connection check started.
2018-10-24 13:51:34,463 - 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 414, in execute_db_connection_check
    download_file(check_db_connection_url, check_db_connection_path)
  File "/usr/lib/ambari-agent/lib/ambari_commons/inet_utils.py", line 68, in download_file
    force_download_file(link, destination, chunk_size, progress_func = progress_func)
  File "/usr/lib/ambari-agent/lib/ambari_commons/inet_utils.py", line 171, 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 437, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
2018-10-24 13:51:34,466 - Host checks completed.
2018-10-24 13:51:34,466 - 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
1 REPLY 1

Super Mentor

@Birendra Singh

As you are getting this error:

Check db_connection_check was unsuccessful. Exit code: 1. Message: Error downloading DBConnectionVerification.jar

.
Hence you should verify if the following JAR is present on the ambari server first:

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

.

- Ambari uses the following JAR"/var/lib/ambari-server/resources/DBConnectionVerification.jar"to perform various DB connectivity tests.

- This JAR need to be present in all the Ambari Agent Hosts. So Ambari Agents uses the following URL to download the mentioned JAR from ambari server host and then puts it inside their"/var/lib/ambari-agent/tmp/DBConnectionVerification.jar" location.

So please check if from the failing host if you are able to download this JAR using curl call (just to verify resource access)

# cd /tmp
# curl http://$AMBARI_SERVERHOST:8080/resources/DBConnectionVerification.jar

.

If you are not able to download the JAR then you will need to also check the proxy settings as described on the following links:

https://community.hortonworks.com/questions/107933/error-loading-dbconnectionverificationjar.html

and

https://community.hortonworks.com/questions/105665/issue-while-test-connection-in-hive.html

.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.