Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ranger installation failed while DB connection checking

Solved Go to solution

ranger installation failed while DB connection checking

Contributor

image1.png image2.png ranger-logs.txt

While doing the installation of ranger from ambari UI , pre-requisites are checked successfully and while checking the MySQL db connection , we are facing error of service unavailable.

Kindly find the attached files & logs.

please do the needful if possible. @Kuldeep Kulkarni

1 ACCEPTED SOLUTION

Accepted Solutions

Re: ranger installation failed while DB connection checking

Super Guru

@hardik desai

Can you please verify connectivity between Ranger admin and Ambari server host?

Telnet from Ranger Admin host to Ambari Server on 8080?

503 error code - looks like Ambari Server is too busy to respond or there is network issue between Ranger Admin and Ambari Server.

Can you manually copy DBConnectionVerification.jar from ambari-server to ambari-agent on ranger admin host and restart ambari-agent followed by retry DB connection.

On Ambari-server DBConnectionVerification.jar should present at below location

/var/lib/ambari-server/resources/DBConnectionVerification.jar

On Ambari-agent, copy DBConnectionVerification.jar at below location

/usr/lib/ambari-agent/DBConnectionVerification.jar
/var/lib/ambari-agent/tmp/DBConnectionVerification.jar
/var/lib/ambari-agent/cache/DBConnectionVerification.jar

You can also try to bounce Ambari Server and see if it helps.

Please keep us posted.

Thanks @Sagar Shimpi

6 REPLIES 6

Re: ranger installation failed while DB connection checking

Super Guru

@hardik desai

Can you please verify connectivity between Ranger admin and Ambari server host?

Telnet from Ranger Admin host to Ambari Server on 8080?

503 error code - looks like Ambari Server is too busy to respond or there is network issue between Ranger Admin and Ambari Server.

Can you manually copy DBConnectionVerification.jar from ambari-server to ambari-agent on ranger admin host and restart ambari-agent followed by retry DB connection.

On Ambari-server DBConnectionVerification.jar should present at below location

/var/lib/ambari-server/resources/DBConnectionVerification.jar

On Ambari-agent, copy DBConnectionVerification.jar at below location

/usr/lib/ambari-agent/DBConnectionVerification.jar
/var/lib/ambari-agent/tmp/DBConnectionVerification.jar
/var/lib/ambari-agent/cache/DBConnectionVerification.jar

You can also try to bounce Ambari Server and see if it helps.

Please keep us posted.

Thanks @Sagar Shimpi

Re: ranger installation failed while DB connection checking

Super Guru

@hardik desai - Please check updated answer above ^^

Re: ranger installation failed while DB connection checking

New Contributor

@Kuldeep KulkarniKuldeep

Seems to be a connection pooling issue, Restarted multiple times ambari-agent on the slaves and event the ambari-server and it worked.

I think there needs to be a sequence first ambari-server and then ambari-agent.

Really thanks for pointing it out.

Regards

Re: ranger installation failed while DB connection checking

Contributor

Kuldeep Kulkarni,

Thanks for the info; we have tried doing the same but the issue still persist.

root@server:~# cksum /var/lib/ambari-server/resources/DBConnectionVerification.jar

2699944268 1931 /var/lib/ambari-server/resources/DBConnectionVerification.jar

root@slave1:~# cksum /usr/lib/ambari-agent/DBConnectionVerification.jar

2699944268 1931 /usr/lib/ambari-agent/DBConnectionVerification.jar

Best Regards,

Re: ranger installation failed while DB connection checking

New Contributor
@Kuldeep Kulkarni

We did the things mentioned, but still the error is the same.

Also bounced the ambari-server as well as ambari-agent but things seems to be same.

Regards

Re: ranger installation failed while DB connection checking

Super Guru

@hardik desai / @Harshit Shah

Take backup of below file --> edit it on ranger admin host --> restart ambari-agent and try again

#Backup

cp /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py.bak

#Edit

vi /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py

#Comment below code

# download DBConnectionVerification.jar from ambari-server resources
   try:
     download_file(check_db_connection_url, check_db_connection_path)
   except Exception, e:
     message = "Error downloading DBConnectionVerification.jar from Ambari Server resources. Check network access to " \
               "Ambari Server.\n" + str(e)
     print message
     db_connection_check_structured_output = {"exit_code" : 1, "message": message}
     return db_connection_check_structured_output

#Save and restart ambari agent

Let me know the results.

This is hacky approach and I would not recommend it for Production clusters. We need to investigate what's happening. If you have support subscription, please open a support case with us :)

Don't have an account?
Coming from Hortonworks? Activate your account here