When performing large task with Reboots and Scripts - you might randomly encounter an issue where task after the Reboot task might fail with the host respond timeout error.
Task Fails with Connection attempt failure.
In the Agent log we can see following error message:
"CTCPSocketIPC::Connect Failed to connect A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
In the console following error would appear for the Task Status:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
Following with status code 10060.
Currently under investigation.
Possibly timing issue, when server is trying to re-use the socket, which was not yet fully closed.
It's recommended to apply following TCP tweak on the Deployment Server machine to improve connectivity stability.
It can be done either manually - or by creating Run Script task - and execute it on Deployment server.
Contents of the task:
REM Tweak the TCP Parameters on Deployment Server.
C:\Windows\System32\REG.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /V TcpTimedWaitDelay /t REG_DWORD /d 30 /f
C:\Windows\System32\REG.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /V MaxUserPort /t REG_DWORD /d 65534 /f
C:\Windows\System32\REG.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v TcpMaxDataRetransmissions /t REG_DWORD /d 10 /f
Microsoft KB Articles used:
http://technet.microsoft.com/en-us/library/cc938196.aspx (for MaxUserPort) - Default Value is 5000 - increasing this value to maximum would allow Server to use more sockets. Possibly to enhance is to lower number than 64k, and set it to 20k for example.
http://technet.microsoft.com/en-us/library/cc938217.aspx (for TcpTimedWaitDelay) - Default value is 240 seconds, by decreasing it - we allow server to close connection faster, so sockets would be available to be re-used. Can be tweaked from 240 to 60 seconds. Depends on the job lenght and environment.
http://technet.microsoft.com/en-us/library/cc938210.aspx (for TcpMaxDataRetransmissions) - Default value is 5. We slightly increase it to allow server to verify connection for longer period.
Running on Windows 2003 or Windows 2008