Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2825 | 04-27-2020 03:48 AM | |
| 5484 | 04-26-2020 06:18 PM | |
| 4668 | 04-26-2020 06:05 PM | |
| 3705 | 04-13-2020 08:53 PM | |
| 5607 | 03-31-2020 02:10 AM |
09-20-2019
03:37 PM
@rvillanueva After making the changes inside the Correct "pg_hba.conf" file have you restarted the Postgres Database? # /etc/init.d/postgresql restart
(OR)
# systemctl start postgresql Also what is your Postgres Version like (10.5 / 10.2 / 9.6) ? SupportMatrix: https://supportmatrix.hortonworks.com/ Based on the Postgres Version the "pg_hba.conf" location might be slightly different like: /var/lib/pgsql/9.6/data/pg_hba.conf
/var/lib/pgsql/data/pg_hba.conf
..etc So please make sure that the changes you are making in the "pg_hba.conf" is actually the correct file.
... View more
09-18-2019
05:59 AM
1 Kudo
@ThanhP Good to know that the issue is resolved. If your question is answered then, Please make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.
... View more
09-15-2019
06:33 AM
@ThanhP The following error indicates that Ambari is not able to connect to the MySQL DB instance. Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Most possible cause might be either there is some network issue of your MySQL might not be running properly (running with errors). We might need to review Mysql side log as well. Checks from AmbariServer Host side So can you please check if you have entered correct DB url in ambari.properties? Can you please share the following output? # grep 'jdbc' /etc/ambari-server/conf/ambari.properties In the output of the above command we shoudl be able to see the MySQL DB details like user/URl/driver ..etc Can you please try running the following simple JDBC connectivity check from Ambari DB host to the MySQL instance? # /usr/jdk64/jdk1.8.0_112/bin/java -cp /var/lib/ambari-server/resources/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://xxxxxxxxx/ambari" "ambariDBUser" "ambariDBPassword" com.mysql.jdbc.Driver You will need to change the 'ambariDBUser'/ 'ambariDBPassword' and DB url based on the ambari.properties entries. Also from the ambari server host can you please check if the MySQL host&port is accessible without any issue? This is to isolate if the MySQL host & port is accessible from Ambari server host? # telnet $MYSQL_HOSTNAME 3306
(OR)
# nc -v $MYSQL_HOSTNAME 3306 Checks from MySQL DB side Please try to restart MySQL DB once. Check if the MySQL is listening to the correct port ? (default port is 3306) # ps -ef | grep mysql
# netstat -tnlpa | grep 3306
# netstat -tnlpa | grep `cat /var/run/mysqld/mysqld.pid` For any errors on Mysql side we can check the MySQL log like '# less /var/log/mysqld.log'
... View more
09-10-2019
06:25 PM
@moritz I see in your "ambari.properties" there are no JDBC settings appeared because looks like you are mixing the custom driver setup arguments along with the JDBC DB setup arguments in a single setup commands. Thats the reason the JDBC settings are not getting persisted. Please try the following sequence of setup. Step-1). Setup the JDBC DB settings. After this step you should see that your ambari.properties file has the JDBC entries in it. # ambari-server setup --java-home /usr/lib/jvm/java-1.8.0-openjdk/jre --enable-lzo-under-gpl-license --database=postgres --databasehost=localhost --databaseport=5432 --databasename=ambari --databaseusername=ambari --postgresschema=ambari --databasepassword=ambari -s Step-2). Now Setup the Custom Postgres JDBC Driver of your own choice using the following command. However, usually ambari ships a Postgres Driver here "/usr/lib/ambari-server/postgresql-*" # ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar Step-3). Now run the following command to verify the JDBC settings are reflected properly or not? Example: # grep 'jdbc' /etc/ambari-server/conf/ambari.properties
custom.postgres.jdbc.name=postgresql-jdbc.jar
server.jdbc.connection-pool=internal
server.jdbc.database=postgres
server.jdbc.database_name=ambari
server.jdbc.driver=org.postgresql.Driver
server.jdbc.hostname=localhost
server.jdbc.port=5432
server.jdbc.postgres.schema=ambari
server.jdbc.rca.driver=org.postgresql.Driver
server.jdbc.rca.url=jdbc:postgresql://localhost:5432/ambari
server.jdbc.rca.user.name=ambari
server.jdbc.rca.user.passwd=/etc/ambari-server/conf/password.dat
server.jdbc.url=jdbc:postgresql://localhost:5432/ambari
server.jdbc.user.name=ambari
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat .
... View more
09-09-2019
07:43 PM
2 Kudos
@moritz By running the following command , you are telling Ambari to use an Existing Postgres DB instance in this case ambari will expect you to create the Db user and setup the DB schema on your own inside the PostgresDB (ambari will not do it for you). # sudo ambari-server setup --java-home /usr/lib/jvm/java-1.8.0-openjdk/jre --enable-lzo-under-gpl-license --database=postgres --databasehost=localhost --databaseport=5432 --databasename=ambari --postgresschema=ambari --databaseusername=ambari --databasepassword=ambari --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar Using existing Postgres DB instance for Ambari DB means we will need to make sure that After running the above "setup" command and before running the "start" command you already have performed the following task on your Postgres Database explicitly. https://docs.cloudera.com/HDPDocuments/Ambari-2.7.3.0/administering-ambari/content/amb_using_ambari_with_postgresql.html Are you sure that before starting Ambari DB you had performed the instructions mentioned in the above link? If you want Ambari to setup the PostgresDB (create DB user/ create various tables ..etc) for you then you may want to run the setup command without specifying the Postgres DB details so that ambari will think that it has to setup the Postgres DB for you in the Localhost with default settings like. default ambari DB username will be "ambari" default Postgres Db password will. be "bigdata" ...etc # sudo ambari-server setup --java-home /usr/lib/jvm/java-1.8.0-openjdk/jre --enable-lzo-under-gpl-license -s .
... View more
09-05-2019
03:18 AM
@ranger Even if you have build ranger from source... before making the API call you should validate the following: Are you really sure that the credentials that you are entering is correct? 1. Are you able to login to Ranger UI with that credential? (this is the verify if your credentials are correct or not) ? 2. Do you see "Bad Credentials" message inside the "xa_portal.log" ? Can you share the log?
... View more
09-05-2019
02:49 AM
@Manoj690 You might want to look at this thread: https://community.cloudera.com/t5/Support-Questions/Configuring-hive-users-in-admin-role/m-p/236802
... View more
09-05-2019
02:31 AM
@ranger As we see "Authentication Failed" hence most possible cause may be the incorrect ranger admin credentials supplied to the curl command. 1. Are you sure that you are able to Login to Ranger UI using Web Browser with the same credentials Username: "rangeradmin" Password: "rangeradmin"? http://$RANGER_HOSTNAME:6080 If not then please check what is the Username& Password you have entered here Ambari UI --> Ranger --> Configs --> Advanced --> "Advanced ranger-env" --> "Ranger Admin username" AND "Ranger Admin user's password" 2. Please tail the "xa_portal.log" log and see if you are getting any of the following message when you are attempting to login to Ranger UI using the same credentials? Or while making the API call? # tail -f /var/log/ranger/admin/xa_portal.log
# grep 'Login Unsuccessful' /var/log/ranger/admin/xa_portal.log
# grep 'Authentication with' /var/log/ranger/admin/xa_portal.log
# grep 'Bad Credentials' /var/log/ranger/admin/xa_portal.log .
... View more
09-04-2019
11:42 PM
@Manoj690 The terminal where you are trying to run the query . can you switch to "hive" user? # su - hive
... View more
09-04-2019
11:38 PM
2 Kudos
@Manoj690 We see the error as ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException Permission denied: user=root, access=EXECUTE, inode="/warehouse/tablespace/managed/hive":hive:hadoop:drwx------ Here we see that 'user=root' which means you might be running the query as "root" user. Who does not have permission to write in the mentioned HDFS directory "/warehouse/tablespace/managed/hive" . So better to run the same query as "hive" user and then check the results.
... View more