Hadoop IOException failure to login

后端 未结 3 1252
青春惊慌失措
青春惊慌失措 2021-02-13 05:32

I\'m pretty new to Hadoop. However, I\'ve been able to successfully setup hadoop 2.7.3 with Java 7 in the cluster mode on my servers. Everything works totally fine.

But

3条回答
  •  无人共我
    2021-02-13 06:21

    I've encountered the same issue when running an hbase client from a docker container with Java 8. It is apparently caused by class com.sun.security.auth.module.UnixLoginModule which uses a native call to get the unix username. In my case, it is not mapped in docker, and the class throws a NullPointerException. It is not a bug in hadoop per se.

    To instruct hadoop to bypass the lookup of the OS username, I was able to add the following line of code before all initialization:

    UserGroupInformation.setLoginUser(UserGroupInformation.createRemoteUser("hduser"));
    

    In your case, you are running the server, so your options of injecting the code are limited. Instead there are two options:

    1. Try the IBM JDK instead
    2. Try to debug the OS user setup on the workers ( $ whoami). If it says something like 'cannot find name for user ID XXXX', then check the /etc/passwd setup

提交回复
热议问题