Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-4213

Permission issues when starting CDAP SDK in restricted folders on Windows machines

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 4.1.1
    • Component/s: CDAP
    • Labels:
    • Release Notes:
      Removed the requirement of being an admin to run the CDAP startup script for Windows.
    • Rank:
      1|hzz2xb:

      Description

      When you extract the CDAP SDK to a directory like C:\...\cdap-sdk on a windows machine, CDAP fails to start with the exception below:

      Exception in thread "Hive14ExploreService STARTING" java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: C:/.../cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      	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 co.cask.cdap.explore.service.hive.BaseHiveExploreService.startUp(BaseHiveExploreService.java:276)
      	at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.RuntimeException: The root scratch dir: C:/.../cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      	at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:557)
      	at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:506)
      	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:458)
      	... 5 more
      Exception in thread "ExploreExecutorService STARTING" com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: C:/Softwares/cdap1/cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      	at com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1015)
      	at com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1001)
      	at com.google.common.util.concurrent.AbstractService.startAndWait(AbstractService.java:220)
      	at com.google.common.util.concurrent.AbstractIdleService.startAndWait(AbstractIdleService.java:106)
      	at co.cask.cdap.explore.executor.ExploreExecutorService.startUp(ExploreExecutorService.java:91)
      	at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: C:/.../cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      	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 co.cask.cdap.explore.service.hive.BaseHiveExploreService.startUp(BaseHiveExploreService.java:276)
      	... 2 more
      Caused by: java.lang.RuntimeException: The root scratch dir: C:/.../cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      	at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:557)
      	at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:506)
      	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:458)
      	... 5 more
      Failed to start Standalone CDAP. com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: C:/Softwares/cdap1/cdap-sdk-3.2.0/data/explore/tmp on HDFS should be writable. Current permissions are: rw-rw-rw-
      2015-11-07 20:34:21,238 - ERROR [main:c.c.c.StandaloneMain@275] - Failed to start Standalone CDAP
      

      The above stack trace is for the explore tmp directory but the same problem can occur for the data/tmp directory as well. The issue does not go away even when CDAP is run as an administrative super user on Windows.

      There are a couple of issues here:
      1. The error says that the directory should be writable, when the permissions are rw-rw-rw. It may be that executable permissions are missing.
      2. The exception message says HDFS, when CDAP is running in an SDK.

        Attachments

          Activity

            People

            • Assignee:
              gokul Gokul Gunasekaran
              Reporter:
              bhooshan Bhooshan Mogal
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: