最近一个新部署一个网关,用户在执行hbase壳的方式连接hbase,报错
[testuser@ip - 192 - 168 - 133 - 238,自由],美元hbase 壳 SLF4J: Class path  contains multiple SLF4J 绑定。 SLF4J: Found binding 拷贝(jar文件:/usr/地方/hadoop/hbase-1.1.3/lib/kylin-jdbc-1.5.2.jar !/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding 拷贝(jar文件:/usr/地方/hadoop/hbase-1.1.3/lib/kylin-job-1.5.2.jar !/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding 拷贝(jar文件:/usr/地方/hadoop/hbase-1.1.3/lib/slf4j-log4j12-1.7.5.jar !/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding 拷贝(jar文件:/usr/地方/hadoop/hadoop-2.7.1/分享/hadoop/共同/lib/slf4j-log4j12-1.7.10.jar !/org/slf4j/impl/StaticLoggerBinder.class] SLF4J:阅读http://www.slf4j.org/codes.html multiple_bindings for an 解释。 SLF4J: Actual binding  is of type [org.slf4j.impl.Log4jLoggerFactory] NativeException: java.io.IOException: java.lang.reflect.InvocationTargetException initialize 才能;at /usr/地方/hadoop/hbase-release/lib/ruby/hbase/hbase.rb: 42 ,,,,,(根),at /usr/地方/hadoop/hbase-release/bin/hirb.rb: 118
经过百度,解决问题。是由于testuesr对hbase.tmp。dir设置的路径,没有读写权限。添加权限即可。(实际上是我根本就没有创建这个路径。由于是网关,只是利用一下hbase的软件和配置文件作为客户端。也不启动它。自然也就没有想到这些路径还会影响到hbase壳的使用)。
Unable 用start hbase shell due 用java.io.IOException: java.lang.reflect.InvocationTargetException , 症状: When attempting 用execute “hbase shell", as a non-root /, non-hbase 用户,hbase shell fails with 从而following 例外:, (jyoung@jyoung-hdp234-1 ~),美元hbase shell , SLF4J: Class path  contains multiple SLF4J 绑定只, SLF4J: Found binding 拷贝(jar文件:/usr/黄芪丹参滴丸/2.3.4.0-3485/hadoop/lib/slf4j-log4j12-1.7.10.jar !/org/slf4j/impl/StaticLoggerBinder.class),, SLF4J: Found binding 拷贝(jar文件:/usr/黄芪丹参滴丸/2.3.4.0-3485/管理员/lib/slf4j-log4j12-1.6.1.jar !/org/slf4j/impl/StaticLoggerBinder.class),, SLF4J:阅读http://www.slf4j.org/codes.html multiple_bindings for an 解释只, SLF4J: Actual binding  is of type [org.slf4j.impl.Log4jLoggerFactory],, NativeException: java.io.IOException: java.lang.reflect.InvocationTargetException , initialize at /usr/黄芪丹参滴丸/2.3.4.0-3485/hbase/lib/ruby/hbase/hbase.rb: 42岁,, (根),at /usr/黄芪丹参滴丸/2.3.4.0-3485/hbase/bin/hirb.rb: 131,, 原因:ROOT 从而user of  hbase shell  needs read 以及write permissions 提醒,hbase tmp directory configured by 从而hbase.tmp.dir property 拷贝hbase-site.xml又是; 用verify your  hbase tmp  directory configuration 设置:, (root@jyoung-hdp234-1 ~) #, grep -C2 “hbase.tmp.dir",/etc/hbase/conf/hbase-site.xml ,,,& lt; property>, ,,,,,& lt; name> hbase.local.dir, ,,,,,& lt; value> $ {hbase.tmp.dir}/local, ,,,& lt;/property>, ,,,, ,, ,,,, ,,,& lt; property>, ,,,,,& lt; name> hbase.tmp.dir, ,,,,,& lt; value>/tmp/hbase - {user.name} & lt;美元/value>, ,,,& lt;/property>, 解析:, Ensure 从而,users of hbase  shell have read 以及write permissions for hbase.tmp.dir
参考链接:https://community.hortonworks.com/content/supportkb/150642/unable-to-start-hbase-shell-due-to-javaioioexcepti.html