Search This Blog

Monday, December 6, 2021

db.createdocumentcollection()

 Hi

This is unbelievable.

After 20 years of working with Notes I found out that there always was a method db.createdocumentcollection() for creating a blank collection.

Why the hell neither IBM nor HCL included it into documentation and made it public? 

Previously I always got an empty collection by either ran search with query which for sure would return nothing or used db.GetProfileDocCollection() - both these approaches worked well but made the code less obvious/self-explaining.


Dim s As New NotesSession
Dim db As notesdatabase
Dim col As notesdocumentcollection
Set db = s.currentdatabase
Set col = db.createdocumentcollection()

Wednesday, November 24, 2021

TSM failed after installing FP3 for Domino V11

 Hi

We installed FP3 for Domino V11 this summer and when we needed to restore some db from the backup TSM failed to do it (though it previously worked OK). The error was:


ACD0004E An unknown error has been detected.
Warning! Error initializing the connection to the TDP library
Could not connect to the Domino server

I googled this article: https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0090343&sys_kb_id=0ace67511bc03050a67e9759bc4bcb61 which provided an explanation and in my case the solution was to add 

SharedMemoryAllowOnly=0 

into server's notes.ini

Sunday, August 8, 2021

Do not use NotesRichTextItem.ConvertToHTML() or use it but be ready it will be removed in the future release.

 Hi

Just a suggesstion.

Since R9(?) it was possible to use NotesRichTextItem.ConvertToHTML(), see its description here: https://help.hcltechsw.com/dom_designer/9.0.1/appdev/H_CONVERTOHTML_METHOD_NOTESRICHTEXTITEM.html

It was kind of relief to be able to use a native API instead of making those custom solutions based on MIME/DXL/XmlHttpRequest/...

However, later we noticed that every call of NotesRichTextItem.ConvertToHTML() in server agent showed this message in the Domino console: 

        CSRF Init: iNotes_WA_Security_ReturnUrlCheck> c_CSRFReturnUrlCheck: 1

It is very easy to reproduce it. Create an agent which works in server's context (run it from console or by schedule) and write something like Dim s As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim rtItem As NotesRichTextItem Dim html As String Set db = s.Currentdatabase Set doc = db.Alldocuments.Getfirstdocument() '<-- This is a doc with richtextitem Body Set rtItem = doc.Getfirstitem("Body") html = rtItem.convertToHTML() Domino console has to show: [0AB8:0025-08E8] 31-05-2021 16:32:21,71 CSRF Init: iNotes_WA_Security_ReturnUrlCheck> c_CSRFReturnUrlCheck: 1 [0AB8:0025-08E8] 31-05-2021 16:32:21 AMgr: Start executing agent 'testAgent' in 'test\test.nsf' [0AB8:0025-08E8] iNotes Init: Credential Store Configuration not enabled, less secure mode. [0AB8:0025-08E8] 31-05-2021 16:32:22 AMgr: Agent 'testAgent' in 'test\test.nsf' completed execution We have a big database with several RichTextItems in every document and for every such item in every document a scheduled agent does some magic and uses rtItem.convertToHTML() - Domino console spams million of such messages for more than 1 hour.

I contacted HCL regarding this and they said that they forgot to hide this method: it is not supported and will be removed in a future release, though it was reproduced even in R12.


DDM probes + Cluster Replicator + intensively used database = Database open error: [filepath.nsf]: Database is currently in use by you or another user

 Hi

Here it is a thing which I spent a few days on.

We had two Domino R11.0.1 FP3 in a cluster. Then we added a 3rd Domino server of the same version into the cluster and after that we started to see many errors like that:

08-08-2021 18:09:53   Database open error: <filepath.nsf>: Database is currently in use by you or another user
08-08-2021 18:09:53   Database open error: <filepath.nsf>: Database is currently in use by you or another user
08-08-2021 18:09:53   Database open error: <filepath.nsf>: Database is currently in use by you or another user
08-08-2021 18:09:53   Database open error: <filepath.nsf>: Database is currently in use by you or another user
08-08-2021 18:09:53   Database open error: <filepath.nsf>: Database is currently in use by you or another user

Despite the errors in logs, all our applications worked OK, we didn't have any consequences of this error except that it was very hard to use log.nsf, because we could get ~5K such messages per day. The errors referred to a few different databases, but not to all databases we had. The errors were logged on all three Domino-servers. 

I googled and found these two articles without a solution:

So, at the end of the day I didn't find anything helpful in the Internet, except the point that the error message was produced by Cluster Replicator. My first attempts to resolve it myself ended up with nothing, so I decided to contact HCL. 

Unfortunatelly, they couldn't help me either, they suggested some basic advices, like try to delete the database and then replicate it again, try to restart Cluster Replicator and so on.

So, I didn't have any choice except trying to resolve it myself. 

After spending two days on that I discovered that the reason of the issues were DDM probes. We always used DDM probes for server monitoring and didn't change anything there for a long time, that's why it was so hard to catch that but after I disabled them - the error messages stopped to appear.

Now, let me tell you my explanation which is a pure theory but looks reasonable to me.

We rolled out 3rd Domino server because we planned to run a new Web-application which had to attract many new users in the Internet and we wanted to be sure that our Domino-environment would handle the increased workload - we were using external load balancer which had to route users to our Domino cluster and 3rd Domino had to help a lot. 

After we added a 3rd Domino, we ran the application as well and we got more Web-users as we expected.  So, basically, what happened: 

  • More users than before worked with just a few databases (kind of an entry point for the new Web-application);
  • Three Cluster Replicators (instead of two) pushed data to replicas on other servers and they had to do it often than before;
  • DDM worked without changes but it seemed the server tasks executing DDM probes needed to have an exclusive access to the database for a short period;
  • Cluster Replicators worked intensively with a few databases and often failed to open the databases while DDM probes were running and therefore Cluster Replicator showed that message and kept the changes in memory until it would be possible to open the database later.
That's basically it.
Maybe there were specific probes which caused this message, I did not check that, I only tested that: 
  • disabling of probes disabled the messages 
  • enabling the same probes back returned the messages back as well
It is hard even to ask HCL to fix anything because it is good to be able to see such messages, - they can help to identify important issues but on another hand when you get log.nsf spammed with 5K messages per day it is not acceptable either. The only idea is - maybe it makes sense to introduce another notes.ini parameter which could suppress the message, not sure.



Sunday, October 18, 2020

HCL/IBM Notes does not work well with Segoe UI Emoji font family

 Hey


Let's go straight to the example.

I send email from my Exchange mailbox to my IBM Lotus Notes mailbox and that email contains smiling icon.

Email source (in Outlook) looked like that:

<html xmlns:v="urn:schemas-microsoft-com:vml" (cut some)>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
.....
@font-face
{font-family:"Segoe UI Emoji";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
.....
</style></head>
<body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=NO-BOK>Bla bla bla </span><span lang=NO-BOK style='font-family:"Segoe UI Emoji",sans-serif'>&#128522;</span><span lang=NO-BOK><o:p></o:p></span></p></div></body></html>


Here it is what I got in Notes in READ mode (looked good)


However, as soon as I switched email to EDIT mode or clicked REPLY WITH HISTORY the icon disappeared and ? appeared instead.


I think Lotus Notes just does not how to deal with colorful "Segoe UI Emoji" font family but if you know how to fix that - please share. The main issue is that this is a common problem, I mean, if you try to create NotesMIMEEntity programmatically and put there HTML with &#128522; you will get the same result.

------------------------------------------------------------------------------------------
Updated later.

I tested this case more and found some new interesting details.

The email I used for demo above I received as an example from a colleague so when I described the case above I just played with already received email.

When I tried to create an email in Outlook myself and checked its source I didn't find there any HTML codes for the icons - instead I saw this - see below.


I sent the email above to my Notes mailbox.
It looked very good in READ mode and the icons were still usable in EDIT mode though they became black and white.

Read mode above


Edit mode above

So, obviously, the reason of the issue described on the very top is not related to Segoe UI Emoji font family. The reason is that Notes does not know how to render <span lang=NO-BOK style='font-family:"Segoe UI Emoji",sans-serif'>&#128522;</span> in Richtextitem in Edit mode. I do not know how that first email was created so that it contained HTML code &#128522; but it does not really matter.

Btw, the funny thing is that the same email in Gmail looks differently also :-)
Here it is the same email from outside - the last icon is black&white.


This is the same email from inside.






Monday, October 5, 2020

After migrating Domino9 to Domino11 an error "Error full text indexing document NT00000000 (rc=3859) Database is currently being indexed by another process" appeared in Domino console.

 Hi


Just to save someone's day: after migrating Domino9 to Domino11 some of our Xpages-based apps which ran NotesAgents started to print a new error message to console:


After migrating Domino9 to Domino11 an error "Error full text indexing document NT00000000 (rc=3859) Database is currently being indexed by another process" appeared in Domino console:



I fixed it by adding FT_SUPPRESS_AUTO_UPDATING=1 to server's notes.ini.

Took solution from here: http://blog.nashcom.de/nashcomblog.nsf/dx/notesdomino-10-ft-index-auto-update.htm?opendocument&comments

Thursday, September 24, 2020

Do you know how to fix the problem that Domino server is not able to decrypt fields in NotesDocument encrypted with its public key?

 Hello

I am expiriencing a problem that one of my Domino-servers can't read encrypted field(s) from SSO configuration documents. 

I did it tones of times in the past and I am sure I do everything correctly this time as well.

I've added notes.ini parameres to debug SSO and got this:

[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Reading configuration LtpaToken [last read on ], view ($WebSSOConfigs) has changed [last updated on 23.09.2020 01:36:40].

[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Looking for primary Name and Address Book.
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Found [1] Name and Address Book(s), opening first [names.nsf].
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Opened Directory [DHANDLE 0x000000D6], opening configuration view [($WebSSOConfigs)].
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Found view [NOTEID NT0000031E] for view [($WebSSOConfigs)], getting view collection.
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Opened view collection [DHANDLE 0x000000D1], searching for config [LtpaToken]
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Found note [NOTEID NT00006DB2] for config [LtpaToken], opening.
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> Opened note [DHANDLE 0x00000019] for config [LtpaToken], decrypting.
[59771:00002-4091922128] 24.09.2020 17:48:31,32 SSO API> ERROR: when reading configuration [You cannot access portions of this document because it is encrypted and was not intended for you, or you do not have the decryption key.].

The funny thing is that Domino Domain contains two servers and another Domino-server does not have any issues - the same Web SSO configuration document works OK there.

I would like to ask you to share any ideas what is worth to check in addition to resolve the problem.
Please fines some details below.

The SSO document contains two server names + my name in "Public Encryption keys" field:

The document is ecnrypted


SSO config is also pretty standard (both servers do not use Internet Documents):
   


As I said - all works well on the second server but the first server can't read SSO keys.

I know how RSA encryption works (at least I think so) and I double checked that public key in server document was exactly the same as it was in its server.id. 


Can you please advice what else to check/try?