Ambari: A big pitfall about Ranger-the port is always 3306 and needs to be modified manually.

Source: Internet
Author: User

Ambari: A big pitfall about Ranger ----The port is always 3306

This pitfall was discovered when I set up the ambari environment. I did not find the cause. I asked my colleagues for help, followed the clues and testing step by step, and finally solved the problem. However, I also revealed it.Ambari's pitfalls!!!!

When installing ranger in ambari, you need to connect to the database. I chose the MySQL database. In this case, you need to enter the database root user name and password, because you need to connect the root user to create new users and databases.

The problem is here.

The database is not on the Cluster machine. On another server, we all know that the port number of the database in the production environment is not set to 3306.

The IP address and port (not 3306) of the database have been configured when the ranger component is added, but its configuration does not take effect at this time, because you find that when you configure relevant parameters and install and start Ranger,

Ranger admin cannot be started, and a connection refused error is reported !!!!

The other redundant information is the same. In this case, the error is hard to find, and the command that reported the error is taken to the server for execution. The returned information is the same.

At first, it was thought that the number of connections to the database reached the top, the connection time was not long enough, or the root user did not have the remote connection permission.

Finally, add a port behind the IP address to execute the command on the server to find that the remote MySQL database can be successfully connected !!!!!! Xi Da Pu Ben !!!!!!!!

This proves that the database does not have any problems, so the problem arises. That is to say, in my Ranger configuration,The port number does not take effect !!!!!!!!!!!!!!

What should we do,Find the problem section in the script in the error message and manually add the port number,Restart Ranger admin.

Success !!!!!!!!!!!!!! Ranger admin started successfully


Remember, if your MySQL database port number is not 3306, you will encounter this problem under normal circumstances. If you have any questions, @ me at any time,

Alas, I need to take notes to remind myself of my memory for a day. In case I forget it, I will be stuck on it next time. I feel bad about my mind, and I am often not online.


Here we will add another question, that is, when ambari enables Kerberos,You need to install the krb server and client on the server in advance,So you must pay attention to it at this time,The krb version must be 19 or later,Otherwise, during authentication and startup after adding components, you will report a bunch of questions about failed permissions. Then you go to Baidu and find that the answers are the same and the problem cannot be solved, in fact, the version of krb is incorrect. The lessons of blood !!!!


Finally, let's say,When installing Ranger,Most likely, your ranger conf file is red (too many levels of symbolic links) and cannot be opened,Because your soft connection method is incorrect,

The conf values under/etc/Ranger/admin and/usr/HDP/current/Ranger-Admin are both red. Execute ll and delete the conf values in both locations,

Connect/etc/Ranger-admin/ to/usr/HDP/current/Ranger-admin/CONF,

Then, enter/usr/HDP/current/Ranger-admin, and connect the conf file to/etc/Ranger/admin,You can try again and start the installation !!!!!!!!!!

Ambari: A big pitfall about Ranger-the port is always 3306 and needs to be modified manually.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.