Linux7 下Hadoop集群用户管理方案之四 CDH集成Kerberos

本文介绍如何在Cloudera Manager (CM) 上配置Kerberos认证,包括管理员用户的创建过程、解决常见错误的方法及krb5.conf配置管理。
CM 开启Kerberos  认证

在CM上使用Kerberos认证,它会帮我们创建所有的需要的Kerberos账户,并且在启动的时候自动生成keytab存放到对应的启动目录,在配置文件中添加对应的keytab文件配置和用户名。
所以,只需要给CM创建一个拥有管理员权限的账户。CM就能够完成大部分的初始化工作。

首先添加一个管理员用户
Kadmin.local: addprinc -pw raysdata  cloudera-scm/admin@HADOOP.COM
Principal  "cloudera-scm/admin@HADOOP.COM"   created.
addprinc -maxrenewlife "432000 sec" cloudera-scm/admin @HADOOP.COM



kinit: No key table entry found for REDACTED/admin@HADOOP.COM while getting initial credentials
解决方式:使用CM 管理krb5.conf

 KDC has no support for encryption type while getting initial credentials
kerberos 加密类型 修改成   AES128  默认的那个不行。。。

7/04/26 17:36:42 WARN security.UserGroupInformation: PriviledgedActionException as:hdfs@HADOOP.COM (auth:KERBEROS) cause:java.io.IOException: Couldn't setup connection for hdfs@HADOOP.COM to edu-bigdata-01.novalocal/10.10.106.156:8020
mkdir: Failed on local exception: java.io.IOException: Couldn't setup connection for hdfs@HADOOP.COM to edu-bigdata-01.novalocal/10.10.106.156:8020; Host Details : local host is: "edu-bigdata-01.novalocal/10.10.106.156"; destination host is: "edu-bigdata-01.novalocal":8020; 
### Reasons - **Incorrect version specification**: When specifying a version in a configuration file (e.g., `package.json` in a Node.js project or `pom.xml` in a Maven project), an error in the version number, such as a typo, can lead to the inability to find the version. For example, if the correct version is `1.2.3` but is written as `1.2.4` in the configuration, the system won't be able to locate the specified version. - **Missing repository or incorrect repository configuration**: If the package or library is stored in a specific repository, and the project's configuration doesn't include that repository or has an incorrect repository URL, the system won't be able to search in the right place. For instance, in a Java project using Maven, if the custom repository URL in the `settings.xml` file is misconfigured, Maven won't be able to access the required versions. - **Version not published**: The requested version might not have been published to the repository. Developers may forget to publish a new version after making changes, or there could be issues during the publishing process. - **Network issues**: Problems with the network connection can prevent the system from accessing the repository to search for the version. This could be due to a firewall blocking access to the repository server, or a general network outage. ### Solutions - **Check and correct the version number**: Double - check the version number specified in the configuration files. Make sure there are no typos or incorrect version formats. For example, in a `package.json` file for a Node.js project: ```json { "dependencies": { "some - package": "1.2.3" } } ``` Ensure that `1.2.3` is the correct version you need. - **Verify and update repository configuration**: Check the repository configuration in your project. In a Maven project, ensure that the `pom.xml` file has the correct repositories defined: ```xml <repositories> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2</url> </repository> </repositories> ``` If you are using a custom repository, make sure the URL is correct and the repository is accessible. - **Publish the missing version**: If the version is not published, follow the appropriate steps to publish it. In a Node.js project, you can use `npm publish` after incrementing the version number in the `package.json` file. In a Java project, use the appropriate Maven commands like `mvn deploy` to publish the new version to the repository. - **Check and fix network issues**: Ensure that your network connection is stable and that there are no firewalls blocking access to the repository. You can try accessing the repository URL directly in a web browser to check if it's reachable. If there is a firewall, configure it to allow access to the necessary repository servers.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值