PritamM
PritamM

Reputation: 1

multiple SLF4J bindings in Hive - Hortonworks sandbox

While running Hive query in Hortonworks sandbox (HDP2.3 Pig and Hive Rev6), I am getting this warning. And nothing is happening after this. Hive table is also not getting created. What to do?

[root@sandbox Lab7.1]# hive -f wh_visits.hive SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/spark/lib/spark-assembly-1.4.1.2.3.2.0-2950-hadoop2.7.1.2.3.2.0-2950.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] WARNING: Use "yarn jar" to launch YARN applications. SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/spark/lib/spark-assembly-1.4.1.2.3.2.0-2950-hadoop2.7.1.2.3.2.0-2950.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Logging initialized using configuration in file: /etc/hive/2.3.2.0-2950/0/hive-log4j.properties

Upvotes: 0

Views: 2031

Answers (1)

P Chandrashekhar
P Chandrashekhar

Reputation: 1

I faced the same issue and fixed it by doing below:

There are two jar files with the same name but in different path. In my case it was 'slf4j-log4j12-1.7.25.jar'. Just rename one of them and then retry your thing. This fixed my problem.

[hadoop@hadoopsrvr01 ~]$ ls -lrt /opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar
-rw-r--r--. 1 hadoop hadoop 12244 Sep 10  2019 /opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar
[hadoop@hadoopsrvr01 ~]$ ls -lrt /opt/HBase/lib/slf4j-log4j12-1.7.25.jar
-rw-r--r--. 1 hadoop hadoop 12244 Oct  5  2019 /opt/HBase/lib/slf4j-log4j12-1.7.25.jar
[hadoop@hadoopsrvr01 ~]$

[hadoop@hadoopsrvr01 ~]$ mv /opt/HBase/lib/slf4j-log4j12-1.7.25.jar /opt/HBase/lib/slf4j-log4j12-1.7.25.jar.15072020
[hadoop@hadoopsrvr01 ~]$ ls -lrt /opt/HBase/lib/slf4j-log4j12-1.7.25.jar*
-rw-r--r--. 1 hadoop hadoop 12244 Oct  5  2019 /opt/HBase/lib/slf4j-log4j12-1.7.25.jar.15072020
[hadoop@hadoopsrvr01 ~]$

Upvotes: 0

Related Questions