您的位置:首页 > 其它

Oozie-Error: E0501: User: oozie is not allowed to impersonate root [ Edited ]

2017-07-18 11:37 471 查看
 有错误找官网:http://community.cloudera.com/t5/Batch-Processing-and-Workflow/Oozie-Error-E0501-User-oozie-is-not-allowed-to-impersonate-root/m-p/4823/highlight/true

I manually installed a single-node cluster according to the cloudera instructions and this oozie example worked fine. But now I am manually installing a three-node cluster, and running the Oozie example (http://archive.cloudera.com/cdh4/cdh/4/oozie/DG_Examples.html) does
not work.

 

I did everything according to the instructions:

 

Create the Oozie DB:

 
CREATE DATABASE oozie;
GRANT ALL PRIVILEGES ON  oozie.* TO 'oozie'@'localhost' IDENTIFIED BY 'oozie';
GRANT ALL PRIVILEGES ON oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';
exit;


 

Edit the oozie-site.xml file:

 
<property>
<name>oozie.service.JPAService.jdbc.driver</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.url</name>
<value>jdbc:mysql://MY-VM-ALIAS:3306/oozie</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.username</name>
<value>oozie</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.password</name>
<value>oozie</value>
</property>


 

(where MY-VM-ALIAS is in the /etc/hosts file as usual)

 

Put the MySQL Connector in /var/lib/oozie

 

Run the DB Creation tool successfully:

 
sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -run


 

Install the ShareLib via:

 
sudo -u hdfs hadoop fs -mkdir  /user/oozie
sudo -u hdfs hadoop fs -chown oozie:oozie /user/oozie
mkdir /tmp/ooziesharelib
cd /tmp/ooziesharelib
tar xzf /usr/lib/oozie/oozie-sharelib.tar.gz
sudo -u oozie hadoop fs -put share /user/oozie/share


 

Start the oozie server

 

Download and unzip the tar file on the Master Node with the Oozie server.

 

Verify that JobTracker is on port 8021 (by mapred-site.xml) and that NameNode is on port 8020 (by core-site.xml) as listed in the examples/apps/map-reduce/job.properties file:

 
nameNode=hdfs://MY-VM-ALIAS:8020
jobTracker=MY-VM-ALIAS:8021
queueName=default
examplesRoot=examples

oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/map-reduce
outputDir=map-reduce


 

Put the examples directory into HDFS.

 

Export OOZIE_URL

 

Issue this command to run the example:

 
oozie job -config examples/apps/map-reduce/job.properties -run


The first time I received the following error:

 
Error: E0501 : E0501: Could not perform authorization operation, Call From MY-VM-ALIAS/xxx.xx.xx.xxx to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused


I did a telnet localhost 8020 and a telnet localhost 8021 and both failed. However, a telnet MY-VM-ALIAS 8020 and a MY-VM-ALIAS 8021 worked fine.

 

So I edited the examples/apps/map-reduce/job.properties file and replaced localhost with MY-VM-ALIAS:

 
nameNode=hdfs://MY-VM-ALIAS:8020
jobTracker=MY-VM-ALIAS:8021
queueName=default
examplesRoot=examples

oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/map-reduce
outputDir=map-reduce


 

And issuing the command to run the example:

 
oozie job -config examples/apps/map-reduce/job.properties -run


 produces the following error:

 
Error: E0501 : E0501: Could not perform authorization operation, User: oozie is not allowed to impersonate root


 If I issue:

 
sudo -u oozie oozie job -config examples/apps/map-reduce/job.properties -oozie "http://MY-VM-ALIAS:11000/oozie" -run


 I receive the following error:

 
Error: E0501 : E0501: Could not perform authorization operation, User: oozie is not allowed to impersonate oozie


 Google suggested I add this to my core-site.xml file:

 
<property>
<name>hadoop.proxyuser.oozie.hosts</name>
<value>*</value>
</property>

<property>
<name>hadoop.proxyuser.oozie.groups</name>
<value>*</value>
</property>


 Which didn't accomplish anything
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐