Friday, December 15, 2017

How to locate a document with a bad NLO reference (or What to do when fixup -d -j fails)

A user has a local mail database. Every time it replicates with the mail server, replication takes 5-8 minutes as it tries repeatedly to replicate the same 1500+ documents. Running fixup, compact, updall against the mail database on the server revealed this error message:
The database <pathname>.nsf attempted to access a missing file: H:\DAOS\0007\E5128368DF400D54DE01F369AFAAF560FCB85F350007FAC9.nlo: File does not exist
It seems that the replication process was getting hung up because of a document contained an invalid NLO reference.
The quick and dirty way to deal with a problem like this is to issue the following fixup command, which deletes documents that contain invalid NLO references:
load fixup -d -j <pathname>.nsf
This command did not, however, resolve the problem for us because (I discovered later) the problem document included two attachments, both pointing to NLO objects. But the second pointer was valid, so fixup decided not to delete the document.
The solution to this problem was to locate the document that had the bad NLO reference. Here is the way to do that:
  1. Set the following notes.ini variable on the mail server (no server restart needed): Debug_DAOS_Diagnostics=1
  2. Run the following command at a console prompt: Tell DAOSMgr listnlo MAP -V <pathname>.nsf
    • This causes the creation in the mail server's Data folder of a text file, listnlo.txt, that contains a list of all NLO references in <pathname>.nsf.
  3. Make a local copy of listnlo.txt. It is a comma-delimited file. Open it in a spreadsheet program or a text editor.
  4. Search for the NLO's hash key, which is the file name of the NLO file.
    • In my case, I searched for "E5128368DF400D54DE01F369AFAAF560FCB85F350007FAC9".
  5. The Note ID (hex format) of the document appears in the second column of the row that contains the search term.
  6. In Domino Administrator under the Files tab, select the database in question and use Find Note (Tools pane, Database section) to find the problem document by its Note ID. Alternatively you can use a third-party tool, such at Ytria's ScanEZ.
  7. Open the subject database on the mail server and use the information provided by the Find Note dialog (document date, subject, etc.) to locate the problem document in the database.
  8. Decide what to do about the problem document. Possible fixes include:
    • Delete the problem document.
    • Delete the problem attachment from the document.
    • Restore the problem attachment from backup.
  9. Optional but recommended: Reset  the notes.ini variable, Debug_DAOS_Diagnostics, to 0 or NULL.
    • se co Debug_DAOS_Diagnostics=0; OR
    • se co Debug_DAOS_Diagnostics=
Thanks to the following bloggers for this fix: Cristian D'Aloisio, Ralf Petter, Ulrich Krause

Copyright 2017 by Rob Kirkland

No comments:

Post a Comment