Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiveserver2 fails to start in current 3.1.3-2.0-SNAPSHOT #20

Closed
PACordonnier opened this issue Nov 13, 2023 · 2 comments
Closed

Hiveserver2 fails to start in current 3.1.3-2.0-SNAPSHOT #20

PACordonnier opened this issue Nov 13, 2023 · 2 comments

Comments

@PACordonnier
Copy link
Member

With current version, Hiveserver2 fails to start and prints this error in /var/log/hiveserver2.err

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1357)
        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1338)
        at org.apache.hadoop.mapred.JobConf.setJar(JobConf.java:518)
        at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:536)
        at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:430)
        at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5141)
        at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5099)
        at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97)
        at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81)
        at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1141)
        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:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:232)

Relates to https://issues.apache.org/jira/browse/HIVE-22915

This issue is caused by having 2 Guava versions in the classpath. Guava has been updated due to Hadoop 3.1.4 update.

Problem can be fixed with

$ rm /opt/tdp/hive/lib/guava-19.0.jar
$ cp /opt/tdp/hadoop/share/hadoop/hdfs/lib/guava-27.0-jre.jar /opt/tdp/hive/lib/

This fix is not appropriate, this guava issue should be fixed in the apache hive build. Maybe exclude hive guava, backport some fix?

@PACordonnier
Copy link
Member Author

Relates to TOSIT-IO/TDP#90

@Pierrotws
Copy link
Collaborator

This error is from hadoop 3.1.4. Reverting to 3.1.1 solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants