You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Lucas Nazário dos Santos <na...@gmail.com> on 2007/07/24 19:53:30 UTC

Running Hadoop as Windows Service

Hello,

I'm trying to get Hadoop running as Windows service, but strange things
happen,
preventing me from finishing the task. Notice that I can run Hadoop in the
usual
way, using cygwin over Windows XP.

I took the solution of running Hadoop as a service from
https://issues.apache.org/jira/browse/HADOOP-1525. This address contains
a bunch of files, and also some instructions about how to execute them:

Here are my steps:

1) I downloaded all file attachments from
https://issues.apache.org/jira/browse/HADOOP-1525, putting .conf files
inside Hadoop's /conf folder, and .bat files inside the /bin directory of
Hadoop

2) I also changed the value of the property "wrapper.app.parameter.2",
within the
namenode-wrapper.conf file, to "-format", because I want everything to be
formatted
every time I initialize the namenode

3) I downloaded the version 3.2.3 of the Java Service Wrapper (JSW), in it's
binary
form, for windows

4) then I copied the file wrapper.exe from JSW to Hadoop's /bin folder

5) and also copied some files - wrapper.dll and wrapper.jar - from JSW's
/lib folder,
to Hadoop's /lib folder


This step was also covered:

Adding the following line to the wrapper configurations allows df to be found
if Cygwin is installed so that the DataNode service can work:

# Set PATH so that the df command can be found
set.PATH=C:/cygwin/bin;%PATH%


Then I executed the InstallService.bat file (one that I downloaded from the
issue
tracker). And here everything went fine. Three services were created, one
for the
namenode, another for the datanode, and a third one: the secondary namenode.

Here is the problem: when trying to initialize the namenode executing the
file
namenode.bat, I've got the following message:

---------------------------------------------------------------------------------------------------------------------
c:\hadoop-install\hadoop\bin>namenode.bat
wrapper       | --> Wrapper Started as Console
wrapper       | Lauching a JVM...
jvm 1           | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1           |     Copyright 1999-2006 Tanuki Software, Inc. All Rights
Reserved.
jvm 1           |
jvm 1           | Re-format filesystem in \tmp\hadoop-lucas\dfs\name ? (Y or
N)
Y
wrapper       | <-- Wrapper Stopped
---------------------------------------------------------------------------------------------------------------------

This occurs idenpendent of the format step, and prevents me from properly
starting
the namenode.


Any help is appreciate!

Lucas Nazário

Re: Running Hadoop as Windows Service

Posted by Albert Strasheim <fu...@gmail.com>.
Hello

On Tue, 24 Jul 2007, Lucas Naz?rio dos Santos wrote:

> Hello,
> 
> I'm trying to get Hadoop running as Windows service, but strange things
> happen,
> preventing me from finishing the task. Notice that I can run Hadoop in the
> usual
> way, using cygwin over Windows XP.
> 
> I took the solution of running Hadoop as a service from
> https://issues.apache.org/jira/browse/HADOOP-1525. This address contains
> a bunch of files, and also some instructions about how to execute them:

Glad it more or less works for you. :-)

> Here is the problem: when trying to initialize the namenode executing the
> file
> namenode.bat, I've got the following message:
> 
> ---------------------------------------------------------------------------------------------------------------------
> c:\hadoop-install\hadoop\bin>namenode.bat
> wrapper       | --> Wrapper Started as Console
> wrapper       | Lauching a JVM...
> jvm 1           | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
> jvm 1           |     Copyright 1999-2006 Tanuki Software, Inc. All Rights
> Reserved.
> jvm 1           |
> jvm 1           | Re-format filesystem in \tmp\hadoop-lucas\dfs\name ? (Y or
> N)
> Y
> wrapper       | <-- Wrapper Stopped
> ---------------------------------------------------------------------------------------------------------------------
> 
> This occurs idenpendent of the format step, and prevents me from properly
> starting
> the namenode.

I took a quick look at the code, and it seems Hadoop will issue this 
interactive prompt (which is causing service startup to fail) if you 
tell it to format the namenode and the dfs directory already exists. 
There doesn't seem to be a way to force Hadoop to do the format.

You might consider adding an option like this and submitting a patch or 
trying to figure out a way to delete the directory each time before 
starting the service.

Cheers,

Albert