You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Joe Crobak (Commented) (JIRA)" <ji...@apache.org> on 2012/02/02 15:37:54 UTC

[jira] [Commented] (HADOOP-8005) Multiple SLF4J binding message in .out file for all daemons

    [ https://issues.apache.org/jira/browse/HADOOP-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198839#comment-13198839 ] 

Joe Crobak commented on HADOOP-8005:
------------------------------------

So I tried changing slf4j-log4j12 to "provided" in hadoop-common, but this didn't fix the problem. It turns out that the startup scripts add all of the libs in both the hdfs and mapred dirs to the classpath for all daemons, so it appeared on the classpath, twice.

It seems like the best solution, for the startup scripts, at least, is to exclude the jars from hdfs/mapred and then just keep the jar in hadoop-common. This is contrary to the best-practices for slf4j when your jar is a "library" jar though -- in which case an adapter shouldn't be included.

Thoughts?
                
> Multiple SLF4J binding message in .out file for all daemons
> -----------------------------------------------------------
>
>                 Key: HADOOP-8005
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8005
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 0.23.0
>            Reporter: Joe Crobak
>
> When I start the NameNode or DataNode using sbin/hadoop-daemon.sh, I get a variant of the following error on stdout:
> {noformat}
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/Users/joecrow/Code/hadoop-0.23.0/share/hadoop/common/lib/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/joecrow/Code/hadoop-0.23.0/share/hadoop/hdfs/lib/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira