我想运行hbase。我已经完全安装了hadoop,当我运行 start-all.sh
,它工作正常,并提供以下输出:
hduser@CSLAP106:/usr/local/hadoop/bin$ jps
11956 SecondaryNameNode
12046 JobTracker
12193 TaskTracker
11800 DataNode
11656 NameNode
12254 Jps
但是当我想跑的时候 start-hbase.sh
,它给了我一些拒绝许可的错误,我不明白为什么:
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
在那之后,我试着逃跑 sudo ./start-hbase.sh
,我得到了更奇怪的东西!
root@localhost's password:
我不知道我应该在这里打什么。不管怎样,我只是点击了回车键,它又切换回了 hduser
再一次:
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
需要的文件:
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不运行有什么问题吗!我真的受够了。已经有好几个星期了,我一直在努力,每次都会出现新的错误。我真的很感激你的时间和努力来帮助我:)
2条答案
按热度按时间sczxawaw1#
您说ls-l start-hbase.sh的输出是:
如果您想知道您登录的用户和组,有一个简单的方法:
检查一下user:group ...
问题是脚本的用户所有者和组所有者。。您有两种解决方案:
为了让它成为你的奴隶…具有可执行状态(
sudo chmod +x start-hbase.sh
)然后执行脚本。。。
ssgvzors2#
如果更改start-hbase.sh的权限后仍有问题,请运行以下命令
授予“hbase”目录写入日志文件的权限。。
我希望这能帮助其他人。。。