LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2008, 08:18 PM   #1
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Rep: Reputation: 30
ldap wont start after drive migration


hi there,

i have just migrated to a new hard drive but now my ldap servr wont start at boot up or using /etc/init.d/ldap start.

when i run /etc/init.d/ldap start it will return

Starting ldap-serverstartproc: exit status of parent of /usr/lib/openldap/slapd: 1

ldap will start if i use /usr/lib/openldap/slapd

thanks

berrance
 
Old 09-08-2008, 05:52 AM   #2
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Original Poster
Rep: Reputation: 30
im having no look googling this problem, i just dont understand why "/usr/lib/openldap/slapd" should start ldap when "/etc/init.d/ldap start" doesnt start it.

this is a very larg problem as all user info, samba info, dns records, dhcp info, cyrus info, and sveral other bits and bobs are stored there.

berrance
 
Old 09-08-2008, 06:35 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,768

Rep: Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843
Most likely there is a pid file somewhere that make init script to fail. Check under /var/run/slapd or /var/run to see if you find it and delete it. You can also try any of the following if you cannot find the pid file
Code:
/etc/init.d/ldap stop
service ldap stop
sevice ldap status
Regards
 
Old 09-08-2008, 06:56 AM   #4
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Original Poster
Rep: Reputation: 30
i can use "/etc/init.d/ldap stop/status" to check or stop the service its just i cannot start it this way, like the way it would start at boot up.

the pid file in /var/run is there but when i stop the service it does go like it is supposed to.

its a tricky one is this!

berrance
 
Old 09-08-2008, 08:11 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,768

Rep: Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843
You bet it's tricky. I guess there is something wrong with the suffixes or somethng.
Anyway to debug this, open /etc/init.d/ldap (make sure you keep a backup copy just in case), locate the line that starts slapd (the one that begins with /sbin/startproc -t 1 ...) and add "-d 7" among the other slapd arguments:
Code:
/sbin/startproc -t 1 -p /var/run/slapd/slapd.pid $SLAPD_BIN -d 7 -h "$SLAPD_URLS ...

Last edited by bathory; 09-08-2008 at 01:30 PM.
 
Old 09-08-2008, 09:14 AM   #6
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Original Poster
Rep: Reputation: 30
ok that prints loads of output to much to post but this bit looks like something

ldap_create
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 9
ldap_prepare_socket: 9
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 9 tm: 30 async: 0
ldap_ndelay_on: 9
ldap_is_sock_ready: 9
ldap_is_socket_ready: error on socket 9: errno: 111 (Connection refused)


and at the end of the output

TLS: could not use key file `/etc/ssl/servercerts/serverkey.pem'.
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637
TLS: error:0200100D:system library:fopen:Permission denied bss_file.c:276
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:278
TLS: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib ssl_rsa.c:693
main: TLS init def ctx failed: -1
slapd shutdown: freeing system resources.
slapd stopped.
connections_destroy: nothing to destroy.



if i did a strait copy from 1 disk to another why should of anything have changed?
 
Old 09-08-2008, 10:13 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,768

Rep: Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843
Quote:
TLS: could not use key file `/etc/ssl/servercerts/serverkey.pem'.
...
TLS: error:0200100D:system library:fopen:Permission denied bss_file.c:276
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:278
TLS: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib ssl_rsa.c:693
main: TLS init def ctx failed: -1
To me it looks like a permissions problem.
Quote:
if i did a strait copy from 1 disk to another why should of anything have changed?
You should preserve files/directories permissions. Also make sure that the user under which slapd runs can read those certificates.
 
Old 09-08-2008, 10:29 AM   #8
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Original Poster
Rep: Reputation: 30
thank you looks like it got it,

and the way i copied the from one drive to another was by using a live cd and mounting both partitions and cp -a /hd1 /hd2 didnt us dd as i was migrating to a smaller drive. i was told after i asked severel times that cp -a would preserve permissions oh well i have got there in the end

many thanks for your help


berrance
 
Old 09-08-2008, 10:33 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,768

Rep: Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843Reputation: 1843
Glad to see you've done it.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Migration from NIS to LDAP??? ajeetraina Linux - Server 2 02-04-2008 07:51 AM
Domain migration 2K3 to samba ldap procfs Linux - Security 1 07-17-2006 02:29 AM
Samb/LDAP sambaLDAP migration difwrent domains procfs Linux - General 5 07-11-2006 02:21 AM
Hard Drive Migration wdingus Linux - General 2 04-07-2005 02:19 PM
migration from windows active directory to linux ldap spyghost Linux - Networking 1 08-01-2004 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration