strace is your friend if you are on Linux. Try the following from the shell in which you are starting hive...
strace -f -e trace=file service hive-server2 start 2>&1 | grep ermission You should see the file it can't read/write. On Mon, Sep 7, 2015 at 8:13 AM, Daniel Haviv < [email protected]> wrote: > Hi, > I'm getting this error when starting HiveServer2: > 2015-09-07 08:09:50,356 WARN org.apache.hive.service.server.HiveServer2: > Error starting HiveServer2 on attempt 1, will retry in 60 seconds > java.lang.RuntimeException: java.lang.RuntimeException: > java.io.IOException: Permission denied > at > org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:472) > at > org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:124) > at org.apache.hive.service.cli.CLIService.init(CLIService.java:111) > at > org.apache.hive.service.CompositeService.init(CompositeService.java:59) > at > org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:92) > at > org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:309) > at > org.apache.hive.service.server.HiveServer2.access$400(HiveServer2.java:68) > at > org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:523) > at > org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:396) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) > at org.apache.hadoop.util.RunJar.run(RunJar.java:221) > at org.apache.hadoop.util.RunJar.main(RunJar.java:136) > Caused by: java.lang.RuntimeException: java.io.IOException: Permission > denied > at > org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:465) > ... 14 more > Caused by: java.io.IOException: Permission denied > at java.io.UnixFileSystem.createFileExclusively(Native Method) > at java.io.File.createTempFile(File.java:2024) > at > org.apache.hadoop.hive.ql.session.SessionState.createTempFile(SessionState.java:740) > at > org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:463) > ... 14 more > > the hive user has write permissions to the scratch dir, is there another > path I should take care of ? > > Thank you. > Daniel >
