Tuesday, August 21, 2007

Remote Desktop via Blackberry

I am a big fan of remote desktop and use it for all sorts of things with notable examples being;
  • Starting large downloads (eg: Domino 8) from Home to my work PC
  • Running MS Project on our Presentations Equipment even though it isn't loaded there.
  • Getting better speed in Lotus Notes when I'm using the system remotely.
It was only a matter of time before I tried to get it working on the BlackBerry.

I investigated a couple of companies but they weren't very helpful and I had problems getting their software to work. I specifically wanted Remote Desktop, not VNC - as remote desktop is built-in to Windows.

Eventually I found a company called Idokorro and their software worked first time.

What's great about this software is that given that our Blackberry Enterprise Server is inside our Corporate Firewall I can access my desktop PC without having to use VPN and without weakening our firewall.

One note: On the standard BlackBerry Enterprise Server settings I got the following message;

Error message: "You have reached the maximum amount of data which can be transferred by this BlackBerry device over a single connection. If you are using a BES please contact your BES administrator to increase this limit."

The way around this message (as I discovered from the BlackBerry Forums, was to;
  1. Go the Blackberry Enterprise Server
  2. Select the MDS Connection Service (in Explorer View)
  3. Click Edit Properties (top right hand corner)
  4. Look for a setting marked "Maximum KB/Connection" in the General section
  5. Change this to 1024.

Wednesday, August 15, 2007

Figuring out the Server Name

A bit about our Off-site Server Project
The aim of this project was always to have an off-site server that was capable of providing us with alternative facilities in the event of a disaster. My employers were on Domino before I started working here (7 years ago) and many of our oldest databases are in relatively "untouched" form. One of the biggest challenges of our off-site server project was always going to be the detection and removal of server-name hard-coding.

Discovering all those server names was a tedious business which I won't go into here. This blog entry will provide you with one bit of code we used to replace a single-line server name. We used several different methods but this method is interesting in that it provides an alternative when the server is local.

Getting the Server Name itself
Generally, getting the server name in a late-domino server is quite easy. There's an @function (@ServerName) for it from R6 onwards, and prior to that it was accessible via @DBName. There are also script methods which I'll detail here. One problem can arise when you don't want the server to be local.

What you need for the Code Sample
The code sample will identify the current server name using LotusScript. If the current server name is local (ie: if we're running from a local replica) it will then use a keyworded value instead. This enables you to have a local replica for speed reasons but access a server for things that really need to. The keyword value is a document in a view called KRetrieval with the first column containing the keyword ServerName and the second column containing the name of the domino server to be used if the database is local. We use the amazingly handy evaluate function to retrieve that value.

A bit of code
Admittedly, this isn't the cleanest of code, but it does the job.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim docs As NotesDocumentCollection
Dim doc As NotesDocument

Set db = session.CurrentDatabase
Set docs = Source.Documents
Set doc = docs.GetFirstDocument()

Dim ServerName As New NotesName(db.Server)
Dim KeywordServerName As String
Dim EvaluateArray As Variant
Dim ServerToUse As String

EvaluateArray = Evaluate({@If(@IsError(@DbLookup("":"NoCache"; ""; "KRetrieval" ; "ServerName"; 2 )) ; "" ; @DbLookup("":"NoCache"; ""; "KRetrieval" ; "ServerName"; 2 ))})

KeywordServerName = EvaluateArray(0)

If Ucase$(Trim$(ServerNameText)) = "LOCAL" Then
Print "You are running this DB from a LOCAL Replica - will use Keyworded Server Name"
ServerNameText = ""
End If

If Trim$(ServerNameText) = "" Then
Print "Setting Server Name to Keyworded Server Name :" + KeywordServerName ServerNameText = KeywordServerName
End If

Tuesday, August 14, 2007

The Mysterious "Relay Host for messages leaving the Local Internet Domain" setting

We migrated our off-site server back on-site last Friday night and once again we were thrown by this setting. For this reason, I'll explain it a little.

The Symptoms
The most obvious symptoms of this value being incorrectly set are;
a. Mail routes internally happily.
b. Inbound internet mail is working fine
c. Outbound internet mail is not working
d. Other externally visible services generated by the server (eg: http) are visible on web.

Some of the Domino server console error messages you may see if this is wrongly configured include;
  • DNS Not Implemented
  • Messages about Relaying being Denied or Relay Hosts
  • No messages transferred to xxxxx via SMTP: SMTP Protocol Returned a Transient Error

Where is it?
The setting in question lives in the Server Configuration documents on the Router/SMTP and then Basics tabs. The actual name of the setting is: "Relay Host for messages leaving the Local Internet Domain".

What should it be set to?
This depends mightily on your configuration but if you're going through some sort of email passthru gateway, such as an anti-spam appliance, then it should be set to the IP address of that appliance. This is particularly true of hosted environments where the server itself may not be granted direct SMTP to the Internet rights on the firewall.

If your server is going directly to the internet, then this setting should be blank. We tried lots of values including to self-reference, but it took a leap to think of blanking it out entirely.

Saturday, August 04, 2007

A Blackberry Newbie

I wasn't terribly excited about the prospect of getting a Blackberry server especially at this technically "crowded" time of my life but now I'm fairly convinced about the technology.

Before I join the converted and start spouting the virtues of the blackberry system, I first want to go over some of the bad bits - chances are I'm not likely to look back at them.

The Bad Bits
The Telstra people who sold us the system told us that you could use any pc running the Lotus Notes Client - this is wrong... Beware: The Blackberry Enterprise Server is expensive, though not necessarily in terms of the Blackberry software.

In order to run Blackberry Enterprise Server (for Notes/Domino) you will need;

  • A reasonably powerful PC or Server, they recommended 4GHz but realistically it can be a little lower in spec.

  • Lotus Domino Enterprise server - yup - now that is a serious extra expense if you don't want it running on your production server

  • A fair amount of hard drive space. The C: Drive on our domino server is tight because the Windows updates have resulted in Win2003 server bloating to over 3 times it's original size - even if you install Blackberry on a different drive letter, it still takes up a lot of system drive space with its DLLs

  • A Decent internet connection - most systems will already have this.

  • Access to unblock ports on your firewall - there's a bit of configuration involved.

  • A good backup/DRP strategy - because putting Blackberry on our main domino server pretty much invalidated ours (ie: the multi-platform ease of moving Domino from one piece of hardware to another disappears once you start dumping DLLs everywhere and modifying registry settings.

I must say though, once the blackberry server is setup and working, the devices work really well. I've been accessing my Notes Email and Notes calendar via the device.

I've also installed Gmail and Google Talk on the device and am currently looking at a remote desktop product. I'll let you know as more happens.