4. Resolving General Problems

 4.1. Problem: Hive developers may encounter an exception error message during Hive Service Check

MySQL is the default database used by the Hive metastore. Depending on several factors, such as the version and configuration of MySQL, a Hive developer may see an exception message similar to the following one:

An exception was thrown while adding/validating classes) : Specified key was too long; max key length is 767 bytes 

 4.1.1. Solution

Administrators can resolve this issue by altering the Hive metastore database to use the Latin1 character set, as shown in the following example:

mysql> ALTER DATABASE {metastore_database_name} character set latin1;

 4.2. Problem: API calls for PUT, POST, DELETE respond with a "400 - Bad Request"

Removing a registered host not added to a cluster. curl command and REST API calls require a header element.

 4.2.1. Solution

Starting with Ambari 1.4.2, you must include the "X-Requested-By" header with the REST API calls.

For example, if using curl, include the -H "X-Requested-By: ambari" option.

curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://{ambari-host}:8080/api/v1/hosts/host1

 4.3. Problem: Enabling NameNode HA wizard fails on the "Initialize JournalNode" step.

After upgrading to Ambari 1.6.1 and attempting to enable NameNode HA in a HDP 2.x Stack-based cluster, the HA wizard fails to complete with an error during the "Initialize JournalNode" step. This failure situation can also occur if your cluster was created using a Blueprint.

 4.3.1. Solution

Using the Ambari REST API, you need to create JournalNode and ZKFC service components. This API can also be called prior to launching the NameNode HA wizard to avoid the wizard failing.

curl --user admin:admin -H  "X-Requested-By: ambari" -i -X POST -d '{"components":[{"ServiceComponentInfo":{"component_name":"JOURNALNODE"}},{"ServiceComponentInfo":{"component_name":"ZKFC"}}]}' 
http://ambari.server:8080/api/v1/clusters/c1/services?ServiceInfo/service_name=HDFS 

Replace ambari.server and c1 with your Ambari Server hostname and cluster name respectively.


loading table of contents...