[atguigu@node11 hbase]$ ./bin/start-hbase.sh SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/module/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:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.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] mkdir: 无法创建目录"/usr/local/hbase/bin/../logs": 权限不够 running master, logging to /usr/local/hbase/bin/../logs/hbase-atguigu-master-node11.out /usr/local/hbase/bin/hbase-daemon.sh:行195: /usr/local/hbase/bin/../logs/hbase-atguigu-master-node11.out: 没有那个文件或目录 head: 无法打开"/usr/local/hbase/bin/../logs/hbase-atguigu-master-node11.out" 读取数据: 没有那个文件或目录
时间: 2023-06-26 10:02:26 浏览: 308
这个错误信息显示了多个 SLF4J 绑定的问题,以及一个无法创建目录和找不到日志文件的问题。
针对这些问题,可以尝试以下解决方法:
1. 多个 SLF4J 绑定的问题可以忽略,因为实际绑定的是 Log4jLoggerFactory。
2. 创建目录和日志文件的问题,可能是因为没有写入权限导致的。可以尝试使用 root 用户或者具有写入权限的用户来启动 HBase。
另外,你可以进入 HBase 的 bin 目录下,手动创建 logs 目录,以及在 logs 目录下创建 hbase-atguigu-master-node11.out 文件,然后再次尝试启动 HBase。例如:
```
cd /usr/local/hbase/bin
sudo mkdir ../logs
sudo touch ../logs/hbase-atguigu-master-node11.out
sudo chmod -R 777 ../logs
./start-hbase.sh
```
如果问题仍然存在,请提供更多信息,我会尽力帮助你解决。
相关问题
[atguigu@node11 hbase]$ bin/start-hbase.sh SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/module/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:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.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 /usr/local/hbase/bin/../logs/hbase-atguigu-master-node11.out SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/module/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:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation
这是一个启动HBase的Shell脚本,在启动的过程中出现了SLF4J绑定的问题。具体的错误信息是Class path contains multiple SLF4J bindings,意思是类路径中包含了多个SLF4J绑定。在这个错误信息中,SLF4J发现了两个绑定,一个在/opt/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar中,另一个在/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.jar中。SLF4J提供了一个链接http://www.slf4j.org/codes.html#multiple_bindings来解释这个问题。最后,该错误信息指出实际的绑定类型是org.slf4j.impl.Log4jLoggerFactory。
127.0.0.1: running zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-atguigu-zookeeper-node11.out 127.0.0.1: SLF4J: Class path contains multiple SLF4J bindings. 127.0.0.1: SLF4J: Found binding in [jar:file:/opt/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] 127.0.0.1: SLF4J: Found binding in [jar:file:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] 127.0.0.1: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 127.0.0.1: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] running master, logging to /usr/local/hbase/bin/../logs/hbase-atguigu-master-node11.out SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/module/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:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. : running regionserver, logging to /usr/local/hbase/bin/../logs/hbase-atguigu-regionserver-node11.out怎么办
这段日志提示了多个 SLF4J 绑定的问题,可能会导致日志输出异常。建议按照以下步骤进行处理:
1. 找到项目中引入的 SLF4J 相关的依赖,检查是否存在多个版本的 SLF4J 绑定。
2. 如果存在多个版本的绑定,考虑将其中一个版本的依赖排除掉,或者使用 Maven 或 Gradle 等构建工具的 Dependency Management 功能,将所有依赖的 SLF4J 版本统一。
3. 如果无法解决问题,可以参考 SLF4J 的官方文档,进行进一步的调试和处理。
阅读全文