FreeBSD, OpenLDAP and the boot process (II)
August 2018
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (10 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

31 octubre
2008

FreeBSD, OpenLDAP and the boot process (II)

there it is again! arrrggg

As one of the things that scares me the most, the FreeBSD, OpenLDAP and the boot process thing is back!

This time, I had to reboot that faulty server because of a kernel panic caused by a usb-connected external hd. I just noticed some noise in /var/log/messages:

Oct 31 17:06:37 PXGOServer kernel: g_vfs_done():da1s1d[WRITE(offset=6144000, length=14336)]error = 6
Oct 31 17:06:47 PXGOServer kernel: g_vfs_done():da1s1e[WRITE(offset=6144000, length=8192)]error = 6
Oct 31 17:09:33 PXGOServer kernel: g_vfs_done():da1s1e[READ(offset=114688, length=16384)]error = 6
Oct 31 17:09:33 PXGOServer kernel: g_vfs_done():da1s1d [READ(offset=114688, length=16384)]error = 6
Oct 31 17:09:38 PXGOServer kernel: g_vfs_done():da1s1d[READ(offset=114688, length=16384)]error = 6

and BAM, a panic there.

Of course, rebooting the server took too much time (as always), so I decided to take another deep look into the problem (as I've done before).

But this time, I'll try to solve the problem from another point of view. Let's try to force slapd to be booted early in the boot process.

Just two links to understand it better:

(If you are used to manage FreeBSD servers, you probably know them already).

After some research (20-30 minutes), I found a quick solution, I just had to modify /usr/local/etc/rc.d/slapd to change two lines:

# REQUIRE: NETWORKING SERVERS
# BEFORE: securelevel

to

# REQUIRE: NETWORKING
# BEFORE: SERVERS securelevel

What does this mean?

It's pretty easy to understand. The first two lines set that slapd needed every rc script in the NETWORKING (aka, setting up network interfaces, routing tables, etc) and SERVERS (aka named, mountd, sendmail, etc) groups to be running before trying to start it, while slapd itself should be started before the securelevel rc script.

After my change, slapd only needs rc scripts in the NETWORKING group to be already started and it will be started before any other server rc script.

A quick reboot and I noticed that slapd was started before every other service (including named, sendmail, mountd, sshd, apache, zope, postgresql and some other ones).

Everything was fine, but there is still a delay, cause while starting slapd itself, the system still tries to connect to the OpenLDAP database in order to find the user resposible for running the slapd process... (WTF!, that's the process you are trying to start!).

Posted by wu at 17:41 | Comments (0) | Trackbacks (0)
<< Halloween skin | Main | Plone World Day 2008 >>
Comments
There are no comments.
Trackbacks
Please send trackback to:http://blog.e-shell.org/118/tbping
There are no trackbacks.
Post a comment