SBS 2008: CTIW fails to complete successfully.

[Today’s post comes to us courtesy Moloy Tandon.]

Recently we have seen few cases where the Connect To Internet Wizard (CTIW) may fail to complete successfully.

When you run the CTIW it may fail to detect the router and you may be presented with the following screen to type the IP of the router and server.

CTIW1

When you click next after typing the IP details, the wizard may fail with the following error. Additionally, you would notice that the wizard removes the Default Gateway entry from the NIC properties and may also change the IP address of the server.

CTIW2

[Internet connection is incomplete - Windows SBS has encountered an unknown error. For more information, contact Microsoft Product Support.]

If you analyze the CTIW.log file, you may see something similar

[9744] 090107.141539.6875: CoreNet: netsh: interface ip set address 10 static address=192.168.0.1 mask=255.255.255.0

[9744] 090107.141540.8107: CoreNet: WSA ERR# 10022 when binding a socket to 192.168.0.1 to check for address availability

[9744] 090107.141540.8107: CoreNet: Exception System.Net.Sockets.SocketException:

[9744] 090107.141540.8263: Exception:

---------------------------------------

An exception of type 'Type: System.Net.Sockets.SocketException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has occurred.

Timestamp: 01/07/2009 14:15:40

Message: An invalid argument was supplied

Stack:    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

                   at System.Net.Sockets.Socket.Bind(EndPoint localEP)

                   at Microsoft.WindowsServerSolutions.CoreNetworking.CNetNic.NicIpInfo.WaitForNewIp4sToPropagate(Ip4Address32[] newIp4Addresses, Int32 deadlineSeconds)

[9744] 090107.141540.8263: CoreNet: Exception Microsoft.WindowsServerSolutions.CoreNetworking.CNetException:

HR: 0

[9744] 090107.141540.8263: Exception:

---------------------------------------

An exception of type 'Type: Microsoft.WindowsServerSolutions.CoreNetworking.CNetException, CNetManagement, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' has occurred.

Timestamp: 01/07/2009 14:15:40

Message: Couldn't bind a socket to the new address after several retries.

Stack:    at Microsoft.WindowsServerSolutions.CoreNetworking.CNetNic.NicIpInfo.EnableStatic(AddressAndMask[] Ip4AddressesAndMasks, Int32 deadlineSeconds)

                   at Microsoft.WindowsServerSolutions.CoreNetworking.CNetNic.NicIpInfo.EnableStatic(IPAddress[] IpAddresses, IPAddress[] IpNetMasks, IPAddress[] Gateways, UInt16[] GatewayMetrics)

                   at Microsoft.WindowsServerSolutions.CoreNetworking.NetworkDiscovery.SaveLocalNicAndRouter(CNetNic nic, CRouter router, Boolean findBetterIP)

[9200] 090107.141540.8263: CoreNet: Exception caught in network detection

[9200] 090107.141540.8263: CoreNet: Exception Microsoft.WindowsServerSolutions.CoreNetworking.CNetException:

HR: 0

[9200] 090107.141540.8419: Exception:

---------------------------------------

An exception of type 'Type: Microsoft.WindowsServerSolutions.CoreNetworking.CNetException, CNetManagement, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' has occurred.

Timestamp: 01/07/2009 14:15:40

Message: Couldn't bind a socket to the new address after several retries.

Stack:    at Microsoft.WindowsServerSolutions.CoreNetworking.CNetNic.NicIpInfo.EnableStatic(AddressAndMask[] Ip4AddressesAndMasks, Int32 deadlineSeconds)

                   at Microsoft.WindowsServerSolutions.CoreNetworking.CNetNic.NicIpInfo.EnableStatic(IPAddress[] IpAddresses, IPAddress[] IpNetMasks, IPAddress[] Gateways, UInt16[] GatewayMetrics)

                   at Microsoft.WindowsServerSolutions.CoreNetworking.NetworkDiscovery.SaveLocalNicAndRouter(CNetNic nic, CRouter router, Boolean findBetterIP)

                   at Microsoft.WindowsServerSolutions.Networking.Wizards.CTIWizard.DetectNetworkPagePresenter.RouterWasFound(BackgroundWorker worker, NetworkDiscovery nd, CNetNic nic, CRouter theRouter, Boolean useCurrentSetting)

                   at Microsoft.WindowsServerSolutions.Networking.Wizards.CTIWizard.DetectNetworkPagePresenter.detection_DoWork(Object sender, DoWorkEventArgs e)

                   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

 

Using Time Travel Tracing (TTT) we discovered a third-party DLL associated with an antivirus software was blocking our request of binding the socket to the IP address.

After we uninstalled the third-party antivirus software, the CTIW ran and completed successfully.