Thursday, August 06, 2009

Difficulty with IIS and port binding

I was having a problem when trying to use the same server for the Exchange 2007 server with the client access role and Office Communications Server edge server role. I know that this is far from best practice, but when you work with small businesses, sometimes the functionality desired exceeds the number of servers the budget can support, especially when they just bought a brand new 64 bit server with a 16 gigabytes of ram which is clearly underutilized.

The problem was with binding port 443 for both Outlook Web Access and the Web Conferencing edge service. Even though I had configured IIS to use one IP address and the OCS edge to use another.

netstat -a showed port 443 listening on the IP that I had assigned in IIS, but when I tried to start the OCS Web Conferencing edge, it would fail, with the event log indicating that it couldn't bind to the port because it was in use. netstat -a also showed 0.0.0.0:443 and [::]:443, meaning that it was still listening on all assigned IP addresses, including IPV6 even though it wasn't enabled. I verified that the OWA site was the problem by stopping the default web site, and starting the OCS Web Conferencing edge service, which worked.

The solution presented itself through the netsh command, which has saved me several times. From a command prompt:

C:\netsh
netsh>http
netsh http>sho iplisten (blank by default)
netsh http>add iplisten ipaddress=xxx.xxx.xxx.xxx
netsh http>sho iplisten (shows the OWA IP address)
netsh http>exit

I verified that it worked by typing netstat -a, and it wasn't listening on 0.0.0.0:443 or [::]:443 anymore. Even more convincing was that with IIS and the default website running, I was able to start the OCS Web Conferencing edge service.

No comments: