Quantcast

HBase on Windows 7: Master not running error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

HBase on Windows 7: Master not running error

Tacit
This post was updated on .
Hi all,

I've been trying to get HBase (version 0.94.4) working on my system with Windows 7 for several days now to no avail. I've followed the instructions at http://hbase.apache.org/cygwin.html and tried to get to the bottom of the problem myself, but it looks like now I'm stuck. The weird thing is also that after installing HBase the first time I can use it without problems, but after stopping HBase and trying to run it again I get the following error when I try executing commands in the HBase shell:

ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times

I've uploaded the master, regionserver and zookeeper error logs that are generated as well. I'd appreciate it if someone could spare a few moments and help me out.

hbase-koen-ncim-master-koen-ncim.log
hbase-koen-ncim-regionserver-koen-ncim.log
hbase-koen-ncim-zookeeper-koen-ncim.log

Thanks in advance,

Tacit
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HBase on Windows 7: Master not running error

Nicolas Liochon
Hi,

From the logs, it seems you trying to use the non distributed mode:
WARN org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine: Not
starting a distinct region server because hbase.cluster.distributed is false

If it's the case, you don't have to launch a separate zookeeper & region
server. See this: http://hbase.apache.org/book.html#standalone_dist and
this http://hbase.apache.org/book.html#quickstart

May be as well that the previous instance didn't stop properly, or you're
going on a wrong zookeeper:
INFO org.apache.hadoop.hbase.master.ActiveMasterManager: Another master is
the active master, 10.100.0.101,51424,1359964957325; waiting to become the
next active master

So it's worth looking at the processes running on the machine as well.

Nicolas


On Mon, Feb 4, 2013 at 9:52 AM, Tacit <[hidden email]> wrote:

> Hi all,
>
> I've been trying to get HBase (version 0.94.4) working on my system with
> Windows 7 for several days now to no avail. I've followed the instructions
> at http://hbase.apache.org/cygwin.html and tried to get to the bottom of
> the
> problem myself, but it looks like now I'm stuck. The weird thing is also
> that after installing HBase the first time I can use it without problems,
> but after stopping HBase and trying to run it again I get the following
> error when I try executing commands in the HBase shell:
>
> ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times
>
> I've uploaded the master, regionserver and zookeeper error logs that are
> generated as well. I'd appreciate it if someone could spare a few moments
> and help me out.
>
> hbase-koen-ncim-master-koen-ncim.log
> <
> http://apache-hbase.679495.n3.nabble.com/file/n4037881/hbase-koen-ncim-master-koen-ncim.log
> >
> hbase-koen-ncim-regionserver-koen-ncim.log
> <
> http://apache-hbase.679495.n3.nabble.com/file/n4037881/hbase-koen-ncim-regionserver-koen-ncim.log
> >
> hbase-koen-ncim-zookeeper-koen-ncim.log
> <
> http://apache-hbase.679495.n3.nabble.com/file/n4037881/hbase-koen-ncim-zookeeper-koen-ncim.log
> >
>
> Thanks in advance,
>
> Tacit
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HBase-on-Windows-7-Master-not-running-error-tp4037881.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HBase on Windows 7: Master not running error

Tacit
I've been trying the things suggested under quickstart, but to no avail so far. One question before getting into more detail: the quickstart section doesn't mention a hbase-default.xml file in the /conf directory in HBase, only the hbase-site.xml file. The installation instructions I followed earlier, however, do involve the hbase-default.xml file.

When trying to get HBase running as a standalone as detailed in the quickstart section, should the hbase-default.xml file be there (and configured according to http://hbase.apache.org/cygwin.html) in the /conf directory of HBase? Or should only the hbase-site.xml file be there, adjusted according to the quickstart section?

Maybe it's a stupid question, but I'd like to get that cleared up so I have a better idea of what to do. I've tried running HBase both with and without the hbase-default.xml configuration file present in /conf after following the instructions under the quickstart section. Those 2 cases generate different errors and I'm not sure which case to look at.

In either case, using process explorer to look at the processes yields the same result. Starting HBase with start-hbase.sh temporarily generates a bunch of processes, of which 2 bash.exe processes (each with a child java.exe process) remain. From the process information, one bash process is a zookeeper instance and the other a master instance. After about a minute or two, the bash.exe process associated with the master seems to remove/kill itself. Trying to run commands in the hbase shell then yields the same MasterNotRunningException.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HBase on Windows 7: Master not running error

Nicolas Liochon
Well, first you need to decide on what you want to do (i.e; distributed or
not) and acts accordingly.
I would recommend trying with not distributed when you start. This means
you have a single process to launch.

not distributed is the default, so if it can't find the configuration files
it will be not distributed.
When you launch HBase as "not distributed", ZooKeeper and the regions
servers are launched as threads, not processes (I don't have a windows box
to try, but I doubt it's different).

For hbase-default & hbase-site, they are both read when HBase starts,
hbase-site values erase the one from hbase-default if they both exists.
It may be safer to use only hbase-site, and overwrite the values mentionned
in the cygwin page.

I don't understand why you have a separate zookeeper process. Script code
is quite simple for this:

if [ "$distMode" == 'false' ]
then
  "$bin"/hbase-daemon.sh $commandToRun master
else
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" $commandToRun
zookeeper
  "$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $commandToRun master
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" \
    --hosts "${HBASE_REGIONSERVERS}" $commandToRun regionserver
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" \
    --hosts "${HBASE_BACKUP_MASTERS}" $commandToRun master-backup
fi

So I would recommend to look at this first.









On Mon, Feb 4, 2013 at 12:20 PM, Tacit <[hidden email]> wrote:

> I've been trying the things suggested under quickstart, but to no avail so
> far. One question before getting into more detail: the quickstart section
> doesn't mention a hbase-default.xml file in the /conf directory in HBase,
> only the hbase-site.xml file. The installation instructions I followed
> earlier, however, do involve the hbase-default.xml file.
>
> When trying to get HBase running as a standalone as detailed in the
> quickstart section, should the hbase-default.xml file be there (and
> configured according to http://hbase.apache.org/cygwin.html) in the /conf
> directory of HBase? Or should only the hbase-site.xml file be there,
> adjusted according to the quickstart section?
>
> Maybe it's a stupid question, but I'd like to get that cleared up so I have
> a better idea of what to do. I've tried running HBase both with and without
> the hbase-default.xml configuration file present in /conf after following
> the instructions under the quickstart section. Those 2 cases generate
> different errors and I'm not sure which case to look at.
>
> In either case, using process explorer to look at the processes yields the
> same result. Starting HBase with start-hbase.sh temporarily generates a
> bunch of processes, of which 2 bash.exe processes (each with a child
> java.exe process) remain. From the process information, one bash process is
> a zookeeper instance and the other a master instance. After about a minute
> or two, the bash.exe process associated with the master seems to
> remove/kill
> itself. Trying to run commands in the hbase shell then yields the same
> MasterNotRunningException.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HBase-on-Windows-7-Master-not-running-error-tp4037881p4037883.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HBase on Windows 7: Master not running error

Tacit
It works now, partially. Starting the master with hbase-daemon.sh, then starting the hbase shell allows me to succesfully run commands in the hbase shell now. Although now it gets stuck when I try to disable the test table I created, but that's a different issue.

As for the seperate Zookeeper process, I don't know how it got there either. I just followed the instructions on the cygwin page for HBase and doing start-hbase.sh generates the Zookeeper process after that.

Nicolas Liochon wrote
Well, first you need to decide on what you want to do (i.e; distributed or
not) and acts accordingly.
I would recommend trying with not distributed when you start. This means
you have a single process to launch.

not distributed is the default, so if it can't find the configuration files
it will be not distributed.
When you launch HBase as "not distributed", ZooKeeper and the regions
servers are launched as threads, not processes (I don't have a windows box
to try, but I doubt it's different).

For hbase-default & hbase-site, they are both read when HBase starts,
hbase-site values erase the one from hbase-default if they both exists.
It may be safer to use only hbase-site, and overwrite the values mentionned
in the cygwin page.

I don't understand why you have a separate zookeeper process. Script code
is quite simple for this:

if [ "$distMode" == 'false' ]
then
  "$bin"/hbase-daemon.sh $commandToRun master
else
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" $commandToRun
zookeeper
  "$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $commandToRun master
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" \
    --hosts "${HBASE_REGIONSERVERS}" $commandToRun regionserver
  "$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" \
    --hosts "${HBASE_BACKUP_MASTERS}" $commandToRun master-backup
fi

So I would recommend to look at this first.









On Mon, Feb 4, 2013 at 12:20 PM, Tacit <[hidden email]> wrote:

> I've been trying the things suggested under quickstart, but to no avail so
> far. One question before getting into more detail: the quickstart section
> doesn't mention a hbase-default.xml file in the /conf directory in HBase,
> only the hbase-site.xml file. The installation instructions I followed
> earlier, however, do involve the hbase-default.xml file.
>
> When trying to get HBase running as a standalone as detailed in the
> quickstart section, should the hbase-default.xml file be there (and
> configured according to http://hbase.apache.org/cygwin.html) in the /conf
> directory of HBase? Or should only the hbase-site.xml file be there,
> adjusted according to the quickstart section?
>
> Maybe it's a stupid question, but I'd like to get that cleared up so I have
> a better idea of what to do. I've tried running HBase both with and without
> the hbase-default.xml configuration file present in /conf after following
> the instructions under the quickstart section. Those 2 cases generate
> different errors and I'm not sure which case to look at.
>
> In either case, using process explorer to look at the processes yields the
> same result. Starting HBase with start-hbase.sh temporarily generates a
> bunch of processes, of which 2 bash.exe processes (each with a child
> java.exe process) remain. From the process information, one bash process is
> a zookeeper instance and the other a master instance. After about a minute
> or two, the bash.exe process associated with the master seems to
> remove/kill
> itself. Trying to run commands in the hbase shell then yields the same
> MasterNotRunningException.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HBase-on-Windows-7-Master-not-running-error-tp4037881p4037883.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Loading...