AnsweredAssumed Answered

Hadoop tests fail when running as "normal user" (not root)

Question asked by marek on May 11, 2012
Latest reply on May 11, 2012 by marek
Hi,

Attempts to try to start/run "standard hadoop tests" (hadoop-\*test\*.jar or hadoop-\*-examples.jar) fail with "java.io.File.createTempFile(File.java:1792)" error when running it as a normal (non-root) user. 

I guess the problem is NOT related to ACL/unix permissions for files/folders, since the failure occurs also when NOT specifying any input/output data files/folders; just "starting" the example code will fail...

For example, this example (running as user "marek") fails: 
[marek@mouse ~]$ hadoop jar $HADOOP_INSTALL/hadoop-*-examples.jar 
Exception in thread "main" java.io.IOException: Permission denied 
        at java.io.UnixFileSystem.createFileExclusively(Native Method) 
        at java.io.File.checkAndCreate(File.java:1704) 
        at java.io.File.createTempFile(File.java:1792) 
        at org.apache.hadoop.util.RunJar.main(RunJar.java:146)

Same example started as user "root" is ok: 
[root@mouse ~]# hadoop jar $HADOOP_INSTALL/hadoop-*-examples.jar 
An example program must be given as the first argument. 
Valid program names are: 
...

-------
I believe this problem may be related to MAPREDUCE-3716 bug (https://issues.apache.org/jira/browse/MAPREDUCE-3716) - at least the failure happens when creating temp file (java.io.File.createTempFile). 

So,  
a) Can anybody confirm this problem (or is it "just me")?  I hope somebody had tried to run stuff as non-root user? :) 
b) If indeed this problem is related to MAPREDUCE-3716 bug, it is supposed to be fixed in hadoop 0.32.1; how should I deal with this (do I have to wait for some future MAPR release, or is there "simple" way for me to "fix it myself"?) 

Any advice? Thanks,  
Marek










Outcomes