Support Questions

Find answers, ask questions, and share your expertise

Error while running hive script from oozie workflow

avatar
Expert Contributor

I got the below error while running the oozie workflow....

ID : 0000004-140214173424343-oozie-oozi-W@hive-node
------------------------------------------------------------------------------------------------------------------------------------
Console URL       : -
Error Code        : JA020
Error Message     : JA020: Could not load credentials of type [hcat] with name [hive_credentials]]; perhaps it was not defined in oozie-site.xml?
External ID       : -
External Status   : ERROR
Name              : hive-node
Retries           : 0
Tracker URI       : -
Type              : hive
Started           : 2014-02-14 22:49 GMT
Status            : ERROR
Ended             : 2014-02-14 22:49 GMT
------------------------------------------------------------------------------------------------------------------------------------

Does anyone have an idea about th eissue ? am I missing something ?

Thanks

Em Jay
1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hey, 

 

Couple of things:

 

1.  This section is not necessary, it doesn't hurt anything, but you don't need it:

 

<configuration>

<property>
<name>oozie.hive.defaults</name>
<value>/user/someuser/hive-default.xml</value>
</property>
</configuration>

 

2.  What version of CDH are you using?

 

3.  Are you using CM?

 

It really looks like you still don't have the credentials configured in the oozie-site.xml.  If you are using CM, that might be why, can you chec, the instructions below and configure the oozie-site.xml for credentials?

 

 

 

 

For the Oozie configuration:


1.  If using CM, add an Oozie proxy to the core-site.xml for the Hive metastore server:

- Go to, "HDFS Service->Configuration->Service-Wide->Advanced-> Cluster-wide Configuration Safety Valve for core-site.xml"

2. Add: 

<property> 

<name>hadoop.proxyuser.oozie.hosts</name> 

<value>*</value> 

</property> 

<property> 

<name>hadoop.proxyuser.oozie.groups</name> 

<value>*</value> 

</property> 


3. Restart the Hive metastore server.


4. Add the HCat credentials class to oozie-site.xml.

Edit the file and add:

<property> 

<name>oozie.credentials.credentialclasses</name> 

<value>hcat=org.apache.oozie.action.hadoop.HCatCredentials</value> 

</property> 

5. In addition, If using CM, go to "Oozie service->Configuration->Oozie Server(default)->Advanced-> Oozie Server Configuration Safety Valve for oozie-site.xml"

6. Add:
 
<property> 

<name>oozie.credentials.credentialclasses</name> 

<value>hcat=org.apache.oozie.action.hadoop.HCatCredentials</value> 

</property> 

7.  Restart Oozie. 

 

View solution in original post

10 REPLIES 10

avatar
New Contributor

Hey

 

In Step 4 are we editing the file /opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p0.30/etc/oozie/conf.dist/oozie-site.xml manually?

 

We are using CM.

 

I see changes in CM but not in the oozie-site.xml  or on Oozie admin UI .

 

Getting error 

 

[JA020: Could not load credentials of type [hbase] with name [hbase_credentials]]; perhaps it was not defined in oozie-site.xml?]

 

Thanks