Support Questions

Find answers, ask questions, and share your expertise

error loading DBConnectionVerification.jar

avatar
Super Collaborator

I know I have a proxy issue some where but in order to find the issue I need to understand the flow. how does this jar file gets downloaded to a node from ambari server ? The log for testing the "hive" module from ambari console ,is not giving any detail and just that its couldn't download this jar file.

its some kind of localized proxy issue since other operations worked fine so far .

MYSQL connection error 

2017-06-16 21:27:10,803 - Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 504: Gateway Timeout
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Sami Ahmad - If we try to understand what is happening behind the error:

2017-06-16 21:27:10,803 - Error downloading DBConnectionVerification.jar
 from Ambari Server resources. Check network access to Ambari Server.
HTTP Error 504: Gateway Timeout

- 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.

http://$AMBARI_SERVERHOST:8080/resources/DBConnectionVerification.jar

- Now if due to some reason the agents are not able to download this JAR from ambari server host over HTTP then the clients (agents) will fail to perform the DB connection check.

- In your case the Agents are not able to download this JAR from ambari server host because of the following error:

HTTP Error 504: Gateway Timeout

- This indicates that from the agent machines the following URL access is failing (using wget here just for demo, agents will use the python approach to download this jar):

wget http://$AMBARI_SERVERHOST:8080/resources/DBConnectionVerification.jar

What is the root cause: - Putting this JAR manually from Ambari Server host to Agents machines can make it work temporarily, but it will not fix the permanent issue. We should findout why the Agents are not able to download this jar from ambari server host. Agents should be able to access ambari server resources using HTTP.

.

View solution in original post

13 REPLIES 13

avatar
Super Collaborator

hi Jay

but as I have shown that the "no_proxy" variable is defined in my /etc/environment file but wget is not using it .

I also tried adding the no_proxy variable to the wgetrc file but didn't help.

[root@hadoop1 etc]# grep proxy /etc/wgetrc
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/
https_proxy = http://dotatofwproxy.tolls.dot.state.fl.us:8080/
http_proxy = http://dotatofwproxy.tolls.dot.state.fl.us:8080/
no_proxy=".tolls.do.state.fl.us,hadoop1.tolls.dot.state.fl.us,hadoop1"

so how can I get wget to use the no_proxy variable?

avatar
Master Mentor

@Sami Ahmad

Try using the file name as "$USER_HOME/.wgetrc"

Wget initialization file can reside inside the following files:
1. "/usr/local/etc/wgetrc" (global, for all users) 
(OR) 
2. $HOME/.wgetrc (for a single user).
<strong></strong>

You can try defining the entry of no_proxy inside the "$HOME/.wgetrc" file. "no_proxy"to use string as the comma-separated list of domains to avoid in proxy loading, instead of the one specified in environment.

Please see:

[0] https://www.gnu.org/software/wget/manual/html_node/Sample-Wgetrc.html

[1] https://www.gnu.org/software/wget/manual/html_node/Wgetrc-Location.html

[2] https://www.gnu.org/software/wget/manual/html_node/Proxies.html

.

avatar
Super Collaborator

I put a .wgetrc file in root login folder but still wget is trying to access proxy.. its not taking the "no_proxy" variable setting.

[root@hadoop1 ~]# pwd
/root
[root@hadoop1 ~]# grep proxy .wgetrc
https_proxy = http://dotatofwproxy.tolls.dot.state.fl.us:8080/
http_proxy = http://dotatofwproxy.tolls.dot.state.fl.us:8080/
no_proxy=".tolls.do.state.fl.us,hadoop1.tolls.dot.state.fl.us,hadoop1"
# If you do not want to use proxy at all, set this to off.
#use_proxy = on

avatar
Super Collaborator

found the solution , on web all info about no_proxy settings for Centos is incorrect. what worked for me was removing the ~.wgetrc file and putting the following file in place .

issue is that wget is not taking the no_proxy settings from .wgetrc file, but if I define it on the system level it picks it up.

/etc/profile.d/proxy.sh

export http_proxy="http://dotatofwproxy.tolls.dot.state.fl.us:8080/"
export https_proxy="https://dotatofwproxy.tolls.dot.state.fl.us:8080/"
export ftp_proxy="ftp://dotatofwproxy.tolls.dot.state.fl.us:8080/"
export no_proxy=".tolls.dot.state.fl.us,hadoop1,hadoop2,hadoop3,hadoop4,hadoop5"