Friday, October 17, 2014

Recovering from "database is being taken offline and cannot be opened" on Domino Server

Today in the morning many users cannot access the Domino Server because they get the error message "database is being taken offline and cannot be opened". In the Server tasks we see that the DBMT task hangs on a database. Our Domino admin has restarted the server to solve the problem with no success. The databases which are not accessible have a xxx.tmp file with the exact same size as the nsf file. We have tried to remove the xxx.tmp file, but the databases are still offline. Even the normal procedures to recover from database corruption like "compact, fixup, updall" did not help to solve this problem.

So i dig deeper and found out that there is a C API to bring databases offline and online again. I am not a C expert, but fortunately it is possible to call this API from lotus script. I wrote a small agent in a test database on the server which executes the API on the databases which are not accessible. For example:

Option Public
Option Declare

Declare Private Function NSFBringDatabaseOnline Lib "nnotes" Alias "NSFBringDatabaseOnline" (  ByVal dbPath As String, ByVal Z As Long) As Integer
Sub Initialize
 Call NSFBringDatabaseOnline("mail/hugo.nsf",0)
 Call NSFBringDatabaseOnline("mail/heinz.nsf",0)
 Call NSFBringDatabaseOnline("db/crm.nsf",0)
End Sub

Be sure that you have checked the option that the agent is allowed to run restricted operations.

 Then run this agent on the server with tell amgr run "agent.nsf" 'agent'. Replace "agent.nsf" and "agent" with the names you have chosen for your agent.

Tuesday, October 14, 2014

Virtual Control Panel in IBM i Access Client solutions

Jesse Gorzinski from IBM has posted a nice article  on developerworks about the many advantages the Virtual Control Panel in IBM i Access Client solutions have over the old on fro IBM i Access for Windows. If you have not already you should really make the switch to the future of IBM i client connection.

How to find the documents which reference a DAOS NLO file.

Yesterday i had the problem that a user who got a new replica of his mail file does not get new mails. Every time he start the replication of his mail file he got the error "File does not exist" in the replicator tab.  The replication log shows that the replica is sending data to the server, but does not get any data from the server.

The error message "File does not exist" on the client does not really help, but there is also an error in the server log which shows the root cause of the problem.

13.10.2014 16:49:37   The database F:\Lotus\Domino\SERVER\mail\user.nsf attempted to access a missing file: f:\lotus\daos\SERVER\0001\3F67501E6AA30F96DACABAC0E1F27E2A8206AA0CC00025069.nlo: File does not exist.

Ok now we know that the problem is a missing NLO file in the DAOS directory. When the client wants to replicate the document which contains the reference to the NLO file the server cannot provide the document because he can not load the attachment. Normally you would restore the missing NLO file from your backup, but what is to do if you are not able to restore this file.

First possible solution is to delete all documents from a database  which have references to missing NLO files with fixup.

load fixup -D -J user.nsf

I do not like this solution, because maybe the document with the missing NLO contains important informations.

So the better solution is to search for the document and decide manually if it is save to permanently remove the document.

Go to the server console and set the configuration variable "DEBUG_DAOS_DIAGNOSTICS" to 1

set configuration DEBUG_DAOS_DIAGNOSTICS=1

There is no restart of the server needed.

Tell the DAOSMGR to create a detailed overview over all NLO's and the corresponding documents.

tell daosmgr LISTNLO MAP -V mail/user.nsf

You will find the created "listnlo.txt" file in the database directory of the server. In our example in "mail". Copy the file to your local workstation and open it in your favorite spreadsheet application for example Libreoffice Calc.

Then you can search for your missing NLO in the RRV_HASHKEY column. The NoteID of the document which references the missing NLO file is in the second column (DOC_NOTEID_HEX).

Now you can search for the NoteID in the Administrator client and fortunately in my case it was only a spam mail which was save to remove from the database.

After that the replication of the database worked again without a problem.

Do not forget to disable the debug variable with

set configuration DEBUG_DAOS_DIAGNOSTICS=0

Saturday, October 11, 2014

Nice Partnership betweeen Apple and IBM in mobile business

Hey IBM really a nice partnership between you and Apple in the mobile business. First IOS release after the announcement of the partnership kills the mobile controls of xPages in Domino and IBM needs three weeks to get a technote out of the door that says that they need additional time to solve the problem with a interim fix.

Maybe you should announce a partnership with google in the browser business and a few weeks after that google releases a new Chrome browser which kills your web based products ;-)

 Repeat after me: "Apple will never be a fair partner"

Wednesday, October 1, 2014

Everything you always wanted to know about PTF handling on IBM i but were afraid to ask

In the moment i prepare the image catalogs for PTF installation on our IBM i. When i have searched for some info's on PTF's i have found a really great presentation about PTF Management on the IBM i. So if you want to know how PTF's on the IBM i work and what to do to keep your system running, i really recommend "Managing your IBM i PTF's" from Larry Bolhuis.