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 Lev Givon <le...@columbia.edu> on 2008/06/23 22:29:26 UTC

login error while running hadoop on MacOSX 10.5.*

I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
MacOSX 10.5.3 system with software managed by Fink installed in /sw. I
configured hadoop to use the stock Java 1.5.0_13 installation in
/Library/Java/Home. When I attempted to run a simple map/reduce job
off of the dfs after starting up the daemons, the job failed with the
following Java error (501 is the ID of the user used to start the
hadoop daemons and run the map/reduce job):

javax.security.auth.login.LoginException: Login failed:
/sw/bin/whoami: cannot find name for user ID 501

What might be causing this to occur? Manually running /sw/bin/whoami
as the user in question returns the corresponding username.

							L.G.


Re: login error while running hadoop on MacOSX 10.5.*

Posted by Lev Givon <le...@columbia.edu>.
Received from Stefan Groschupf on Mon, Jun 23, 2008 at 05:47:46PM EDT:
> Sorry I'm not a unix expert, however the problem is clearly related
> to whoami since this throws an error.  I run hadoop in all kind of
> configuration super smooth on my os x boxes.  Maybe rename or move
> /sw/whoami for a test.  

It seems that the problem involves the path of the Fink-installed
binary rather than its actual contents; consider the following
evidence.

Since /sw/bin/whoami is actually a link to the binary
/sw/lib/coreutils/bin/whoami, I tried replacing /sw/bin/whoami with a
bash script that invokes /usr/bin/whoami instead and saves the results
of running /usr/bin/id in a file. Not only did the same error I
mentioned earlier occur when I attempted to run a hadoop job, but the
saved output of /usr/bin/id contained

uid=501 gid=501
groups=501,98(_lpadmin),81(_appserveradm),79(_appserverusr),80(admin),101

rather than what I obtain when I run /usr/bin/id from the terminal:

uid=501(lev) gid=501(lev)
groups=501(lev),98(_lpadmin),81(_appserveradm),79(_appserverusr),80(admin),101(com.apple.access_ssh)

This indicates that the getuid() system call performed by id (and
whoami) can't obtain my username mapping from MacOSX's directory
service (the other user names such as _lpadmin are stored in
/etc/passwd and hence do not require the directory service to be
successfully mapped). The implication is that Java is preventing the
system call from succeeding when it is invoked by an executable in
/sw/bin (regardless of what that executable actually does). I have no
idea whether this apparent security constraint can be reconfigured,
though.

> Also make sure you restart the os x console since changes in
> .bash_profile are only picked up if you "relogin" into the command
> line.  Sorry that is all I know and could guess.. :(

Thanks all the same. 

							L.G.

Re: login error while running hadoop on MacOSX 10.5.*

Posted by Stefan Groschupf <sg...@101tec.com>.
Sorry I'm not a unix expert, however the problem is clearly related to  
whoami since this throws an error.
I run hadoop in all kind of configuration super smooth on my os x boxes.
Maybe rename or move /sw/whoami for a test.
Also make sure you restart the os x console since changes  
in .bash_profile are only picked up if you "relogin" into the command  
line.
Sorry that is all I know and could guess.. :(

On Jun 23, 2008, at 10:56 PM, Lev Givon wrote:

> Yes; I have my PATH configured to list /sw/bin before
> /usr/bin. Curiously, hadoop tries to invoke /sw/bin/whoami even when I
> set PATH to
>
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/ 
> bin:/usr/local/bin
>
> before starting the daemons and attempting to run the job.
>
>       	       	    	       	       	       	      L.G.
>
> Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:49:23PM EDT:
>> The fink part and /sw confuses me.  When I do a which on my os x I
>> get: $ which whoami /usr/bin/whoami Are you using the same whoami on
>> your console as hadoop?
>>
>> On Jun 23, 2008, at 10:37 PM, Lev Givon wrote:
>>
>>> Both the daemons and the job were started using the same user.
>>>
>>>    	 	     	     	  	  	    L.G.
>>>
>>> Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:34:54PM  
>>> EDT:
>>>> Which user runs the hadoop? It should be the same you trigger the  
>>>> job
>>>> with.
>>>>
>>>> On Jun 23, 2008, at 10:29 PM, Lev Givon wrote:
>>>>
>>>>> I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
>>>>> MacOSX 10.5.3 system with software managed by Fink installed in / 
>>>>> sw. I
>>>>> configured hadoop to use the stock Java 1.5.0_13 installation in
>>>>> /Library/Java/Home. When I attempted to run a simple map/reduce  
>>>>> job
>>>>> off of the dfs after starting up the daemons, the job failed  
>>>>> with the
>>>>> following Java error (501 is the ID of the user used to start the
>>>>> hadoop daemons and run the map/reduce job):
>>>>>
>>>>> javax.security.auth.login.LoginException: Login failed:
>>>>> /sw/bin/whoami: cannot find name for user ID 501
>>>>>
>>>>> What might be causing this to occur? Manually running /sw/bin/ 
>>>>> whoami
>>>>> as the user in question returns the corresponding username.
>>>>>
>>>>> 							L.G.
>>>>>
>>>>>
>>>>
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> 101tec Inc.
>>>> Menlo Park, California, USA
>>>> http://www.101tec.com
>>>>
>>>>
>>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 101tec Inc.
>> Menlo Park, California, USA
>> http://www.101tec.com
>>
>>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101tec Inc.
Menlo Park, California, USA
http://www.101tec.com



Re: login error while running hadoop on MacOSX 10.5.*

Posted by Lev Givon <le...@columbia.edu>.
Yes; I have my PATH configured to list /sw/bin before
/usr/bin. Curiously, hadoop tries to invoke /sw/bin/whoami even when I
set PATH to 

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/bin

before starting the daemons and attempting to run the job.

       	       	    	       	       	       	      L.G.

Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:49:23PM EDT:
> The fink part and /sw confuses me.  When I do a which on my os x I
> get: $ which whoami /usr/bin/whoami Are you using the same whoami on
> your console as hadoop?
>
> On Jun 23, 2008, at 10:37 PM, Lev Givon wrote:
>
>> Both the daemons and the job were started using the same user.
>>
>>     	 	     	     	  	  	    L.G.
>>
>> Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:34:54PM EDT:
>>> Which user runs the hadoop? It should be the same you trigger the job 
>>> with.
>>>
>>> On Jun 23, 2008, at 10:29 PM, Lev Givon wrote:
>>>
>>>> I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
>>>> MacOSX 10.5.3 system with software managed by Fink installed in /sw. I
>>>> configured hadoop to use the stock Java 1.5.0_13 installation in
>>>> /Library/Java/Home. When I attempted to run a simple map/reduce job
>>>> off of the dfs after starting up the daemons, the job failed with the
>>>> following Java error (501 is the ID of the user used to start the
>>>> hadoop daemons and run the map/reduce job):
>>>>
>>>> javax.security.auth.login.LoginException: Login failed:
>>>> /sw/bin/whoami: cannot find name for user ID 501
>>>>
>>>> What might be causing this to occur? Manually running /sw/bin/whoami
>>>> as the user in question returns the corresponding username.
>>>>
>>>> 							L.G.
>>>>
>>>>
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> 101tec Inc.
>>> Menlo Park, California, USA
>>> http://www.101tec.com
>>>
>>>
>>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 101tec Inc.
> Menlo Park, California, USA
> http://www.101tec.com
>
>

Re: login error while running hadoop on MacOSX 10.5.*

Posted by Stefan Groschupf <sg...@101tec.com>.
The fink part and /sw confuses me.
When I do a which on my os x I get:
$ which whoami
/usr/bin/whoami
Are you using the same whoami on your console as hadoop?

On Jun 23, 2008, at 10:37 PM, Lev Givon wrote:

> Both the daemons and the job were started using the same user.
>
>     	 	     	     	  	  	    L.G.
>
> Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:34:54PM EDT:
>> Which user runs the hadoop? It should be the same you trigger the  
>> job with.
>>
>> On Jun 23, 2008, at 10:29 PM, Lev Givon wrote:
>>
>>> I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
>>> MacOSX 10.5.3 system with software managed by Fink installed in / 
>>> sw. I
>>> configured hadoop to use the stock Java 1.5.0_13 installation in
>>> /Library/Java/Home. When I attempted to run a simple map/reduce job
>>> off of the dfs after starting up the daemons, the job failed with  
>>> the
>>> following Java error (501 is the ID of the user used to start the
>>> hadoop daemons and run the map/reduce job):
>>>
>>> javax.security.auth.login.LoginException: Login failed:
>>> /sw/bin/whoami: cannot find name for user ID 501
>>>
>>> What might be causing this to occur? Manually running /sw/bin/whoami
>>> as the user in question returns the corresponding username.
>>>
>>> 							L.G.
>>>
>>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 101tec Inc.
>> Menlo Park, California, USA
>> http://www.101tec.com
>>
>>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101tec Inc.
Menlo Park, California, USA
http://www.101tec.com



Re: login error while running hadoop on MacOSX 10.5.*

Posted by Lev Givon <le...@columbia.edu>.
Both the daemons and the job were started using the same user.

     	 	     	     	  	  	    L.G.

Received from Stefan Groschupf on Mon, Jun 23, 2008 at 04:34:54PM EDT:
> Which user runs the hadoop? It should be the same you trigger the job with.
>
> On Jun 23, 2008, at 10:29 PM, Lev Givon wrote:
>
>> I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
>> MacOSX 10.5.3 system with software managed by Fink installed in /sw. I
>> configured hadoop to use the stock Java 1.5.0_13 installation in
>> /Library/Java/Home. When I attempted to run a simple map/reduce job
>> off of the dfs after starting up the daemons, the job failed with the
>> following Java error (501 is the ID of the user used to start the
>> hadoop daemons and run the map/reduce job):
>>
>> javax.security.auth.login.LoginException: Login failed:
>> /sw/bin/whoami: cannot find name for user ID 501
>>
>> What might be causing this to occur? Manually running /sw/bin/whoami
>> as the user in question returns the corresponding username.
>>
>> 							L.G.
>>
>>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 101tec Inc.
> Menlo Park, California, USA
> http://www.101tec.com
>
>

Re: login error while running hadoop on MacOSX 10.5.*

Posted by Stefan Groschupf <sg...@101tec.com>.
Which user runs the hadoop? It should be the same you trigger the job  
with.

On Jun 23, 2008, at 10:29 PM, Lev Givon wrote:

> I recently installed hadoop 0.17.0 in pseudo-distributed mode on a
> MacOSX 10.5.3 system with software managed by Fink installed in /sw. I
> configured hadoop to use the stock Java 1.5.0_13 installation in
> /Library/Java/Home. When I attempted to run a simple map/reduce job
> off of the dfs after starting up the daemons, the job failed with the
> following Java error (501 is the ID of the user used to start the
> hadoop daemons and run the map/reduce job):
>
> javax.security.auth.login.LoginException: Login failed:
> /sw/bin/whoami: cannot find name for user ID 501
>
> What might be causing this to occur? Manually running /sw/bin/whoami
> as the user in question returns the corresponding username.
>
> 							L.G.
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101tec Inc.
Menlo Park, California, USA
http://www.101tec.com