Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12341 Overhaul logging; log4j2, machine-readable, etc.
  3. HBASE-19587

[sfl4j] " Class path contains multiple SLF4J binding" complaint

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.0.0
    • None
    • None
    • None

    Description

      I get the below staring a cluster in distribute mode.

      $ ./hbase/bin/start-hbase.sh --config ~/conf_hbase
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/home/stack/hbase-2.0.0-beta-1-SNAPSHOT/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/stack/hadoop-2.8.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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]
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/home/stack/hbase-2.0.0-beta-1-SNAPSHOT/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/stack/hadoop-2.8.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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]

      I can make it go away if I do the following in hbase-env.sh:

      export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true

      ...which disables including hadoop jars on our classpath, a facility that came in years ago w/ this commit.

      tree b7e93ae4c62f22e5d4ce221cafaaee293c7b67ce
      parent d1619bceb3142f3ab8c134365e18a150fbd5b9bf
      author Enis Soztutar <enis@apache.org> Fri Feb 27 16:27:40 2015 -0800
      committer Enis Soztutar <enis@apache.org> Fri Feb 27 16:27:40 2015 -0800

      HBASE-13120 Allow disabling hadoop classpath and native library lookup (Siddharth Wagle)

      Adding hadoop to our CLASSPATH seems to be around for years:

      tree eb5ee09ac9894d264f1a2d1653f5f5eb6684f2fb
      parent d2fb2d5e2494834947799c5f4fbd72955e7fdba1
      author Michael Stack <stack@apache.org> Sat Mar 3 16:47:55 2012 +0000
      committer Michael Stack <stack@apache.org> Sat Mar 3 16:47:55 2012 +0000

      HBASE-5286 bin/hbase's logic of adding Hadoop jar files to the classpath is fragile when presented with split packaged Hadoop 0.23 installation

      Attachments

        Activity

          People

            Unassigned Unassigned
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: