Skip to content
Advertisement

HBase does not run after ./start-hbase.sh – Permission Denied?

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

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

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

root@localhost's password:

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$

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>

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 🙂

Advertisement

Answer

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,,,

inorder to make it your slave…with executable state(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…

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement