Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2712 | 04-27-2020 03:48 AM | |
| 5271 | 04-26-2020 06:18 PM | |
| 4440 | 04-26-2020 06:05 PM | |
| 3565 | 04-13-2020 08:53 PM | |
| 5367 | 03-31-2020 02:10 AM |
05-08-2017
05:13 PM
@Theyaa Matti Have you tried the following approach? http://erie1.example.com:8080/api/v1/clusters/ClusterDemo/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name . And also a bit more extended format as following: http://erie1.example.com:8080/api/v1/clusters/ClusterDemo/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name,HostRoles/host_name&minimal_response=false .
... View more
05-08-2017
02:14 PM
@saravanan gopalsamy
Looks like you have not configured the FQDN properly on your ambari host. Please check the /etc/hosts file to verify the hostname is correct and it matches the output of the following command: # hostname -f . Prerequisite of Ambari Installation : (Set the Hostname😞 http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-installation/content/check_dns.html - http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-installation/content/edit_the_host_file.html . Also can you please share the output of the file "/var/log/ambari-sever/ambari-server.out" here so that we can see if there are any additional issues?
... View more
05-08-2017
12:07 PM
@Achu Thambi "NoSuchFieldError" Indicates that you might be using older version of JAR in your client classpath. Because the "" field was added as part of fix: Added in HiveConnection - https://issues.apache.org/jira/browse/HIVE-10037 - https://github.com/apache/hive/commit/3ee63c1402e9efda6afa5a8d52785299a08b9a57 ("HIVE_CLI_SERVICE_PROTOCOL_V8" was added in the "jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java") . - Also from the following JIRA the "TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8" " was introduced in the "TProtocolVersion.java" class from JIRA - https://issues.apache.org/jira/browse/HIVE-12442 -
So please double check your client classpath to find out if older version of jar is being loaded there? .
... View more
05-08-2017
11:19 AM
@Achu Thambi Are you sure that your remove client has no N/W issue? I mean are you able to connect to the zk hosts like following: Example if your connection URL is as following private static String url = "jdbc:hive2://erie3.example.com:2181,erie1.example.com:2181,erie4.example.com:2181,erie2.example.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"; - Then try to do a telnet from the client machine to findout if it is able to connect to the mentioned hosts and ports? # telnet erie1.example.com 2181
# telnet erie2.example.com 2181
# telnet erie3.example.com 2181
# telnet erie4.example.com 2181 . - Also please refer to the simple HiveClient demo that i placed at my Github repo to see if it works and may you can compare it with your client. https://github.com/jaysensharma/MiddlewareMagicDemos/blob/master/HDP_Ambari/Hive/HiveJavaClient/src/main/java/client/HiveClientDemo.java . For quick testing i wrote the following code to validate if DB creation is happening fine or not? package client;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class HiveClientDemo {
private static String commonDriverName = "org.apache.hive.jdbc.HiveDriver";
private static String url = "jdbc:hive2://erie3.example.com:2181,erie1.example.com:2181,erie4.example.com:2181,erie2.example.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2";
private static String userName = "hive";
private static String userPass = "hive";
public static void main(String[] args) throws Exception {
Class.forName(commonDriverName);
Connection con = DriverManager.getConnection(url, userName, userPass);
System.out.println("\n\t Got Connection: " + con);
System.out.println("*** List the existing Databases....");
Statement stmt = con.createStatement();
String sql = "show databases";
System.out.println("Executing Query: " + sql);
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
System.out.println(rs.getString(1));
}
sql = "create database Test12345DB";
System.out.println("Executing Query: " + sql);
stmt.execute(sql);
System.out.println("*** After Creating a new Database....");
sql = "show databases";
System.out.println("Executing Query: " + sql);
rs = stmt.executeQuery(sql);
while (rs.next()) {
System.out.println(rs.getString(1));
}
}
} - I got the following output that shows the newly created Database is showing up properly. Got Connection: org.apache.hive.jdbc.HiveConnection@65e3690
*** List the existing Databases....
Executing Query: show databases
abcd
default
movielens
myretail
test
test1
test3
testdb
testdb_a
testdb_c
Executing Query: create database Test12345DB
*** After Creating a new Database....
Executing Query: show databases
abcd
default
movielens
myretail
test
test1
test12345db
test3
testdb
testdb_a . Please compare the above code with yours and let us know if you see any difference. - Still if it fails to connect Or fails to create a database then please share the complete stack trace of the error/exception that you receive at the client side. .
... View more
05-08-2017
03:12 AM
@frank chen
If this resolves your issue then please click on the "Accept" button and
lark this thread as Answered. So that will be useful for other users as
well.
... View more
05-08-2017
02:54 AM
1 Kudo
@frank chen In the "/usr/hdp/2.6.0.3-8//hadoop-hdfs/bin/hdfs.distro" file the line 38 & 39 are as following:
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
Looks like you have some environment variable issue whcih is setting incorrect HADOOP environment variable to point to an incorrect directory. Can you please check where the "/root/hadoop-2.7.3" is being set at your end? In an ideal HDP environment that path does not exist. .
... View more
05-07-2017
08:29 AM
@ed day As you mentioned that " you decided to wipe out HDP and Ambari and start again. I deleted everything
(or so I thought!), and I got to the point of logging into Ambari in
order to add hosts,... and it shows my old cluster as before"
I guess that might be happening if your ambari DB is not reset. Are you sure that you have executed the "ambari-server reset" and then "ambari-server setup" again to make sure that the information's stored inside the ambari DB is cleaned properly. (It is recommended to take ambari DB dump before making and DB related changes). Steps :
# echo "Take ambari DB dump ... and then perform the following steps."
# ambari-server reset
# ambari-server setup
# ambari-server start .
... View more
05-05-2017
03:39 PM
@Nhan Nguyen In HDP2.6 Ambari2.5 i can reproduce the issue. Looks like the issue is from Hive Side: https://issues.apache.org/jira/browse/HIVE-15927 Example: [root@sandbox hive-next-view]# su - hive
[hive@sandbox ~]$ beeline
Beeline version 1.2.1000.2.6.0.3-8 by Apache Hive
beeline> !connect jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Connecting to jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Enter username for jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: hive
Enter password for jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: ****
Connected to: Apache Hive (version 1.2.1000.2.6.0.3-8)
Driver: Hive JDBC (version 1.2.1000.2.6.0.3-8)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://sandbox.hortonworks.com:2181/> SELECT * FROM customerinfo;
+-----------------------+--+
| customerinfo.address |
+-----------------------+--+
| Env�gen |
+-----------------------+--+
1 row selected (0.255 seconds)
.
... View more
05-05-2017
12:58 PM
@Nhan Nguyen Which version of ambari are you using? Some older version of ambari (prior to Ambari 2.4) has some issue with multibyte characters that till cause such issues: https://issues.apache.org/jira/browse/AMBARI-16713
... View more
05-05-2017
09:40 AM
@frank chen
If this resolves your issue then please click on the "Accept" button and lark this thread as Answered. So that will be useful for other users as well.
... View more