在FreeIPA安装使用的过程中,碰到了许多问题,这里记录。

1. ipa-client-install安装失败

错误信息

[root@hdp140 log]# ipa-client-install
... ...
Attempting to get host TGT...
Please make sure the following ports are opened in the firewall settings:TCP: 80, 88, 389UDP: 88 (at least one of TCP/UDP ports 88 has to be open)
Also note that following ports are necessary for ipa-client working properly after enrollment:TCP: 464UDP: 464, 123 (if NTP enabled)
Failed to obtain host TGT.
Installation failed. Rolling back changes.
IPA client is not configured on this system.

查看日志:

2017-11-08T05:55:19Z DEBUG Attempt 4/5 failed.
2017-11-08T05:55:20Z DEBUG args=/usr/bin/kinit -k -t /etc/krb5.keytab host/ipa140.example.com@EXAMPLE.COM
2017-11-08T05:55:20Z DEBUG stdout=
2017-11-08T05:55:20Z DEBUG stderr=kinit: Keytab contains no suitable keys for host/ipa140.example.com@EXAMPLE.COM while getting initial credentials2017-11-08T05:55:20Z DEBUG Attempt 5/5 failed.
2017-11-08T05:55:20Z INFO Please make sure the following ports are opened in the firewall settings:TCP: 80, 88, 389UDP: 88 (at least one of TCP/UDP ports 88 has to be open)
Also note that following ports are necessary for ipa-client working properly after enrollment:TCP: 464UDP: 464, 123 (if NTP enabled)
2017-11-08T05:55:20Z ERROR Failed to obtain host TGT.
2017-11-08T05:55:20Z ERROR Installation failed. Rolling back changes.
2017-11-08T05:55:20Z ERROR IPA client is not configured on this system.

原因

从日志看是因为kinit失败,查看/etc/krb5.conf的配置文件

[realms]EXAMPLE.COM = {kdc = kerberos.example.com  <---这个地方没有被修改admin_server = kerberos.example.com}

/etc/krb5.conf是在安装ipa client之后出现的。在执行ipa-client-install的时候会将它修改。而现在没有修改。而再次查看日志发现本机的IP是不正确的

2017-11-08T05:55:20Z DEBUG args=/usr/bin/kinit -k -t /etc/krb5.keytab host/ipa140.example.com@EXAMPLE.COM

本机正确的机器名应该为hdp140.example.com,而不是ipa140.example.com,而这个机器名除了本地会配置,还有一个地方就是Server端的DNS处,查看DNS配置信息,发现:

[root@localhost named]# cat 1.168.192.file ... ...
140     IN PTR  ipa140.example.com.
141     IN PTR  ipa141.example.com.
142     IN PTR  ipa142.example.com.

修改named的配置文件,然后重启named之后,再hdp140上面安装成功。

2. ipa-client安装失败后,再次重装报Host is already joined

错误信息

ipa-client-install安装失败后,先执行uninstall再次执行install的时候,报错如下:

[root@hdp140 log]# ipa-client-install --uninstall
IPA client is not configured on this system.
[root@hdp140 log]# ipa-client-install
... ...
Password for admin@EXAMPLE.COM:
Joining realm failed: Host is already joined.Installation failed. Rolling back changes.
IPA client is not configured on this system.

解决方法

在FreeIPA Server节点上执行如下命令:
先执行ipa host-find命令:

[root@localhost log]# ipa host-find
---------------
3 hosts matched
---------------
  Host name: hdp140.example.com
  Principal name: host/hdp140.example.com@EXAMPLE.COM
  Password: False
  Keytab: True
  Managed by: hdp140.example.com

找到对应的节点,然后再在Server节点将它删除掉

[root@localhost log]# ipa host-del hdp140.example.com
---------------------------------
Deleted host "hdp140.example.com"
---------------------------------

3. 通过从节点的web 创建的用户,在主节点的web上面无法查找到

错误信息

FreeIPA有两主从两个Server,现在通过从Server节点的Web创建一个用户后,在主Server的Web上面无法查找到,查看日志,发现如下的错误:

sasl_io_recv failed to decode packet for connection....

错误原因

官方给出的解释是nsslapd-sasl-max-buffer-size的值太小,导致出错。

解决方法

  1. 创建一个配置文件
[root@ipa110 /]# cat package.ldif
dn: cn=config
changetype: modify
replace: nsslapd-sasl-max-buffer-size
nsslapd-sasl-max-buffer-size: 2097152
  1. 执行修改这个文件
[root@ipa110 /]# ldapmodify -h localhost -D "cn=directory manager" -w hadoop123 -f package.ldif -ZZ

执行完成后,将主从两个节点的ipa都重启一次。

4. ipa -client安装失败

错误信息

执行ipa-client-install的时候,抛出异常,查看ipa-client的安装日志:

Unexpected error - see /var/log/ipareplica-install.log for details:
UnboundLocalError: local variable 'replman' referenced before assignment

修改方式

[root@ipa111 /]# vi /usr/sbin/ipa-replica-installldapuri = 'ldaps://%s' % ipautil.format_netloc(config.master_host_name)replman = None   ----------增加这一行try:conn = ldap2(shared_instance=False, ldap_uri=ldapuri, base_dn='')conn.connect(bind_dn=DN(('cn', 'directory manager')),bind_pw=config.dirman_password,tls_cacertfile=CACERT)replman = ReplicationManager(config.realm_name, config.master_host_name,config.dirman_password)found = Falsetry:entry = conn.find_entries(u'fqdn=%s' % host, ['dn', 'fqdn'], DN(api.env.container_host, api.env.basedn))print "The host %s already exists on the master server.\nYou should remove it before proceeding:" % hostprint "    %% ipa host-del %s" % hostfound = Trueexcept errors.NotFound:

需要说明的是,并不是每次都会出现这种错误,网上提供的一种修改方式就是增加那一行记录。

5. ipa-client-install重新安装是报错

错误信息

[root@ysbdh03 tls]# ipa-client-install
DNS discovery failed to determine your DNS domain
Provide the domain name of your IPA server (ex: example.com): gdbd.com
Provide your IPA server name (ex: ipa.example.com): ysbdh06.gdbd.com
LDAP Error: Connect error: TLS error -8054:You are attempting to import a cert with the same issuer/serial as an existing cert, but that is not the same cert.
Failed to verify that ysbdh06.gdbd.com is an IPA Server.
This may mean that the remote server is not up or is not reachable due to network or firewall settings.
Please make sure the following ports are opened in the firewall settings:TCP: 80, 88, 389UDP: 88 (at least one of TCP/UDP ports 88 has to be open)
Also note that following ports are necessary for ipa-client working properly after enrollment:TCP: 464UDP: 464, 123 (if NTP enabled)
Installation failed. Rolling back changes.
IPA client is not configured on this system.

原因:

ipa client是重新安装的,原来的部分配置信息没有清理干净。而对于这个问题,就将/etc/ipa/ca.crt 这个配置文件干掉

6. FreeIPA Web创建的页面,在client节点无法登录

问题

在freeipa上面创建了用户之后,发现在client无法使用此用户登录。查看sssd的日志(在/var/log/ssssd/ ldap_child.log):

(Wed Jul 12 12:09:15 2017) [[sssd[ldap_child[11108]]]] [ldap_child_get_tgt_sync] (0x0010): Failed to init credentials: Decrypt integrity check failed

分析

修改sssd的日志级别,打印debug日志,修改配置文件/etc/sssd/sssd.conf:

[root@hdfs142 sssd]# vi /etc/sssd/sssd.conf [domain/example.com]cache_credentials = True
debug_level = 9    ---修改这个值然后重启sssd

重启sssd

[root@hdfs142 sssd]# service sssd restart
Stopping sssd:                                             [  OK  ]
Starting sssd:                                             [  OK  ]
[root@hdfs142 sssd]

执行su – user01,查看ldap_child.log日志

(Wed Jul 12 12:09:15 2017) [[sssd[ldap_child[11108]]]] [sss_child_krb5_trace_cb] (0x4000): [11108] 1499886555.112026: Received error from KDC: -1765328353/Decrypt integrity check failed(Wed Jul 12 12:09:15 2017) [[sssd[ldap_child[11108]]]] [ldap_child_get_tgt_sync] (0x0010): Failed to init credentials: Decrypt integrity check failed
(Wed Jul 12 12:09:15 2017) [[sssd[ldap_child[11108]]]] [main] (0x0020): ldap_child_get_tgt_sync failed.

从这里可以判断是kdc那里返回了错误。再次查看kdc的日志

Jul 12 12:09:14 freeipa138.example.com krb5kdc[15053](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.1.142: NEEDED_PREAUTH: host/hdfs142.example.com@EXAMPLE.COM for krbtgt/EXAMPLE.COM@EXAMPLE.COM, Additional pre-authentication required
Jul 12 12:09:14 freeipa138.example.com krb5kdc[15052](info): preauth (encrypted_timestamp) verify failure: Decrypt integrity check failed
Jul 12 12:09:14 freeipa138.example.com krb5kdc[15052](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.1.142: PREAUTH_FAILED: host/hdfs142.example.com@EXAMPLE.COM for krbtgt/EXAMPLE.COM@EXAMPLE.COM, Decrypt integrity check failed

从这里可以看,客户端使用host/hdfs142.example.com@EXAMPLE.COM这个princal去认证,结果出错。而客户端是通过/etc/krb5.keytab来认证。
回忆之前在hadoop的配置的时候,将host/hdfs142.example.com这个princal导出。所以答案很清楚。Kerberos在导出keytab文件之后,会将密码重置,因此之前的keytab文件失效。
找到导出的那个keytab文件,将/etc/krb5.keytab替换掉。

FreeIPA问题记录相关推荐

  1. 如何在Red Hat Linux上安装和配置FreeIPA

    目的 我们的目标是在Red Hat Enterprise Linux上安装和配置独立的FreeIPA服务器. 操作系统和软件版本 操作系统: Red Hat Enterprise Linux 7.5 ...

  2. Docker 部署 FreeIPA 服务

    Docker 部署 FreeIPA 服务 一.FreeIPA Docker 服务部署 1.安装 FreeIPA 服务器 2.部署过程 3.域名解析 二.FreeIPA 服务器脚本批量用户操作 1.进入 ...

  3. linux ipa 权限管理,FreeIPA管理本地用户

    介绍 FreeIPA可以快速.便捷的将linux系统接入,进行统一的身份认证和权限管理. FreeIPA 是Linux的开源安全解决方案,提供帐户管理和集中身份验证,类似于Microsoft的Acti ...

  4. CDH6.3.2集成FreeIPA

    准备 系统配置 Cloudera Manager Server节点需要安装IPA admin libraries.命令如下: yum install ipa-server 配置FreeIPA Free ...

  5. Jumpserver与Freeipa集成(以及其他配置)

    背景: jumpserver的安装参照:jumpserver的简单安装使用,Freeipa的安装参照:Freeipa的简单搭建配置.准备将Freeipa与Jumpserver集成.其实Freeipa搭 ...

  6. mysql建立联合索引,mysql建立唯一键,mysql如何解决重复记录联合索引

    在项目中,常常要用到联合唯一   在一些配置表中,一些列的组合成为一条记录.   比如,在游戏中,游戏的分区和用户id会形成一条记录.(比如,一个qq用户可以在艾欧尼亚.德玛西亚创建两个账号) 添加联 ...

  7. 实现 连续15签到记录_MySQL和Redis实现用户签到,你喜欢怎么实现?

    现在的网站和app开发中,签到是一个很常见的功能 如微博签到送积分,签到排行榜 微博签到 如移动app ,签到送流量等活动, 移动app签到 用户签到是提高用户粘性的有效手段,用的好能事半功倍! 下面 ...

  8. 记录一次http请求失败的问题分析

    问题背景 当前我有一个基于Flask编写的Restful服务,由于业务的需求,我需要将该服务打包成docker 镜像进行离线部署,原始服务的端口是在6661端口进行开启,为了区分,在docker中启动 ...

  9. Pytorch学习记录-torchtext和Pytorch的实例( 使用神经网络训练Seq2Seq代码)

    Pytorch学习记录-torchtext和Pytorch的实例1 0. PyTorch Seq2Seq项目介绍 1. 使用神经网络训练Seq2Seq 1.1 简介,对论文中公式的解读 1.2 数据预 ...

  10. LeetCode简单题之学生出勤记录 I

    题目 给你一个字符串 s 表示一个学生的出勤记录,其中的每个字符用来标记当天的出勤情况(缺勤.迟到.到场).记录中只含下面三种字符: 'A':Absent,缺勤 'L':Late,迟到 'P':Pre ...

最新文章

  1. linux查看服务器设备信息命令dmidecode
  2. 【简便解法】1084 Broken Keyboard (20 分)_16行代码AC
  3. idea android 模块,IntelliJ IDEA 12 - 新的Android应用程序模块向导失败,“无法找到模块的资源目录”...
  4. thinkphp u不加载css,解决ThinkPHP样式无法加载问题(CSS,JS)
  5. sql 数据表归档_如何在考虑规模的情况下归档SQL Server数据
  6. 弹出菜单快捷键的使用方法
  7. The Game Of Life – 数据结构与算法的敲门砖
  8. mediaplay抓图
  9. 集成电路模拟版图入门-版图基础学习笔记(四)
  10. TcPlayer腾讯播放器
  11. 一些特殊符号%$等等,如何写在xml,TextView中
  12. 如何批量从多个 Word 文档中提取图片
  13. 禁用360浏览器自动填充用户数据
  14. 只需一个损失函数,一个超参数即可压缩BERT,MSRA提模型压缩新方法
  15. 雷达回波视频预测核心问题及关键技术纪要
  16. Chrome图片批量下载扩展-zzllrr imager V1.4
  17. 电脑按F1/F12/F10等进不去BIOS进入BIOS里面Advance下设置CPU Setup的Intel Virtualization Technology设置Linux长模式不兼容
  18. ceph L版本相对于J版本在scrub机制上做的优化
  19. 1rem、1em、1vh、1px各自代表的含义
  20. 解决Unable to find encoder for type stored in a Dataset问题

热门文章

  1. 20172328的结对编程四则运算第二周-整体总结
  2. “潜力工作者”会不会成为明年24届秋招统计参数中的受害者?
  3. 算法三:判断该年该月有几天
  4. 微信公众平台 微信网页授权
  5. guid主分区表损坏如何处理_guid主分区表损坏如何处理_windows10系统硬盘分区表损坏修复教程...
  6. Origin 画图——简单的柱状图画法
  7. 【CSDN雇主招聘】深信服科技带着高薪岗位JD和公司周边来啦
  8. 2021-4-22-Python自动化31期-day01作业答案
  9. 安徽科技学院 信网学院网络文化节 陈鑫鑫
  10. java商品详情查询_商品详情页面的显示