Whenever load balancing and/or redundancy is needed in Office Communications Server (OCS) 2007, a Hardware Load Balancer needs to be utilized (Windows NLB not supported). This is fine, but you may run into an issue where you cannot run the ABServer.exe (C:\Program Files\Microsoft Office Communications Server 2007\Server\Core\ABServer.exe). This issue is where the ABServer.exe thinks the RTCSRV service is not running.
The reason for this is the ABSServer.exe utilizes port 135 against the Pool Name. Using DNAT with a Load Balancer will not allow this traffic to go through. Becuase of this, ABServer thinks the RTCSRV service is not running.
This can easily be temporarily fixed by going into the HOSTS file (C:\WINDOWS\system32\drivers\etc\hosts) and modifying your Poolname to point to the IP Address of your Front End Server. For example, our Pool’s Virtual IP Address on the Hardware Load Balancer is 10.10.135.220 and the Front End Server’s NIC IP Address is 10.10.135.42. So what we must do is temporarily point pool.domain.com to 10.10.135.42 in our hosts file.
We can see that now the ABSServer -syncnow command successfully runs.
So how can we automate this all so we don’t have to bother going through all these steps? Well, here’s a VBScript file created by one of my talented coworkers Mark Dobberstein that’ll change your hosts file, run ABServer -RegenUR and ABServer -Syncnow and set the hosts file back.
'On Error Resume Next set objShell = CreateObject("WScript.Shell") Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set oFSO = CreateObject("Scripting.FileSystemObject") sHostFile = objShell.ExpandEnvironmentStrings("%systemroot%\system32\drivers\etc\hosts") oFSO.CopyFile sHostFile, sHostFile & ".bak", TRUE Set filein = oFSO.OpenTextFile(sHostFile,ForAppending) filein.Writeline "10.10.135.42 ocspool.domain.com" filein.close Set filein = Nothing objShell.Run """C:\Program Files\Microsoft Office Communications Server 2007\Server\Core\ABServer.exe"" -regenur", 1, TRUE objShell.Run """C:\Program Files\Microsoft Office Communications Server 2007\Server\Core\ABServer.exe"" –syncnow", 1, TRUE 'objShell.Run "Notepad.exe", 1, TRUE oFSO.CopyFile sHostFile, sHostFile & ".bak2", TRUE oFSO.CopyFile sHostFile & ".bak" , sHostFile, TRUE oFSO.DeleteFile sHostFile & ".bak"
Make sure to change the IP Address and Poolname within the script. The IP Address Listed should be the IP Address of the NIC on the Front End Server.