复制代码

为懒人提供无限可能,生命不息,code不止

人类感性的情绪,让我们知难行难
我思故我在
日拱一卒,功不唐捐
  • 首页
  • 前端
  • 后台
  • 数据库
  • 运维
  • 资源下载
  • 实用工具
  • 接口文档工具
  • 登录
  • 注册

其它

【原创】hadoop,hbase(自带zookeeper)单节点安装问题汇总

作者: whooyun发表于: 2023-11-02 18:26


问题:
root用户无法启动,则必须单独添加hadoop用户进行应用启动

问题:
hbase shell 命令执行失败
[root@saas-test04_10.1.1.84 /home/webroot/hadoop/hadoop-3.2.4/etc/hadoop]# hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/webroot/hadoop/hadoop-3.2.4/share/hadoop/common/lib/slf4j-reload4j-1.7.35.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/webroot/hbase/hbase-2.4.17/lib/client-facing-thirdparty/slf4j-reload4j-1.7.33.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.Reload4jLoggerFactory]
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.4.17, r7fd096f39b4284da9a71da3ce67c48d259ffa79a, Fri Mar 31 18:10:45 UTC 2023
Took 0.0012 seconds                                                                                                                                                                           
hbase:001:0> status

ERROR: KeeperErrorCode = ConnectionLoss for /hbase/master

For usage try 'help "status"'

Took 33.2679 seconds  

解决方案:
<configuration>
  <!--
    The following properties are set for running HBase as a single process on a
    developer workstation. With this configuration, HBase is running in
    "stand-alone" mode and without a distributed file system. In this mode, and
    without further configuration, HBase and ZooKeeper data are stored on the
    local filesystem, in a path under the value configured for `hbase.tmp.dir`.
    This value is overridden from its default value of `/tmp` because many
    systems clean `/tmp` on a regular basis. Instead, it points to a path within
    this HBase installation directory.

    Running against the `LocalFileSystem`, as opposed to a distributed
    filesystem, runs the risk of data integrity issues and data loss. Normally
    HBase will refuse to run in such an environment. Setting
    `hbase.unsafe.stream.capability.enforce` to `false` overrides this behavior,
    permitting operation. This configuration is for the developer workstation
    only and __should not be used in production!__

    See also https://hbase.apache.org/book.html#standalone_dist
  -->
  <property>
    <name>hbase.cluster.distributed</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>./tmp</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
  
        <property>
                <name>hbase.rootdir</name>
                <value>file:///home/hbase/hbase-tmp</value>
        </property>

</configuration>
可能需要删除log目录,然后重新启动
问题:
hadoop启动失败
Starting namenodes on saas-test04
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
解决方案:
创建ssh公私钥
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
以公钥创建授权key
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
授权
chmod 0600 ~/.ssh/authorized_keys

问题:
hadoop log日志目录无法访问
sudo chmod 777 /opt/module/hadoop-3.3.1/logs