HBase的不./start-hbase.sh后运行 - 被拒绝的权限? [英] HBase does not run after ./start-hbase.sh - Permission Denied?

查看:9531
本文介绍了HBase的不./start-hbase.sh后运行 - 被拒绝的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想运行HBase的。我已经完全安装Hadoop和当我运行 start-all.sh ,它工作正常,并给了我这样的输出:

I want to run HBase. I have installed hadoop completely and when I run start-all.sh , it works fine and gives me this output:

hduser@CSLAP106:/usr/local/hadoop/bin$ jps
11956 SecondaryNameNode
12046 JobTracker
12193 TaskTracker
11800 DataNode
11656 NameNode
12254 Jps

但是当我要运行 start-hbase.sh ,它给了我否定的许可的一些错误我不明白为什么:

But when I want to run start-hbase.sh , it gives me some errors of permission denied which I do not understand why:

hduser@CSLAP106:/usr/local/hbase/hbase-0.94.6.1/bin$ ./start-hbase.sh
localhost: starting zookeeper, logging to /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-zookeeper-CSLAP106.out

localhost: /usr/local/hbase/hbase-0.94.6.1/bin/hbase-daemon.sh: line 150: /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-zookeeper-CSLAP106.log: Permission denied

localhost: head: cannot open ‘/usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-zookeeper-CSLAP106.out’ for reading: No such file or directory

/usr/local/hbase/hbase-0.94.6.1/bin/hbase-daemon.sh: line 150: /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-master-CSLAP106.log: Permission denied

head: cannot open ‘/usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-master-CSLAP106.out’ for reading: No such file or directory

localhost: starting regionserver, logging to /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-regionserver-CSLAP106.out

localhost: /usr/local/hbase/hbase-0.94.6.1/bin/hbase-daemon.sh: line 150: /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-regionserver-CSLAP106.log: Permission denied

localhost: head: cannot open ‘/usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-hduser-regionserver-CSLAP106.out’ for reading: No such file or directory

在这之后,我试图运行须藤./start-hbase.sh ,我得到了更多的东西很怪!

after that, I tried to run sudo ./start-hbase.sh , and I got something more weird!

root@localhost's password:

我不知道的什么,我应该在这里键入。反正我只是点击输入,它切换回 hduser 又说:

I do not know what I am supposed to type here. anyway I just clicked Enter and it switched back to hduser again:

root@localhost's password: 
root@localhost's password: localhost: Permission denied, please try again.

root@localhost's password: localhost: Permission denied, please try again.

localhost: Permission denied (publickey,password).
starting master, logging to /usr/local/hbase/hbase-0.94.6.1/bin/../logs/hbase-root-  master-CSLAP106.out
root@localhost's password: 
root@localhost's password: localhost: Permission denied, please try again.

root@localhost's password: localhost: Permission denied, please try again.

localhost: Permission denied (publickey,password).
hduser@CSLAP106:/usr/local/hbase/hbase-0.94.6.1/bin$

我把从我的 hbase-env.sh HBase的-site.xml中文件的一些线路的情况下,他们需要:

I put some lines from my hbase-env.sh and hbase-site.xml files in case they are needed:

hbase-env.sh

# File naming hosts on which HRegionServers will run.  $HBASE_HOME/conf/regionservers by    default.
export HBASE_REGIONSERVERS=/usr/local/hbase/hbase-0.94.6.1/conf/regionservers

# File naming hosts on which backup HMaster will run.  $HBASE_HOME/conf/backup-masters by default.
export HBASE_BACKUP_MASTERS=/usr/local/hbase/hbase-0.94.6.1/conf/backup-masters

# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=true

HBase的-site.xml中

<configuration>
<property>
        <name>hbase.rootdir</name>
    <value>hdfs://localhost:54310/hbase</value>
</property>

<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
</property>

那么,你认为什么是错的HBase的,它不跑了!我真是越来越疲惫与此有关。它已经几个星期,我就可以工作,每次都用新的错误出现。我真的AP preciate你的时间和精力来帮助我:)

So, what do you think is wrong with HBase that it does not run! I am really getting exhausted with this. It has been weeks I am working on it and every time it comes up with a new error. I would really appreciate your time and effort to help me :)

推荐答案

你说的ls -l的输出start-hbase.sh是:

you say the output of ls -l start-hbase.sh is :

-rwxr-xr-x 1 root root 1872 huhti 4 2013 start-hbase.sh

如果你想知道什么用户和组你与记录,我们有简单的方法:

if you want to know what user and group you are logging with , there us simple way:

touch test
ls -l test

和检查用户:组...

and check user:group ...

问题是用户的所有者和脚本的组所有者..
有两种解决方法:

the problem is user owner and group owner of script.. you have two solutions:

1) sudo chown hduser:hduser start-hbase.sh  #here hduser is example...you should know what user and group you have,,,

序,使其你的奴隶......具有可执行状态( sudo的搭配chmod + X start-hbase.sh

2) you can be root by: "su root" or "sudo su" or "sudo bash"

,然后执行该脚本...

and then execute the script...

这篇关于HBase的不./start-hbase.sh后运行 - 被拒绝的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆