mariahelm.com
personal website

mariahelm.com

SNTT: Clear cached server IP addresses

April 20th, 2007 . by maria

Lotus neither recommends nor supports using numeric IP addressing in the Net Address field of the Server document for Domino 4.5x and later. Instead, use the common name of the IP Host or the fully qualified domain name (FQDN) in the Net Address field, which is recommended and supported for all versions of Domino/Notes servers. (Technote: 167941) Depending on your network infrastructure, you should have DNS servers available at each building and/or site, especially with slow or busy WAN links. If DNS servers are not possible, you can use local Host files on the Notes client or remote Domino server systems. Alternatively, you can use local Server Connection documents with the dotted decimal notation (DDN) of the numeric IP address entered in the server address field. Both the Notes client and Domino server can use this Connection document to locate a Domino server without using an IP name resolver.

If IP addresses were used in the Server Docs previously, Notes clients may have cached these IP addresses. When a change is made to the IP address of the server, the Notes client will then be unable to see the server. The $SavedAddresses field in the Location document of the client’s Name and Address Book (NAB) is caching the old value for the server’s address and will not update it. Additionally, nothing you do to HOSTS files or DNS entries from the client will fix the problem.

The solution is to empty the $SavedAddresses field(s). The code below does just that. The first button is designed to be sent to users, and clears the local address book. The second is for Admin use on the public address book.

Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim port As Variant
Set db=session.GetDatabase(””,”NAMES.NSF”)
Set view=db.GetView(”Locations”)
Set doc=view.GetFirstDocument
While Not (doc Is Nothing)
Call doc.RemoveItem(”$SavedAddresses”)
Call doc.RemoveItem(”$SavedPorts”)
Call doc.RemoveItem(”$SavedServers”)
Call doc.save(True,True)
Set doc=view.GetNextDocument(doc)
Wend
Messagebox(”Removing Cached Addressed Completed”)
End Sub

Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim port As Variant
Dim whichserver As String
whichserver=Inputbox$(”Which server?”)
Set db=session.GetDatabase(whichserver,”NAMES.NSF”)
Set view=db.GetView(”Locations”)
Set doc=view.GetFirstDocument
While Not (doc Is Nothing)
Call doc.RemoveItem(”$SavedAddresses”)
Call doc.RemoveItem(”$SavedPorts”)
Call doc.RemoveItem(”$SavedServers”)
Call doc.save(True,True)
Set doc=view.GetNextDocument(doc)
Wend
Messagebox(”Removing Cached Addressed Completed”)
End Sub

Leave a Reply

Name

Mail (never published)

Website