One of my teachers decided to move things around and plugged a network cable in the wrong place causing a network loop and it seems to have ended up corrupting my ldap database.
Where are the log files from slapd at and/or how do I read them?
I did a 'slapd -d -1' and the pages just keep flying by and never stop without a ctrl-c. I have run a slapd_db_recover on this Fedora 10 box, but that did not seem to fix the problem I guess.
I did slapcat the directory to an ldif file yesterday, but I am wondering if it did not already contain some bad data. I may see if I can slapadd it back in if ldap does not have to be running. If it does then I will have to do something else.
Thanks for any info. Took me 7 hours to track down the intermittent problems yesterday since it seemed to be server problems and now I am starting out again on the same track it seems.
Hi Scott,
on my SLES11 Box the logfiles are written into /var/log/messages. That seems to be the default on my box, but could differ on yours.
You can set higher and lower loglevel with doubled numbers, i.e. slapd "-d -256" could be a good idea see some usable stuff. :)
Bye.
On Wed, Feb 3, 2010 at 15:13, sgmayo@mail.bloomfield.k12.mo.us wrote:
One of my teachers decided to move things around and plugged a network cable in the wrong place causing a network loop and it seems to have ended up corrupting my ldap database.
Where are the log files from slapd at and/or how do I read them?
I did a 'slapd -d -1' and the pages just keep flying by and never stop without a ctrl-c. I have run a slapd_db_recover on this Fedora 10 box, but that did not seem to fix the problem I guess.
I did slapcat the directory to an ldif file yesterday, but I am wondering if it did not already contain some bad data. I may see if I can slapadd it back in if ldap does not have to be running. If it does then I will have to do something else.
Thanks for any info. Took me 7 hours to track down the intermittent problems yesterday since it seemed to be server problems and now I am starting out again on the same track it seems.
-- Scott Mayo - System Administrator Bloomfield Schools PH: 573-568-5669 FA: 573-568-4565
Question: Because it reverses the logical flow of conversation. Answer: Why is putting a reply at the top of the message frowned upon?
sgmayo@mail.bloomfield.k12.mo.us schrieb:
One of my teachers decided to move things around and plugged a network cable in the wrong place causing a network loop and it seems to have ended up corrupting my ldap database.
Where are the log files from slapd at and/or how do I read them?
if your syslog(-ng) is not configured to log slapds output via syslog facility local4 to an explicit file, take a look in /var/log/messages (e.g. with "tail -n <numberoflines> <file> | grep slapd"). maybe you have to adjust your (olc)loglevel according to man 5 slapd.conf (static config) or man 5 slapd-config (dynamic)
I did a 'slapd -d -1' and the pages just keep flying by and never stop without a ctrl-c. I have run a slapd_db_recover on this Fedora 10 box, but that did not seem to fix the problem I guess.
I did slapcat the directory to an ldif file yesterday, but I am wondering if it did not already contain some bad data. I may see if I can slapadd it back in if ldap does not have to be running. If it does then I will have to do something else.
Thanks for any info. Took me 7 hours to track down the intermittent problems yesterday since it seemed to be server problems and now I am starting out again on the same track it seems.
On Wed, Feb 03, 2010 at 08:13:36AM -0600, sgmayo@mail.bloomfield.k12.mo.us wrote:
One of my teachers decided to move things around and plugged a network cable in the wrong place causing a network loop and it seems to have ended up corrupting my ldap database.
That seems a bit unlikely to cause corruption on its own, but if power also got replugged without shutting down properly then it could well happen.
Where are the log files from slapd at and/or how do I read them?
Do you mean human-readable logs of what has happenned, or database redo/rollback logs?
You may not have any human-readable logs at all: it depends on the setting of the 'loglevel' key in slapd.conf and on the configuration of your syslog daemon.
I did a 'slapd -d -1' and the pages just keep flying by and never stop without a ctrl-c.
Using -1 turns on every possible sort of debug output, which is far too much for this job. I would suggest using '-d 768' which is enough to put the server into debug mode and show you the main parameters of each operation. That may give you a clue about what is happenning.
Note that Fedora probably adds other parameters when it starts slapd, and some of them are probably essential so you must include them when you test it.
I have run a slapd_db_recover on this Fedora 10 box, but that did not seem to fix the problem I guess.
You have not said exactly what the problem is and what the symptoms are: that would help.
I did slapcat the directory to an ldif file yesterday, but I am wondering if it did not already contain some bad data. I may see if I can slapadd it back in if ldap does not have to be running. If it does then I will have to do something else.
Slapadd should be run with slapd stopped.
I would suggest that you do NOT re-add the data on top of the existing database. For safer testing, do something like this:
1) Make sure that slapd is stopped
2) Find the database directory and move it aside. This preserves the old data.
3) Create a new database directory and make sure that the permissions and ownership match the original.
4) If there was a DB_CONFIG file in the original database directory, then copy it to the new one.
5) Use slapadd to load in the data that you had saved in the LDIF file. If slapd was started with parameters giving a non-default database loaction etc then you will need to provide those same parameters to slapadd.
6) Start slapd. If it still does not start, try with '-d 768' and look at the output.
Andrew
openldap-technical@openldap.org