SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
1、问题描述
当我们使用命令启动hadoop时,会报出如下错误:
cd usr/local/hadoop ./sbin/satrt-all.sh
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2、原因
报错提供的网址:http://www.slf4j.org/codes.html#StaticLoggerBinder
所以:只需再绑定一个 slf4j-nop.jar
3、解决方法
3.1 查看已存在slf4j版本
cd /usr/local/hadoop/share/hadoop/common/lib ls
3.2 下载slf4j-nop
下载网址:Central Repository: org/slf4j/slf4j-nop (maven.org)
使用wget命令下载slf4j-nop-1.7.35.jar
:
wget https://repo1.maven.org/maven2/org/slf4j/slf4j-nop/1.7.35/slf4j-nop-1.7.35.jar
4、再次启动hadoop
cd /usr/local/hadoop ./sbin/start-all.sh
BUG已解决!!!