Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
slapd fails to start
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
vrm-ol
n00b
n00b


Joined: 04 Jul 2003
Posts: 42
Location: Euskirchen, Germany

PostPosted: Sun Jun 16, 2013 11:23 am    Post subject: slapd fails to start Reply with quote

After some update in the past (opssibly openrc, but not for sure) slapd fails to start after rebooting my system.

Code:

server / # /etc/init.d/slapd start
 * There is a problem with your slapd.conf!
 * ERROR: slapd failed to start

server / # slaptest
51bd9bac hdb_db_open: database "dc=somedb,dc=local": unclean shutdown detected; attempting recovery.
51bd9bac hdb_db_open: database "dc=some,dc=local": recovery skipped in read-only mode. Run manual recovery if errors are encountered.
51bd9bac unable to open file "/var/run/openldap/slapd.pid": 2 (No such file or directory)

server / # ls -lash /var/run/
[...]
4,0K -rw-r--r--  1 root   root      4 16. Jun 12:49 ntpd.pid
   0 drwxrwxr-x 14 root   root    360 16. Jun 12:49 openrc
   0 drwxr-xr-x  2 root   root     80 16. Jun 13:00 pam_mount
[...]


Obviously the dababases are corrupt and the directory "/var/run/openldap/" was not created ... After manually creating /var/run/openldap, setting the correct rights, and repairing the ldap-databases ...

Code:

server / # mkdir /var/run/openldap
server / # chown ldap.ldap /var/run/openldap/
server / # slapindex
51bd9cf7 hdb_db_open: database "dc=somedb,dc=local": unclean shutdown detected; attempting recovery.
server / # chown ldap.ldap /var/lib/openldap-data/__*


... slapd starts again, until the next reboot.

Code:

server / # /etc/init.d/slapd start
 * Starting ldap-server ...                                                                                                                                   [ ok ]


Did I miss in the past anything to do or is it a bug?

TIA
vrm

PS: By the way, clamav showed the same problem (no /var/run/clamav), until i updated clamav to app-antivirus/clamav-0.97.7 Now /var/run/clamav is created ....
PPS: Installed version of openldap is: net-nds/openldap-2.4.30
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Fri Jun 21, 2013 9:25 pm    Post subject: not shutting down on reboot? Reply with quote

If you manually shutdown slapd what happens? Can you reboot without corruption after doing that? It might be that slapd isn't being told to stop or possibly the pid file for the process isn't in the location where everyone expects it.
Back to top
View user's profile Send private message
vrm-ol
n00b
n00b


Joined: 04 Jul 2003
Posts: 42
Location: Euskirchen, Germany

PostPosted: Sat Jun 22, 2013 6:16 am    Post subject: Re: not shutting down on reboot? Reply with quote

vaxbrat wrote:
If you manually shutdown slapd what happens?


slapd shuts down, without any errors.
manually starting again: slapd comes up, no errors, slapd works as ist should.

Quote:

Can you reboot without corruption after doing that?


No. Repair is needed again.

Quote:

It might be that slapd isn't being told to stop or possibly the pid file for the process isn't in the location where everyone expects it.


The whole directory /var/run/openldap is missing after every reboot.

Btw: /var/run is a symlink to /run and /run is a tmpfs filesystem. This changed some time ago, i do not know whitd which update. Other Packages (e.g. clamav) had problems too (now repaired,after updateing clamav), so i think it could be a bug within the init-scripts of net.nds/openldap ...

Any Ideas?


Thanks
vrm
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Mon Jun 24, 2013 1:05 am    Post subject: sounds like a bug then Reply with quote

You could pull slapd out of the init scripts for now and enable local in the default runlevel. Then put a script into /etc/local.d to create /var/run/openldap and then run slapd. Write this up as a bug report if there isn't one out there already.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum