LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 14th, 2008, 06:20 PM
bbennett74 bbennett74 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 bbennett74 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 34 sec
Reputation Power: 0
Angry Frustrating OpenLDAP Problem (Newbie alert!)

Hello everyone.

I'm trying to migrate an OpenLDAP database from one server to another. The old server was using Linux From Scratch and the new Server is using CentOS 5.1. I'm using a "stock" build and doing my best to try and use yum packages where ever possible. The machine was installed with Openldap-servers and openldap-clients installed. Here's my problem.

If I start ldap using the "stock" configuration file, it works fine. When I start it using the config files from the other server on the new server, it segfaults.

Here's the ldap.conf file from the old server that I placed onto the new server:

BASE dc=eb,dc=loc
URI ldap://127.0.0.1

And here's slapd.conf. You'll notice I've commented out the replication portion of things because this is a test box that doesn't have a "partner" to replicate to.

include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/sphinx.schema
include /etc/openldap/schema/samba.schema
include /etc/openldap/schema/qmail.schema
include /etc/openldap/schema/mozilla.schema
include /etc/openldap/schema/pureftpd.schema
#include /etc/openldap/schema/sphinx.schema

pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args


database bdb
suffix "dc=eb,dc=loc"
rootdn "cn=Manager,dc=eb,dc=loc"
rootpw {SSHA}garbagehere
directory /var/openldap/openldap-data
password-hash {MD5}
password-crypt-salt-format "$1$.8s"


#replogfile /etc/openldap/replog
#updatedn "cn=replicator,dc=eb,dc=loc"
#updateref ldap://10.255.255.xx


index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,givenName eq
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
index default sub


#access to attrs=userPassword,sambaLMPassword,sambaNTPassword
# by self write
# by anonymous auth
# by dn="cn=replicator,dc=eb,dc=loc" write
# by * none
#
#access to *
# by dn="cn=replicator,dc=eb,dc=loc" write
# by * read

Now, one of the first things I did was copy over the data files from /srv/ldap to /var/openldap. Then I deleted the alock file. Then I chown -R ldap:ldap /var/openldap to allow for permissions. Just to be on the safe side, I also issued a setsebool -R slapd_disable_trans=0 so that way SELinux wouldn't interfere with it. (Is there some other way I should have done this?)

Now, whenever I try to start it, I get this:
[hptestlin /openldap]# service ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
[ OK ]
Starting slapd: [ OK ]

However, I keep finding that slapd or slurpd are not listed in the process list! /var/log/messages shows this:

Feb 13 16:39:02 hptestlin kernel: slaptest[22371]: segfault at 00002aaaae5a0008 rip 00002aaaaad66982 rsp 00007fffc0e08490 error 4
Feb 13 16:39:02 hptestlin kernel: slapd[22379]: segfault at 00002aaaaaacc008 rip 00002aaaaad66982 rsp 00007fff55738dc0 error 4

Doing a slapd_db_recover -v doesn't make any difference.

Lastly, if I attempt to start slapd manually with a -d 4, I get this:

[hptestlin openldap-data]# slapd -d 4
(#) $OpenLDAP: slapd 2.3.27 (Nov 10 2007 09:23:56) $
:/builddir/build/BUILD/openldap-2.3.27/openldap-2.3.27/build-servers/servers/slapd
daemon_init: <null>
=> ldap_bv2dn(dc=eb,dc=loc,0)
<= ldap_bv2dn(dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=eb,dc=loc)=0
=> ldap_bv2dn(cn=Manager,dc=eb,dc=loc,0)
<= ldap_bv2dn(cn=Manager,dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=Manager,dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=manager,dc=eb,dc=loc)=0
=> ldap_bv2dn(cn=Subschema,0)
<= ldap_bv2dn(cn=Subschema)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=subschema)=0
bdb_db_open: dc=eb,dc=loc
bdb_db_open: unclean shutdown detected; attempting recovery.
Segmentation fault

Then I figured what I had to do (maybe?) was rather than copy over the entire data directory, maybe perhaps there was some sort of a command I was supposed to run to export the data and then use another command to import the data. (slapcat and slapadd)

Exporting the LDIF file worked fine from the old server.

However, this was the result when I tried to import the LDIF file onto the new server:

[hptestlin ~]# slapadd -v -l openldap.ldif
bdb_db_open: unclean shutdown detected; attempting recovery.
Segmentation fault
[hptestlin ~]#

And if I tail /var/log/messages, I get the following:

Feb 14 08:36:25 hptestlin kernel: slapadd[25138]: segfault at 00002aaaae5a0008 rip 00002aaaaad66982 rsp 00007fff9f7d04a0 error 4

As well, the exported LDIF file is only 48K but the actual data directory is somewhere around 260 Megs, so that doesn't sound right.

Should I be using ldapsearch instead to export the database and ldapadd to import it? If so, how can I do that if I can't even get the LDAP server running on the new server?

I'm at my wits end here. Does anyone have any ideas? Does anyone need more information to be able to help out? I've Googled this with no luck and RTFM'ing really isn't any help, at least in the spots I looked in.

Your help is highly appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > Frustrating OpenLDAP Problem (Newbie alert!)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway