Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9305

[fiware-stackoverflow] Fiware Cosmos Hive Authorization Issue

    Details

      Description

      Created question in FIWARE Q/A platform on 20-08-2015 at 15:08
      Please, ANSWER this question AT https://stackoverflow.com/questions/32120317/fiware-cosmos-hive-authorization-issue

      Question:
      Fiware Cosmos Hive Authorization Issue

      Description:
      I'm using a shared instance of Fiware Cosmos (meaning I don't have root privileges). I have until today successfully acessed and managed tables in hive both remotely using jdbc, and Hive CLI.
      But now I'm getting this error when starting Hive CLI:

      log4j:ERROR Could not instantiate class [org.apache.hadoop.hive.shims.HiveEventCounter].
      java.lang.RuntimeException: Could not load shims in class org.apache.hadoop.log.metrics.EventCounter
      at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:123)
      at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)
      at org.apache.hadoop.hive.shims.ShimLoader.getEventCounter(ShimLoader.java:98)
      at org.apache.hadoop.hive.shims.HiveEventCounter.<init>(HiveEventCounter.java:34)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:357)
      at java.lang.Class.newInstance(Class.java:310)
      at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:330)
      at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:121)
      at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:664)
      at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
      at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
      at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:354)
      at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
      at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
      at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:641)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:171)
      at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)
      ... 27 more
      log4j:ERROR Could not instantiate appender named "EventCounter".

      Logging initialized using configuration in jar:file:/usr/local/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties

      I can however perform select and create in the Hive CLI.
      If I then try to access Hive remotely, I get this:

      Connecting to jdbc:hive://x.x.x.x:10000/default?user=user&password=XXXXXXXXXX
      Could not establish connection: java.net.ConnectException: Connection refused

      I didn't do any changes in code or commands before the errors appeared, and after googling around I haven't found any working solutions.

      If anyone can guide me to where the problem is, or how to find it, or even better how to solve it, I'd be grateful.

      Thanks in advance!

        Activity

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        fla Fernando Lopez made changes -
        HD-Enabler Cosmos [ 10872 ]
        Description
        Created question in FIWARE Q/A platform on 20-08-2015 at 15:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/32120317/fiware-cosmos-hive-authorization-issue


        +Question:+
        Fiware Cosmos Hive Authorization Issue

        +Description:+
        I'm using a shared instance of Fiware Cosmos (meaning I don't have root privileges). I have until today successfully acessed and managed tables in hive both remotely using jdbc, and Hive CLI.
        But now I'm getting this error when starting Hive CLI:

        log4j:ERROR Could not instantiate class [org.apache.hadoop.hive.shims.HiveEventCounter].
        java.lang.RuntimeException: Could not load shims in class org.apache.hadoop.log.metrics.EventCounter
            at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:123)
            at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)
            at org.apache.hadoop.hive.shims.ShimLoader.getEventCounter(ShimLoader.java:98)
            at org.apache.hadoop.hive.shims.HiveEventCounter.&lt;init&gt;(HiveEventCounter.java:34)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at java.lang.Class.newInstance0(Class.java:357)
            at java.lang.Class.newInstance(Class.java:310)
            at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:330)
            at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:121)
            at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:664)
            at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
            at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
            at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:354)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
            at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:641)
            at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
        Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:171)
            at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)
            ... 27 more
        log4j:ERROR Could not instantiate appender named "EventCounter".

        Logging initialized using configuration in jar:file:/usr/local/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties


        I can however perform select and create in the Hive CLI.
        If I then try to access Hive remotely, I get this:

        Connecting to jdbc:hive://x.x.x.x:10000/default?user=user&amp;password=XXXXXXXXXX
        Could not establish connection: java.net.ConnectException: Connection refused


        I didn't do any changes in code or commands before the errors appeared, and after googling around I haven't found any working solutions.

        If anyone can guide me to where the problem is, or how to find it, or even better how to solve it, I'd be grateful.

        Thanks in advance!
        Created question in FIWARE Q/A platform on 20-08-2015 at 15:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/32120317/fiware-cosmos-hive-authorization-issue


        +Question:+
        Fiware Cosmos Hive Authorization Issue

        +Description:+
        I'm using a shared instance of Fiware Cosmos (meaning I don't have root privileges). I have until today successfully acessed and managed tables in hive both remotely using jdbc, and Hive CLI.
        But now I'm getting this error when starting Hive CLI:

        log4j:ERROR Could not instantiate class [org.apache.hadoop.hive.shims.HiveEventCounter].
        java.lang.RuntimeException: Could not load shims in class org.apache.hadoop.log.metrics.EventCounter
            at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:123)
            at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)
            at org.apache.hadoop.hive.shims.ShimLoader.getEventCounter(ShimLoader.java:98)
            at org.apache.hadoop.hive.shims.HiveEventCounter.&lt;init&gt;(HiveEventCounter.java:34)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at java.lang.Class.newInstance0(Class.java:357)
            at java.lang.Class.newInstance(Class.java:310)
            at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:330)
            at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:121)
            at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:664)
            at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
            at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
            at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:354)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
            at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
            at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:641)
            at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
        Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:171)
            at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)
            ... 27 more
        log4j:ERROR Could not instantiate appender named "EventCounter".

        Logging initialized using configuration in jar:file:/usr/local/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties


        I can however perform select and create in the Hive CLI.
        If I then try to access Hive remotely, I get this:

        Connecting to jdbc:hive://x.x.x.x:10000/default?user=user&amp;password=XXXXXXXXXX
        Could not establish connection: java.net.ConnectException: Connection refused


        I didn't do any changes in code or commands before the errors appeared, and after googling around I haven't found any working solutions.

        If anyone can guide me to where the problem is, or how to find it, or even better how to solve it, I'd be grateful.

        Thanks in advance!
        HD-Chapter Data [ 10838 ]
        fla Fernando Lopez made changes -
        Assignee Backlog Manager [ backlogmanager ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            backlogmanager Backlog Manager
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: