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 Rutuja Joshi <ru...@flurry.com> on 2008/07/04 02:26:04 UTC

Help regarding LoginException - CreateProcess: whoami error=2

Hello,

I am new to Hadoop and am trying to run
HadoopDfsReadWriteExample<http://wiki.apache.org/hadoop/HadoopDfsReadWriteExample?action=fullsearch&value=linkto%3A%22HadoopDfsReadWriteExample%22&context=180>

from eclipse on Windows XP.

I have added following files in the build path for the project:
commons-logging-1.0.4.jar
hadoop-0.16.4-core.jar
log4j-1.2.11.jar

I am receiving following exception while trying to access the file system
corresponding to my configuration files . Note, that HDFS is up and I can
put files on HDFS from cygwin and browse HDFS using the web interface. Can
someone pls help me resolve this issue? I understand that it is not able to
execute whoami, but I do not know how I can execute whoami from eclipse
successfully. Also, pls note that there is no space in my user name.

Thanks in advance for your time,
Rutuja
==================================================================================================
08/07/03 15:40:48 WARN fs.FileSystem: uri=hdfs://localhost:7072
javax.security.auth.login.LoginException: Login failed: CreateProcess:
whoami error=2
    at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:250)
    at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:275)
    at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:257)
    at
org.apache.hadoop.security.UserGroupInformation.login(UserGroupInformation.java:67)
    at
org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1255)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1191)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:150)
    at org.apache.hadoop.fs.FileSystem.getNamed(FileSystem.java:124)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:96)
    at
com.flurry.HDFSManager.HDFSFileReadWrite.main(HDFSFileReadWrite.java:68)
Exception in thread "main" java.io.IOException
    at org.apache.hadoop.dfs.DFSClient.<init>(DFSClient.java:148)
    at
org.apache.hadoop.dfs.DistributedFileSystem.initialize(DistributedFileSystem.java:65)
    at
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1182)
    at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:55)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1193)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:150)
    at org.apache.hadoop.fs.FileSystem.getNamed(FileSystem.java:124)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:96)
    at
com.flurry.HDFSManager.HDFSFileReadWrite.main(HDFSFileReadWrite.java:68)
Caused by: javax.security.auth.login.LoginException: Login failed:
CreateProcess: whoami error=2
    at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:250)
    at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:275)
    at org.apache.hadoop.dfs.DFSClient.<init>(DFSClient.java:146)
    ... 8 more

Re: Help regarding LoginException - CreateProcess: whoami error=2

Posted by Rutuja Joshi <ru...@flurry.com>.
Hello Steve,

Thanks for your reply. You are right, I had cygwin installed but didn't have
cygwin/bin added to the PATH variable. I fixed that and it worked.
Thanks a lot for your response to my query.

Regards,
Rutuja

On Mon, Jul 7, 2008 at 3:42 AM, Steve Loughran <st...@apache.org> wrote:

> Rutuja Joshi wrote:
>
>> Hello,
>>
>> I am new to Hadoop and am trying to run
>> HadoopDfsReadWriteExample<
>> http://wiki.apache.org/hadoop/HadoopDfsReadWriteExample?action=fullsearch&value=linkto%3A%22HadoopDfsReadWriteExample%22&context=180
>> >
>>
>> from eclipse on Windows XP.
>>
>> I have added following files in the build path for the project:
>> commons-logging-1.0.4.jar
>> hadoop-0.16.4-core.jar
>> log4j-1.2.11.jar
>>
>> I am receiving following exception while trying to access the file system
>> corresponding to my configuration files . Note, that HDFS is up and I can
>> put files on HDFS from cygwin and browse HDFS using the web interface. Can
>> someone pls help me resolve this issue? I understand that it is not able
>> to
>> execute whoami, but I do not know how I can execute whoami from eclipse
>> successfully. Also, pls note that there is no space in my user name.
>>
>> Thanks in advance for your time,
>> Rutuja
>>
>> ==================================================================================================
>> 08/07/03 15:40:48 WARN fs.FileSystem: uri=hdfs://localhost:7072
>> javax.security.auth.login.LoginException: Login failed: CreateProcess:
>> whoami error=2
>>
>
>
> that's DOS/Win32 path not found. hadoop is trying to run 'whoami' and
> failing. Do you have Cygwin installed?
>

Re: Help regarding LoginException - CreateProcess: whoami error=2

Posted by Steve Loughran <st...@apache.org>.
Rutuja Joshi wrote:
> Hello,
> 
> I am new to Hadoop and am trying to run
> HadoopDfsReadWriteExample<http://wiki.apache.org/hadoop/HadoopDfsReadWriteExample?action=fullsearch&value=linkto%3A%22HadoopDfsReadWriteExample%22&context=180>
> 
> from eclipse on Windows XP.
> 
> I have added following files in the build path for the project:
> commons-logging-1.0.4.jar
> hadoop-0.16.4-core.jar
> log4j-1.2.11.jar
> 
> I am receiving following exception while trying to access the file system
> corresponding to my configuration files . Note, that HDFS is up and I can
> put files on HDFS from cygwin and browse HDFS using the web interface. Can
> someone pls help me resolve this issue? I understand that it is not able to
> execute whoami, but I do not know how I can execute whoami from eclipse
> successfully. Also, pls note that there is no space in my user name.
> 
> Thanks in advance for your time,
> Rutuja
> ==================================================================================================
> 08/07/03 15:40:48 WARN fs.FileSystem: uri=hdfs://localhost:7072
> javax.security.auth.login.LoginException: Login failed: CreateProcess:
> whoami error=2


that's DOS/Win32 path not found. hadoop is trying to run 'whoami' and 
failing. Do you have Cygwin installed?