Bug 895561

Summary: IPA install in pure IPv6 environment fails with "Can't contact LDAP server" error
Product: Red Hat Enterprise Linux 6 Reporter: Steeve Goveas <sgoveas>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: dpal, jgalipea, mkosek, nhosoi, nkinder, rmeggins, tlavigne
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-23.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 902466 (view as bug list) Environment:
Last Closed: 2013-02-21 09:32:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 905536    
Attachments:
Description Flags
Pure IPv6 env IPA install log none

Description Steeve Goveas 2013-01-15 14:31:25 UTC
Description of problem:
IPA install on a server with no IPv4 address fails with "Can't contact LDAP server" error. It is successful on the same server if a IPv4 is present. Martin checked the code and confirmed that a connection is made specifically to localhost address 127.0.0.1 in order to contact the ldap server locally.

Martin's investigation

When Steeve discussed this issue with me, I did a little investigation trying to find out what is so special about the step that crashes. I see that we do:

...
        conn = ipaldap.IPAdmin("127.0.0.1")
        if self.dm_password:
            conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)
        else:
            conn.do_sasl_gssapi_bind()
...

I.e. connect specifically to 127.0.0.1. Would that work on a pure IPv6 system? I think we should rather connect to ldap://<fqdn>:389 or localhost as we do with ldapmodify commands which were run in steps previous to this crash.

Steeve, I wonder if the following command would work:

# ldapsearch -h 127.0.0.1 -D "cn=Directory Manager" -x -W -b "" -s base

it should simulate the code excerpt above. 

[root@sideswipe ~]# ldapsearch -h 127.0.0.1 -D "cn=Directory Manager" -x -W -b "" -s base
Enter LDAP Password:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) 


Version-Release number of selected component (if applicable):
ipa-server-3.0.0-21.el6.x86_64

How reproducible:
Always


Steps to Reproduce:
1. Delelte IPv4 address of the Server
# ip addr del 10.65.206.83 dev eth0
2. Install ipa
# ipa-server-install --setup-dns -p Secret123 -a Secret123 -r TESTRELM.COM -n testrelm.com --no-forwarder
  
Actual results:
[root@sideswipe ~]# ipa-server-install --setup-dns -p Secret123 -a Secret123 -r TESTRELM.COM -n testrelm.com --no-forwarder

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: yes
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.


Server host name [sideswipe.testrelm.com]: 

Warning: skipping DNS resolution of host sideswipe.testrelm.com
Do you want to configure the reverse zone? [yes]: 
Please specify the reverse zone name [e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.]: 
Using reverse zone e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

The IPA Master Server will be configured with:
Hostname:      sideswipe.testrelm.com
IP address:    2620:52:0:41ce:5054:ff:fe3b:c68b
Domain name:   testrelm.com
Realm name:    TESTRELM.COM

BIND DNS server will be configured to serve IPA domain with:
Forwarders:    No forwarders
Reverse zone:  e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server for the CA (pkids): Estimated time 30 minutes 30 seconds
  [1/3]: creating directory server user
  [2/3]: creating directory server instance
  [3/3]: restarting directory server
Done configuring directory server for the CA (pkids).
Configuring certificate server (pki-cad): Estimated time 33 minutes 30 seconds
  [1/21]: creating certificate server user
  [2/21]: creating pki-ca instance
  [3/21]: configuring certificate server instance
  [4/21]: disabling nonces
  [5/21]: creating CA agent PKCS#12 file in /root
  [6/21]: creating RA agent certificate database
  [7/21]: importing CA chain to RA certificate database
  [8/21]: fixing RA database permissions
  [9/21]: setting up signing cert profile
  [10/21]: set up CRL publishing
  [11/21]: set certificate subject base
  [12/21]: enabling Subject Key Identifier
  [13/21]: setting audit signing renewal to 2 years
  [14/21]: configuring certificate server to start on boot
  [15/21]: restarting certificate server
  [16/21]: requesting RA certificate from CA
  [17/21]: issuing RA agent certificate
  [18/21]: adding RA agent as a trusted user
  [19/21]: configure certificate renewals
  [20/21]: configure Server-Cert certificate renewal
  [21/21]: Configure HTTP to proxy connections
Done configuring certificate server (pki-cad).
Configuring directory server (dirsrv): Estimated time 31 minutes
  [1/38]: creating directory server user
  [2/38]: creating directory server instance
  [3/38]: adding default schema
  [4/38]: enabling memberof plugin
  [5/38]: enabling winsync plugin
  [6/38]: configuring replication version plugin
  [7/38]: enabling IPA enrollment plugin
  [8/38]: enabling ldapi
  [9/38]: disabling betxn plugins
  [10/38]: configuring uniqueness plugin
  [11/38]: configuring uuid plugin
  [12/38]: configuring modrdn plugin
  [13/38]: enabling entryUSN plugin
  [14/38]: configuring lockout plugin
  [15/38]: creating indices
  [16/38]: enabling referential integrity plugin
  [17/38]: configuring ssl for ds instance
Can't contact LDAP server

Expected results:
Installation is successful

Additional info:
[root@sideswipe ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
2620:52:0:41ce:5054:ff:fe3b:c68b    sideswipe.testrelm.com sideswipe

[root@sideswipe log]# ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:3B:C6:8B
          inet6 addr: 2620:52:0:41ce:5054:ff:fe3b:c68b/64 Scope:Global
          inet6 addr: fe80::5054:ff:fe3b:c68b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12313838 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146122 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:902270807 (860.4 MiB)  TX bytes:52980101 (50.5 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:119681 errors:0 dropped:0 overruns:0 frame:0
          TX packets:119681 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:34858642 (33.2 MiB)  TX bytes:34858642 (33.2 MiB)

[root@sideswipe log]# ping 10.65.201.122
connect: Network is unreachable

[root@sideswipe log]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref Use Iface 

[root@sideswipe ~]# ipa-server-install --setup-dns -p Secret123 -a Secret123 -r TESTRELM.COM -n testrelm.com --no-forwarder

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: yes
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.


Server host name [sideswipe.testrelm.com]: 

Warning: skipping DNS resolution of host sideswipe.testrelm.com
Do you want to configure the reverse zone? [yes]: 
Please specify the reverse zone name [e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.]: 
Using reverse zone e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

The IPA Master Server will be configured with:
Hostname:      sideswipe.testrelm.com
IP address:    2620:52:0:41ce:5054:ff:fe3b:c68b
Domain name:   testrelm.com
Realm name:    TESTRELM.COM

BIND DNS server will be configured to serve IPA domain with:
Forwarders:    No forwarders
Reverse zone:  e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server for the CA (pkids): Estimated time 30 minutes 30 seconds
  [1/3]: creating directory server user
  [2/3]: creating directory server instance
  [3/3]: restarting directory server
Done configuring directory server for the CA (pkids).
Configuring certificate server (pki-cad): Estimated time 33 minutes 30 seconds
  [1/21]: creating certificate server user
  [2/21]: creating pki-ca instance
  [3/21]: configuring certificate server instance
  [4/21]: disabling nonces
  [5/21]: creating CA agent PKCS#12 file in /root
  [6/21]: creating RA agent certificate database
  [7/21]: importing CA chain to RA certificate database
  [8/21]: fixing RA database permissions
  [9/21]: setting up signing cert profile
  [10/21]: set up CRL publishing
  [11/21]: set certificate subject base
  [12/21]: enabling Subject Key Identifier
  [13/21]: setting audit signing renewal to 2 years
  [14/21]: configuring certificate server to start on boot
  [15/21]: restarting certificate server
  [16/21]: requesting RA certificate from CA
  [17/21]: issuing RA agent certificate
  [18/21]: adding RA agent as a trusted user
  [19/21]: configure certificate renewals
  [20/21]: configure Server-Cert certificate renewal
  [21/21]: Configure HTTP to proxy connections
Done configuring certificate server (pki-cad).
Configuring directory server (dirsrv): Estimated time 31 minutes
  [1/38]: creating directory server user
  [2/38]: creating directory server instance
  [3/38]: adding default schema
  [4/38]: enabling memberof plugin
  [5/38]: enabling winsync plugin
  [6/38]: configuring replication version plugin
  [7/38]: enabling IPA enrollment plugin
  [8/38]: enabling ldapi
  [9/38]: disabling betxn plugins
  [10/38]: configuring uniqueness plugin
  [11/38]: configuring uuid plugin
  [12/38]: configuring modrdn plugin
  [13/38]: enabling entryUSN plugin
  [14/38]: configuring lockout plugin
  [15/38]: creating indices
  [16/38]: enabling referential integrity plugin
  [17/38]: configuring ssl for ds instance
Can't contact LDAP server

[root@sideswipe ~]# telnet 127.0.0.1 389
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
^]
telnet>

[root@sideswipe ~]# netstat -antp | grep slapd
tcp        0      0 :::7389 :::*                        LISTEN      31363/ns-slapd
tcp        0      0 :::389 :::*                        LISTEN      32644/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34337 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34339 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34338 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34336 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34333 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34335 ESTABLISHED 31363/ns-slapd
tcp        0      0 ::ffff:127.0.0.1:389 ::ffff:127.0.0.1:33789      ESTABLISHED 32644/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34341 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34331 ESTABLISHED 31363/ns-slapd
tcp        0      0 2620:52:0:41ce:5054:ff:7389 2620:52:0:41ce:5054:f:34340 ESTABLISHED 31363/ns-slapd

Comment 2 Rob Crittenden 2013-01-15 16:36:25 UTC
I believe this may be similar code in a different set of code in ipaserver/install/dsinstance.py::
enable_ssl:

        conn = ipaldap.IPAdmin("127.0.0.1")
        conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)

This code dates to 2007 which would mean this is not a regression, it could never have worked.

Comment 4 Rob Crittenden 2013-01-15 18:05:16 UTC
We need to see /var/log/ipaserver-install.log to see exactly where it is failing.

Comment 5 Martin Kosek 2013-01-16 08:51:13 UTC
(In reply to comment #2)
> I believe this may be similar code in a different set of code in
> ipaserver/install/dsinstance.py::
> enable_ssl:
> 
>         conn = ipaldap.IPAdmin("127.0.0.1")
>         conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)
> 
> This code dates to 2007 which would mean this is not a regression, it could
> never have worked.

Yes, this is exactly the same conclusion I reached and discussed with Steeve on our internal team list. I reproduced this issue on Fedora 18, I wonder if anything has changed in LDAP as I know this worked before. Anyway, I will produce a patch for this issue in case we decide to include the fix in this release.

Comment 6 Martin Kosek 2013-01-16 08:55:11 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3355

Comment 7 Steeve Goveas 2013-01-16 09:08:05 UTC
Created attachment 679427 [details]
Pure IPv6 env IPA install log

ipaserver-install.log attached

Comment 8 Martin Kosek 2013-01-16 09:46:43 UTC
I posted patch fixing this issue upstream (it is also attached to the ticket). I verified, that it fixes master&replica installation on 2 RHEL-6.4 systems.

Comment 9 Martin Kosek 2013-01-17 14:58:36 UTC
BTW I tested this issue on RHEL 6.3 and IPA installation worked here when I removed all eth* IPv4 addresses and left 127.0.0.1 on lo interface.

It seems that the difference is that 389-ds-base no longer listens on 127.0.0.1 in this environment. Rich, is this a side effect of some change in 389-ds-base or similar?

Comment 10 Rich Megginson 2013-01-17 15:14:33 UTC
(In reply to comment #9)
> BTW I tested this issue on RHEL 6.3 and IPA installation worked here when I
> removed all eth* IPv4 addresses and left 127.0.0.1 on lo interface.
> 
> It seems that the difference is that 389-ds-base no longer listens on
> 127.0.0.1 in this environment. Rich, is this a side effect of some change in
> 389-ds-base or similar?

Not sure.  So, something changed between 389-ds-base 1.2.10 and 389-ds-base 1.2.11 with respect to IPv4/IPv6 handling?

Comment 11 Martin Kosek 2013-01-17 15:37:47 UTC
Looks like it - or there were some networking change which influenced it. Attaching my console output:

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1a:4a:10:4e:dc brd ff:ff:ff:ff:ff:ff
    inet6 2620:52:0:104c:21a:4aff:fe10:4edc/64 scope global dynamic 
       valid_lft 2591901sec preferred_lft 604701sec
    inet6 fec0:0:a10:4c00:21a:4aff:fe10:4edc/64 scope site dynamic 
       valid_lft 2591901sec preferred_lft 604701sec
    inet6 fed0:babe:baab:0:21a:4aff:fe10:4edc/64 scope site dynamic 
       valid_lft 86348sec preferred_lft 14348sec
    inet6 fe80::21a:4aff:fe10:4edc/64 scope link 
       valid_lft forever preferred_lft forever


# netstat -putna | grep slap
tcp        0      0 :::636                      :::*                        LISTEN      9468/ns-slapd       
tcp        0      0 :::7389                     :::*                        LISTEN      9536/ns-slapd       
tcp        0      0 :::7390                     :::*                        LISTEN      9536/ns-slapd       
tcp        0      0 :::389                      :::*                        LISTEN      9468/ns-slapd   

# ldapsearch -H ldap://127.0.0.1 -D "cn=Directory Manager" -x -w kokos123 -b "" -s base
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)


When I set up this environment on RHEL-6.3, the ldapsearch succeeded.

Comment 12 Noriko Hosoi 2013-01-18 00:57:24 UTC
I repeated the test on my machine using 389-ds-base-1.2.11.15-10. I deleted my IPv4 addr.
# ip addr del <IPv4 addr> dev em1

Then, it successfully connects to the server via lo, but not via the IPv4 address.
$ ldapsearch -LLLx -H ldap://127.0.0.1  -b "" -s base objectclass
dn:
objectclass: top

$ ldapsearch -LLLx -H ldap://<IPv4 addr> -b "" -s base objectclass
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

netstat output looks like this:
# netstat -putna | egrep ns-slapd
tcp        0      0 :::389                      :::*                        LISTEN      18462/./ns-slapd    

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether f0:de:f1:9e:cb:4c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f2de:f1ff:fe9e:cb4c/64 scope link 
       valid_lft forever preferred_lft forever

Do you set nsslapd-listenhost in dse.ldif?  I'm interested in the difference between the dse.ldif files on RHEL-6.3 and 6.4.

Comment 13 Martin Kosek 2013-01-18 07:19:14 UTC
I am not sure where is the difference. In my case, I removed the IPv4 address and _then_ I started installation of IPA, i.e. start configuring a dirsrv instance. I checked dse.ldif and nsslapd-listenhost was not configured...

I can provide dse.ldifs and/or access to the RHEL-6.4 VM where I have the running dirsrv which does not listen on 127.0.0.1.

Comment 14 Nathan Kinder 2013-01-18 16:44:30 UTC
This problem seems to be on the client side, not in 389 DS itself.  On Martin's system, I am able to use telnet to access port 389 over the IPv4 loopback address.  I can see that the server receives the connection over this interface in the 389 access log:

----------------------------------------
[18/Jan/2013:11:32:12 -0500] conn=41 fd=66 slot=66 connection from 127.0.0.1 to 127.0.0.1
[18/Jan/2013:11:32:21 -0500] conn=41 op=-1 fd=66 closed - B1
----------------------------------------

This proves that 389 DS is listening properly on the IPv4 loopback interface.  When you try to use ldapsearch, nothing is logged in the access log.  It seems like the problem might be in the OpenLDAP client libraries.

Comment 15 Nathan Kinder 2013-01-18 22:38:47 UTC
Would it be possible to downgrade openldap to the last released version from RHEL 6.3.z to see if that causes the problem to go away?

  6.4 - openldap-2.4.23-31.el6
  6.3.z - openldap-2.4.23-26.el6_3.2

Comment 16 Noriko Hosoi 2013-01-19 01:41:52 UTC
I verified that the reported problem was not observed once downgrade openldap packages to 2.4.23-31.el6.x86_64.

Tested OS: rhel-server-6.4-snapshot-2-x86_64-dvd.iso
Directory server: 389-ds-base-1.2.11.15-10.el6.x86_64

1) using the latest openldap packages:
   openldap-clients-2.4.23-31.el6.x86_64
   openldap-2.4.23-31.el6.x86_64
   # ip addr del <IPv4> dev eth0
   $ ldapsearch -LLLx -H ldap://<IPv4> -b "" -s base dn
   dap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
   $ ldapsearch -LLLx -H ldap://127.0.0.1 -b "" -s base dn
   ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) <== reported problem
   $ ldapsearch -LLLx -H ldap://localhost -b "" -s base dn
   dn:
   $ ldapsearch -LLLx -H ldap://[::1] -b "" -s base dn
   dn:
2) downgraded openldap packages:
   openldap-clients-2.4.23-26.el6_3.2.x86_64
   openldap-2.4.23-26.el6_3.2.x86_64
   $ ldapsearch -LLLx -H ldap://<IPv4> -b "" -s base dn
   ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
   $ ldapsearch -LLLx -H ldap://127.0.0.1 -b "" -s base dn
   dn: <== loop back is available.
   $ ldapsearch -LLLx -H ldap://[::1] -b "" -s base dn
   dn:
   $ ldapsearch -LLLx -H ldap://localhost -b "" -s base dn
   dn:

Comment 17 Rob Crittenden 2013-01-21 17:15:31 UTC
Fixed in IPA upstream. Do not reference 127.0.0.1 in installer.

master: 51f9ed0239e0bb59a96e9de18e99b10a0dbe9edd

ipa-3-1: 040ba6bebaa55e7cfa3062d8ced5b4a7f96073d8

ipa-3-0: af5689dad290d7b7666652dcaa3a8fa167029975

Comment 18 Noriko Hosoi 2013-01-21 17:52:37 UTC
FYI: I ran this test (comment #12) on F16, on which openldap-2.4.26-8 is installed.

$ rpm -q openldap
openldap-2.4.26-8.fc16.x86_64

So, it might be an issue only in some particular openldap version...
openldap-2.4.23-26.el6_3.2.x86_64 -- ok
openldap-2.4.23-31.el6.x86_64 -- failed
openldap-2.4.26-8.fc16.x86_64 -- ok

(In reply to comment #12)
> I repeated the test on my machine using 389-ds-base-1.2.11.15-10. I deleted
> my IPv4 addr.
> # ip addr del <IPv4 addr> dev em1
> 
> Then, it successfully connects to the server via lo, but not via the IPv4
> address.
> $ ldapsearch -LLLx -H ldap://127.0.0.1  -b "" -s base objectclass
> dn:
> objectclass: top
> 
> $ ldapsearch -LLLx -H ldap://<IPv4 addr> -b "" -s base objectclass
> ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
> 
> netstat output looks like this:
> # netstat -putna | egrep ns-slapd
> tcp        0      0 :::389                      :::*                       
> LISTEN      18462/./ns-slapd    
> 
> $ ip addr show
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>     inet6 ::1/128 scope host 
>        valid_lft forever preferred_lft forever
> 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
> qlen 1000
>     link/ether f0:de:f1:9e:cb:4c brd ff:ff:ff:ff:ff:ff
>     inet6 fe80::f2de:f1ff:fe9e:cb4c/64 scope link 
>        valid_lft forever preferred_lft forever
> 
> Do you set nsslapd-listenhost in dse.ldif?  I'm interested in the difference
> between the dse.ldif files on RHEL-6.3 and 6.4.

Comment 20 Steeve Goveas 2013-01-24 10:53:22 UTC
[root@sideswipe ~]# cat /etc/hosts
#127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
2620:52:0:41ce:5054:ff:fe3b:c68b sideswipe.testrelm.com sideswipe

[root@sideswipe ~]# ip addr del 10.65.206.83 dev eth0
Warning: Executing wildcard deletion to stay compatible with old scripts.
Explicitly specify the prefix length (10.65.206.83/32) to avoid this warning.
This special behaviour is likely to disappear in further releases,
fix your scripts!

[root@sideswipe ~]# ip addr del 127.0.0.1 dev lo
Warning: Executing wildcard deletion to stay compatible with old scripts.
Explicitly specify the prefix length (127.0.0.1/32) to avoid this warning.
This special behaviour is likely to disappear in further releases,
fix your scripts!

[root@sideswipe ~]# ifconfig | grep inet
inet6 addr: 2620:52:0:41ce:5054:ff:fe3b:c68b/64 Scope:Global
inet6 addr: fe80::5054:ff:fe3b:c68b/64 Scope:Link
inet6 addr: ::1/128 Scope:Host

[root@sideswipe ~]# ipa-server-install --setup-dns

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
* Configure a stand-alone CA (dogtag) for certificate management
* Configure the Network Time Daemon (ntpd)
* Create and configure an instance of Directory Server
* Create and configure a Kerberos Key Distribution Center (KDC)
* Configure Apache (httpd)
* Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: yes
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
.
Example: master.example.com.


Server host name [sideswipe.testrelm.com]:

Warning: skipping DNS resolution of host sideswipe.testrelm.com
The domain name has been determined based on the host name.

Please confirm the domain name [testrelm.com]:

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [TESTRELM.COM]:
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password:
Password (confirm):

The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.

IPA admin password:
Password (confirm):

Do you want to configure DNS forwarders? [yes]: no
No DNS forwarders configured
Do you want to configure the reverse zone? [yes]:
Please specify the reverse zone name [e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.]:
Using reverse zone e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

The IPA Master Server will be configured with:
Hostname: sideswipe.testrelm.com
IP address: 2620:52:0:41ce:5054:ff:fe3b:c68b
Domain name: testrelm.com
Realm name: TESTRELM.COM

BIND DNS server will be configured to serve IPA domain with:
Forwarders: No forwarders
Reverse zone: e.c.1.4.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)
[1/4]: stopping ntpd
[2/4]: writing configuration
[3/4]: configuring ntpd to start on boot
[4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server for the CA (pkids): Estimated time 30 minutes 30 seconds
[1/3]: creating directory server user
[2/3]: creating directory server instance
[3/3]: restarting directory server
Done configuring directory server for the CA (pkids).
Configuring certificate server (pki-cad): Estimated time 33 minutes 30 seconds
[1/21]: creating certificate server user
[2/21]: creating pki-ca instance
[3/21]: configuring certificate server instance
[4/21]: disabling nonces
[5/21]: creating CA agent PKCS#12 file in /root
[6/21]: creating RA agent certificate database
[7/21]: importing CA chain to RA certificate database
[8/21]: fixing RA database permissions
[9/21]: setting up signing cert profile
[10/21]: set up CRL publishing
[11/21]: set certificate subject base
[12/21]: enabling Subject Key Identifier
[13/21]: setting audit signing renewal to 2 years
[14/21]: configuring certificate server to start on boot
[15/21]: restarting certificate server
[16/21]: requesting RA certificate from CA
[17/21]: issuing RA agent certificate
[18/21]: adding RA agent as a trusted user
[19/21]: configure certificate renewals
[20/21]: configure Server-Cert certificate renewal
[21/21]: Configure HTTP to proxy connections
Done configuring certificate server (pki-cad).
Configuring directory server (dirsrv): Estimated time 31 minutes
[1/38]: creating directory server user
[2/38]: creating directory server instance
[3/38]: adding default schema
[4/38]: enabling memberof plugin
[5/38]: enabling winsync plugin
[6/38]: configuring replication version plugin
[7/38]: enabling IPA enrollment plugin
[8/38]: enabling ldapi
[9/38]: disabling betxn plugins
[10/38]: configuring uniqueness plugin
[11/38]: configuring uuid plugin
[12/38]: configuring modrdn plugin
[13/38]: enabling entryUSN plugin
[14/38]: configuring lockout plugin
[15/38]: creating indices
[16/38]: enabling referential integrity plugin
[17/38]: configuring ssl for ds instance
[18/38]: configuring certmap.conf
[19/38]: configure autobind for root
[20/38]: configure new location for managed entries
[21/38]: restarting directory server
[22/38]: adding default layout
[23/38]: adding delegation layout
[24/38]: adding replication acis
[25/38]: creating container for managed entries
[26/38]: configuring user private groups
[27/38]: configuring netgroups from hostgroups
[28/38]: creating default Sudo bind user
[29/38]: creating default Auto Member layout
[30/38]: adding range check plugin
[31/38]: creating default HBAC rule allow_all
[32/38]: Upload CA cert to the directory
[33/38]: initializing group membership
[34/38]: adding master entry
[35/38]: configuring Posix uid/gid generation
[36/38]: enabling compatibility plugin
[37/38]: tuning directory server
[38/38]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring Kerberos KDC (krb5kdc): Estimated time 30 minutes 30 seconds
[1/10]: adding sasl mappings to the directory
[2/10]: adding kerberos container to the directory
[3/10]: configuring KDC
[4/10]: initialize kerberos container
[5/10]: adding default ACIs
[6/10]: creating a keytab for the directory
[7/10]: creating a keytab for the machine
[8/10]: adding the password extension to the directory
[9/10]: starting the KDC
[10/10]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
[1/2]: starting kadmin
[2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa_memcached
[1/2]: starting ipa_memcached
[2/2]: configuring ipa_memcached to start on boot
Done configuring ipa_memcached.
Configuring the web interface (httpd): Estimated time 31 minutes
[1/13]: setting mod_nss port to 443
[2/13]: setting mod_nss password file
[3/13]: enabling mod_nss renegotiate
[4/13]: adding URL rewriting rules
[5/13]: configuring httpd
[6/13]: setting up ssl
[7/13]: setting up browser autoconfig
[8/13]: publish CA cert
[9/13]: creating a keytab for httpd
[10/13]: clean up any existing httpd ccache
[11/13]: configuring SELinux for httpd
[12/13]: restarting httpd
[13/13]: configuring httpd to start on boot
Done configuring the web interface (httpd).
Applying LDAP updates
Restarting the directory server
Restarting the KDC
Configuring DNS (named)
[1/9]: adding DNS container
[2/9]: setting up our zone
[3/9]: setting up reverse zone
[4/9]: setting up our own record
[5/9]: setting up kerberos principal
[6/9]: setting up named.conf
[7/9]: restarting named
[8/9]: configuring named to start on boot
[9/9]: changing resolv.conf to point to ourselves
Done configuring DNS (named).

Global DNS configuration in LDAP server is empty
You can use 'dnsconfig-mod' command to set global DNS options that
would override settings in local named.conf files

Restarting the web server
==============================================================================
Setup complete

Next steps:
1. You must make sure these network ports are open:
TCP Ports:
* 80, 443: HTTP/HTTPS
* 389, 636: LDAP/LDAPS
* 88, 464: kerberos
* 53: bind
UDP Ports:
* 88, 464: kerberos
* 53: bind
* 123: ntp

2. You can now obtain a kerberos ticket using the command: 'kinit admin'
This ticket will allow you to use the IPA tools (e.g., ipa user-add)
and the web user interface.

Be sure to back up the CA certificate stored in /root/cacert.p12
This file is required to create replicas. The password for this
file is the Directory Manager password

Comment 21 Steeve Goveas 2013-01-24 11:57:13 UTC
[root@ratchet ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
2620:52:0:41ce:5054:ff:fea6:ec8 ratchet.testrelm.com ratchet
2620:52:0:41ce:5054:ff:fe3b:c68b sideswipe.testrelm.com sideswipe

[root@ratchet ~]# ip addr del 10.65.206.82 dev eth0
Warning: Executing wildcard deletion to stay compatible with old scripts.
Explicitly specify the prefix length (10.65.206.82/32) to avoid this warning.
This special behaviour is likely to disappear in further releases,
fix your scripts!
[root@ratchet ~]# ip addr del 127.0.0.1 dev lo
Warning: Executing wildcard deletion to stay compatible with old scripts.
Explicitly specify the prefix length (127.0.0.1/32) to avoid this warning.
This special behaviour is likely to disappear in further releases,
fix your scripts!
[root@ratchet ~]# ifconfig | grep inet
inet6 addr: 2620:52:0:41ce:5054:ff:fea6:ec8/64 Scope:Global
inet6 addr: fe80::5054:ff:fea6:ec8/64 Scope:Link
inet6 addr: ::1/128 Scope:Host

[root@ratchet ~]# ipa-replica-install replica-info-ratchet.testrelm.com.gpg
Directory Manager (existing master) password:

Run connection check to master
Check connection from replica to remote master 'sideswipe.testrelm.com':
Directory Service: Unsecure port (389): OK
Directory Service: Secure port (636): OK
Kerberos KDC: TCP (88): OK
Kerberos Kpasswd: TCP (464): OK
HTTP Server: Unsecure port (80): OK
HTTP Server: Secure port (443): OK

The following list of ports use UDP protocol and would need to be
checked manually:
Kerberos KDC: UDP (88): SKIPPED
Kerberos Kpasswd: UDP (464): SKIPPED

Connection from replica to master is OK.
Start listening on required ports for remote master check
Get credentials to log in to remote master
admin password:

Execute check on remote master
Check connection from master to remote replica 'ratchet.testrelm.com':
Directory Service: Unsecure port (389): OK
Directory Service: Secure port (636): OK
Kerberos KDC: TCP (88): OK
Kerberos KDC: UDP (88): OK
Kerberos Kpasswd: TCP (464): OK
Kerberos Kpasswd: UDP (464): OK
HTTP Server: Unsecure port (80): OK
HTTP Server: Secure port (443): OK

Connection from master to replica is OK.

Connection check OK
Configuring NTP daemon (ntpd)
[1/4]: stopping ntpd
[2/4]: writing configuration
[3/4]: configuring ntpd to start on boot
[4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv): Estimated time 31 minutes
[1/31]: creating directory server user
[2/31]: creating directory server instance
[3/31]: adding default schema
[4/31]: enabling memberof plugin
[5/31]: enabling winsync plugin
[6/31]: configuring replication version plugin
[7/31]: enabling IPA enrollment plugin
[8/31]: enabling ldapi
[9/31]: disabling betxn plugins
[10/31]: configuring uniqueness plugin
[11/31]: configuring uuid plugin
[12/31]: configuring modrdn plugin
[13/31]: enabling entryUSN plugin
[14/31]: configuring lockout plugin
[15/31]: creating indices
[16/31]: enabling referential integrity plugin
[17/31]: configuring ssl for ds instance
[18/31]: configuring certmap.conf
[19/31]: configure autobind for root
[20/31]: configure new location for managed entries
[21/31]: restarting directory server
[22/31]: setting up initial replication
Starting replication, please wait until this has completed.
Update in progress
Update in progress
Update in progress
Update in progress
Update succeeded
[23/31]: adding replication acis
[24/31]: setting Auto Member configuration
[25/31]: enabling S4U2Proxy delegation
[26/31]: initializing group membership
[27/31]: adding master entry
[28/31]: configuring Posix uid/gid generation
[29/31]: enabling compatibility plugin
[30/31]: tuning directory server
[31/31]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring Kerberos KDC (krb5kdc): Estimated time 30 minutes 30 seconds
[1/9]: adding sasl mappings to the directory
[2/9]: writing stash file from DS
[3/9]: configuring KDC
[4/9]: creating a keytab for the directory
[5/9]: creating a keytab for the machine
[6/9]: adding the password extension to the directory
[7/9]: enable GSSAPI for replication
[8/9]: starting the KDC
[9/9]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
[1/2]: starting kadmin
[2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa_memcached
[1/2]: starting ipa_memcached
[2/2]: configuring ipa_memcached to start on boot
Done configuring ipa_memcached.
Configuring the web interface (httpd): Estimated time 31 minutes
[1/12]: setting mod_nss port to 443
[2/12]: setting mod_nss password file
[3/12]: enabling mod_nss renegotiate
[4/12]: adding URL rewriting rules
[5/12]: configuring httpd
[6/12]: setting up ssl
[7/12]: publish CA cert
[8/12]: creating a keytab for httpd
[9/12]: clean up any existing httpd ccache
[10/12]: configuring SELinux for httpd
[11/12]: restarting httpd
[12/12]: configuring httpd to start on boot
Done configuring the web interface (httpd).
Applying LDAP updates
Restarting the directory server
Restarting the KDC
Restarting the web server


Server and Replica both installed successfully

Verified with version ipa-server-3.0.0-23.el6.x86_64

Comment 23 errata-xmlrpc 2013-02-21 09:32:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0528.html