ClearOS Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Trouble Initializing OpenLDAP Directory

Some users may experience difficulty initializing their directory. This will show up as an error in Webconfig. This is usually due to one of the following factors:

  • updates were not properly applied
  • nameservers don't work properly
  • server hosts file does NOT match the hostname address of the server

Prefix Sanity Checks

updates

Drop to command line on the server and run the following to ensure updates are applied.

yum update

For good measure, restart the server (especially if a new kernel was applied).

resolv.conf

Make sure your nameservers are correct and working:

[root@cbox6 ~]# cat /etc/resolv.conf 
nameserver 8.8.8.8
nameserver 8.8.4.4

Test these:

[root@cbox6 ~]# dig @8.8.8.8 www.google.com
[root@cbox6 ~]# dig @8.8.4.4 www.google.com

You should get a reply similar to this:

; <<>> DiG 9.6-ESV-R4-P3 <<>> @8.8.8.8 www.google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9181
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.			IN	A

;; ANSWER SECTION:
www.google.com.		43199	IN	CNAME	www.l.google.com.
www.l.google.com.	299	IN	A	74.125.227.16
www.l.google.com.	299	IN	A	74.125.227.18
www.l.google.com.	299	IN	A	74.125.227.19
www.l.google.com.	299	IN	A	74.125.227.17
www.l.google.com.	299	IN	A	74.125.227.20

;; Query time: 90 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Aug 27 17:19:48 2012
;; MSG SIZE  rcvd: 132

If these tests fail, you will get a message like this:

[root@cbox6 ~]# dig @1.1.1.1 www.google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> @1.1.1.1 www.google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Fix the DNS issue by modifying the /etc/resolv.conf file with valid and working name servers and then continue on.

hosts

An improper hosts file can also cause grief. Make sure that the name for your server matches the IP address contained in /etc/hosts. For example, my box is named cbox6.clearos.com.

[root@cbox6 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.13 cbox6.clearos.com 

This name matches this interface:

eth0      Link encap:Ethernet  HWaddr 00:90:FB:29:C9:68  
          inet addr:192.168.1.13  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::290:fbff:fe29:c968/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:1441640 errors:0 dropped:0 overruns:0 frame:0
          TX packets:335911 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:280533152 (267.5 MiB)  TX bytes:73915410 (70.4 MiB)
          Interrupt:16 Memory:fe6e0000-fe700000 

If the information does not match, please update /etc/hosts so that it does.

Fix

This fix WILL destroy any directory objects. Do not apply it to a system unless you are sure that the existing directory can be destroyed.

Run the following command to reinitialize the directory:

app-openldap-directory-initialize -f

Help

content/en_us/kb_troubleshooting_trouble_initializing_directory.txt · Last modified: 2014/12/18 17:04 (external edit)

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Akb_troubleshooting_trouble_initializing_directory&1563787187