关于提示SLF4J: Class path contains multiple SLF4J bindings的问题解决


今天搭建hbase的时候启动hbase的时候shell面板输入了一大堆日志,如下:

stopping hbase.....................
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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]

[atguigu@hadoop102 software]$ start-hbase.sh

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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]

running master, logging to /opt/software/hbase/logs/hbase-atguigu-master-hadoop102.out

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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]

192.168.10.102: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop102.out

hadoop104: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out.4" 的文件状态(stat): 没有那个文件或目录

192.168.10.104: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out.3" 的文件状态(stat): 没有那个文件或目录

192.168.10.104: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out.2" 的文件状态(stat): 没有那个文件或目录

192.168.10.104: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out.1" 的文件状态(stat): 没有那个文件或目录

hadoop104: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out

192.168.10.104: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out

192.168.10.104: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop104.out" 的文件状态(stat): 没有那个文件或目录

hadoop102: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop102.out

192.168.10.103: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out.4" 的文件状态(stat): 没有那个文件或目录

192.168.10.103: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out.3" 的文件状态(stat): 没有那个文件或目录

192.168.10.103: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out.2" 的文件状态(stat): 没有那个文件或目录

192.168.10.103: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out.1" 的文件状态(stat): 没有那个文件或目录

hadoop103: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out

192.168.10.103: running regionserver, logging to /opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out

192.168.10.103: mv: 无法获取"/opt/software/hbase/logs/hbase-atguigu-regionserver-hadoop103.out" 的文件状态(stat): 没有那个文件或目录

192.168.10.104: SLF4J: Class path contains multiple SLF4J bindings.

192.168.10.104: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.104: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.104: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

192.168.10.104: SLF4J: Class path contains multiple SLF4J bindings.

192.168.10.104: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.104: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.104: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

192.168.10.104: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

192.168.10.104: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hadoop104: SLF4J: Class path contains multiple SLF4J bindings.

hadoop104: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop104: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop104: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

hadoop104: SLF4J: Class path contains multiple SLF4J bindings.

hadoop104: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop104: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop104: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

hadoop104: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hadoop104: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

192.168.10.103: SLF4J: Class path contains multiple SLF4J bindings.

192.168.10.103: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.103: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.103: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

192.168.10.103: SLF4J: Class path contains multiple SLF4J bindings.

192.168.10.103: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.103: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.10.103: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

192.168.10.103: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

192.168.10.103: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hadoop103: SLF4J: Class path contains multiple SLF4J bindings.

hadoop103: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop103: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop103: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

hadoop103: SLF4J: Class path contains multiple SLF4J bindings.

hadoop103: SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop103: SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

hadoop103: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

hadoop103: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hadoop103: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

划重点:SLF4J: Class path contains multiple SLF4J bindings( 类路径包含多个绑定的意思)

SLF4J: Found binding in [jar:file:/opt/software/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/software/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

这上面输入了三台节点hadoop的slf4j-log4j12-1.7.25.jar 的jar包和hbase的slf4j-log4j12-1.7.25.jar 的jar包版本都一样所以不是兼容性问题,所以是类路径包含多个SLF4J绑定。

解决方法:

在hbase的hbase-env.sh文件中进行修改(如果有这一行的话就把注释去掉,是其配置生效)或者增加(如果没有这一行配置,就增加到文件中)。

HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true 

修改完成之后,重启hbase

现在就简单清爽的很快了!当然非强迫患者,这个也可以不修改,不过对以后日志输出增加巨大的冗余。



感谢各位的观看,创作不易,能不能给哥们来一个点赞呢!!!

好了,今天的分享就这么多了,有什么不清楚或者我写错的地方,请多多指教!

私信,评论我呗!!!!!!

关注我下一篇不迷路哦!

相关推荐
青云交4 分钟前
大数据新视界 -- 大数据大厂之 Impala 性能优化:跨数据中心环境下的挑战与对策(上)(27 / 30)
大数据·性能优化·impala·案例分析·代码示例·跨数据中心·挑战对策
计算机毕设指导69 分钟前
基于 SpringBoot 的作业管理系统【附源码】
java·vue.js·spring boot·后端·mysql·spring·intellij-idea
Gu Gu Study11 分钟前
枚举与lambda表达式,枚举实现单例模式为什么是安全的,lambda表达式与函数式接口的小九九~
java·开发语言
Chris _data13 分钟前
二叉树oj题解析
java·数据结构
牙牙70519 分钟前
Centos7安装Jenkins脚本一键部署
java·servlet·jenkins
paopaokaka_luck27 分钟前
[371]基于springboot的高校实习管理系统
java·spring boot·后端
以后不吃煲仔饭39 分钟前
Java基础夯实——2.7 线程上下文切换
java·开发语言
soso196840 分钟前
DataWorks快速入门
大数据·数据仓库·信息可视化
进阶的架构师40 分钟前
2024年Java面试题及答案整理(1000+面试题附答案解析)
java·开发语言
The_Ticker1 小时前
CFD平台如何接入实时行情源
java·大数据·数据库·人工智能·算法·区块链·软件工程