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

news/2024/12/1 9:48:24/

 


         今天搭建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

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


        


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

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

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

关注我下一篇不迷路哦!

 


http://www.ppmy.cn/news/1239604.html

相关文章

30天精通Nodejs--第十二天:ioredis

目录 引言ioredis简介快速上手基本用法连接redisStringListSetHash高级用法Sub/Pub 消息通信结语引言 从这篇开始,接下来几篇会主要介绍nodejs的一些常用的中间件,比如redis、mysql、MongoDB和websocket这些技术的中间件。 先从redis入手,ioredis。 写一篇博客介绍nodejs的…

Java入门基础:浅显易懂 if - else

文章目录 前言一、布尔表达式二、if - else三、if语法四、示例五、注意 前言 在开发过程中不管是if语句还是其他语句都会经常用到布尔表达式,所以在学习if之前需要先明白什么是布尔表达式? 一、布尔表达式 布尔表达式只有2种结果:true / fal…

uniapp视频倍速播放插件,uniapp视频试看插件——sunny-video使用文档

sunny-video视频倍速播放器 组件名:sunny-video 效果图 img1img2img3img4 平台差异说明 目前已应用到APP(安卓、iOS)、微信(小程序、H5)其它平台未测试 安装方式 本组件符合easycom规范,HBuilderX 2.5…

几个常用的内网穿透工具

内网穿透是一种技术,用于允许从外部网络访问处于内网(如家庭或办公室网络)中的设备或服务。这通常用于远程桌面访问、服务器管理、物联网设备控制等。以下是几个常用的内网穿透工具及其基本使用方式: Ngrok 介绍:Ngrok…

数据分析基础之《matplotlib(2)—折线图》

一、折线图绘制与保存图片 1、matplotlib.pyplot模块 matplotlib.pyplot包含了一系列类似于matlab的画图函数。它的函数作用于当前图形(figure)的当前坐标系(axes) import matplotlib.pyplot as plt 2、折线图绘制与显示 展示城…

Redis分片备库切换操作

Redis分片备库切换操作 场景描述: 分片集群: 1.ipa:5001-ipa:5002 2.ipb:5001-ipb:5002 需将两个分片备库互置完成灾备 操作步骤 准备工作 主机密码:1qaz!QAZ 获取节点信息命令 /redispath/bin/redis-cli -a password -h ip -p port red…

SELinux零知识学习二十九、SELinux策略语言之类型强制(14)

接前一篇文章:SELinux零知识学习二十八、SELinux策略语言之类型强制(13) 二、SELinux策略语言之类型强制 4. 类型规则 类型规则在创建客体或在运行过程中重新标记时指定其默认类型。在策略语言中定义了两个类型规则: type_transtition在域转换过程中标记行为发生时以及创…

billet-doux

英语从诞生以来就不停地吸收借鉴其他国家、其他文化中的单词,英语中来自本民族的固有词 汇比例很低,且多数为最基本的名词、动词,大部分单词直接或间接来源于法语、拉丁语、希 腊语、意大利语、德语,而其中又以法语所占比例为大…