SLF4J: Hbase和Flume的slf4j-log4j12-x.x.xx.jar与hadoop的slf4j-log4j12
【摘要】 SLF4J: Hbase和Flume的slf4j-log4j12-x.x.xx.jar与hadoop的slf4j-log4j12-x.x.xx.jar冲突
SLF4J: Hbase和Flume的slf4j-log4j12-x.x.xx.jar与hadoop的slf4j-log4j12-x.x.xx.jar冲突
一、实验环境
- Ubuntu16.04
- Flume1.7.0
- Hbase1.1.5
- Hadoop2.7.1
二、报错信息
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/flume-1.7.0/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.1/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hbase-1.1.5/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
log4j:WARN No appenders could be found for logger (org.apache.flume.node.PollingPropertiesFileConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
三、报错分析及解决方案
Hbase和Flume的slf4j-log4j12-x.x.xx.jar与hadoop的slf4j-log4j12-x.x.xx.jar冲突(版本不一致)
查询
并「删掉」
或者「修改」
命名,如下图:
重新开启Flume客户端监听
bin/flume-ng agent --conf conf/ --name a1 --conf-file job/flume-netcat-logger.conf -Dflume.root.logger = INFO,console
监听启动不成功:
log4j:WARN No appenders could be found for logger (org.apache.flume.node.PollingPropertiesFileConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
注意
bin/flume-ng agent --conf conf/ --name a1 --conf-file job/flume-netcat-logger.conf -Dflume.root.logger=INFO,console
-Dflume.root.logger=INFO,console 的等号两边不能有空格
结束!
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)