Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22044

No way to start HiveServer2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Not A Bug
    • Affects Version/s: 2.3.5
    • Fix Version/s: None
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      Download apache-hive-2.3.5-bin.tar.gz

      Extract and start

      $ hive --service hiveserver2
      java.lang.NoClassDefFoundError: org/eclipse/jetty/http/PreEncodedHttpField
      at org.apache.hive.http.HttpServer.<init>(HttpServer.java:98) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.http.HttpServer.<init>(HttpServer.java:80) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.http.HttpServer$Builder.build(HttpServer.java:133) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:227) ~[hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:607) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:100) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:855) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:724) [hive-service-2.3.5.jar:2.3.5]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
      at org.apache.hadoop.util.RunJar.run(RunJar.java:244) [hadoop-common-2.9.2.jar:?]
      at org.apache.hadoop.util.RunJar.main(RunJar.java:158) [hadoop-common-2.9.2.jar:?]
      Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.PreEncodedHttpField
      at
      java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_211]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_211]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]

       
      This class first introduced for Jetty 9.3.
      https://github.com/apache/hive/blob/rel/release-2.3.5/common/pom.xml
      jetty-all
      https://github.com/apache/hive/blob/rel/release-2.3.5/pom.xml
      <jetty.version>7.6.0.v20120127</jetty.version>
       
      No other version of Jetty mentioned.
      However lib directory contains:
      jetty-6.1.26.jar
      jetty-all-7.6.0.v20120127.jar
      jetty-client-9.2.5.v20141112.jar
      jetty-continuation-9.2.5.v20141112.jar
      jetty-http-9.2.5.v20141112.jar
      jetty-io-9.2.5.v20141112.jar
      jetty-proxy-9.2.5.v20141112.jar
      jetty-security-9.2.5.v20141112.jar
      jetty-server-9.2.5.v20141112.jar
      jetty-servlet-9.2.5.v20141112.jar
      jetty-servlets-9.2.5.v20141112.jar
      jetty-sslengine-6.1.26.jar
      jetty-util-6.1.26.jar
      jetty-util-9.2.5.v20141112.jar
       
      After all not related jars were removed
      It started to fail with
      java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpField
      at org.apache.hive.http.HttpServer.<init>(HttpServer.java:98) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.http.HttpServer.<init>(HttpServer.java:80) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.http.HttpServer$Builder.build(HttpServer.java:133) ~[hive-common-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:227) ~[hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:607) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:100) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:855) [hive-service-2.3.5.jar:2.3.5]
      at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:724) [hive-service-2.3.5.jar:2.3.5]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
      at org.apache.hadoop.util.RunJar.run(RunJar.java:244) [hadoop-common-2.9.2.jar:?]
      at org.apache.hadoop.util.RunJar.main(RunJar.java:158) [hadoop-common-2.9.2.jar:?]
      Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpField
      at
      java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_211]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_211]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]

       
      However, neither HttpServer nor org.eclipse.jetty.server.Server (nor its parents) use the class org/eclipse/jetty/http/HttpField.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Ivan Kostyuk Ivan Kostyuk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: