dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[BUG] Throw exception when create file.

Open yh2388 opened this issue 6 years ago • 5 comments

When kerberos startup, create file fail, throw exception:

Caused by: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]

Of course, kerberos config is well.

yh2388 avatar Mar 18 '20 08:03 yh2388

Temporary solution is to leave parameter 'hdfs.root.user' blank.

yh2388 avatar Mar 18 '20 08:03 yh2388

@qiaozhanwei

xingchun-chen avatar Mar 19 '20 01:03 xingchun-chen

Temporary solution is to leave parameter 'hdfs.root.user' blank.

this is the right way to solve this problem, next version will solve this problem from code

davidzollo avatar Apr 05 '20 16:04 davidzollo

Temporary solution is to leave parameter 'hdfs.root.user' blank.

this is the right way to solve this problem, next version will solve this problem from code

Could you tell me how to solve this problem?

yh2388 avatar Apr 10 '20 07:04 yh2388

you can see the code HadoopUtils.java

init method:

                           if (fs == null) {
                                if(StringUtils.isNotEmpty(hdfsUser)){
                                    //UserGroupInformation ugi = UserGroupInformation.createProxyUser(hdfsUser,UserGroupInformation.getLoginUser());
                                    UserGroupInformation ugi = UserGroupInformation.createRemoteUser(hdfsUser);
                                    ugi.doAs(new PrivilegedExceptionAction<Boolean>() {
                                        @Override
                                        public Boolean run() throws Exception {
                                            fs = FileSystem.get(configuration);
                                            return true;
                                        }
                                    });
                                }else{
                                    logger.warn("hdfs.root.user is not set value!");
                                    fs = FileSystem.get(configuration);
                                }
                            }

davidzollo avatar Apr 10 '20 16:04 davidzollo