msdeploy ERROR_CONNECTION_TERMINATED
Hi,
When i run msdeploy from teamcity i get ERROR_CONNECTION_TERMINATED. But if i run it from cmd on the same server (where teamcity is running) it goes through. ERROR_CONNECTION_TERMINATED occours only if site is up to date, if its doing stuff then there is no error.
I'm not running fiddler that could be causing this.
Here is command:
msdeploy -verb:sync -source:contentPath="%teamcity.build.checkoutDir%\publish\web" -dest:contentPath="%DeployPath%\web",ComputerName="%MSDeploy.ComputerName%",Username="%MSDeploy.Username%",Password="%MSDeploy.Password%",AuthType="Basic" -useCheckSum -skip:Directory="\\web\\uploads$" -skip:File="\\app_offline.htm$" -allowUntrusted
Here is output of command:
[10:36:13][Step 9/9] PowerShell Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[10:36:13][Step 9/9] Working directory: C:\TeamCity\buildAgent\work\81d93b891723185
[10:36:13][Step 9/9] Command: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[10:36:13][Step 9/9] PowerShell arguments: -NonInteractive, -ExecutionPolicy, ByPass, -File, C:\TeamCity\buildAgent\temp\buildTmp\powershell14194473254992903104.ps1
[10:36:19][Step 9/9] Info: Using ID '2e943b2a-2e47-42aa-819d-979df013cc50' for connections to the remote server.
[10:36:22][Step 9/9] Info: Object filePath (C:\inetpub\dev.proplatform\web\app_offline.htm) skipped due to skip directive 'CommandLineSkipDirective 2'.
[10:36:32][Step 9/9] Info: Object filePath (C:\inetpub\dev.proplatform\web\ePeroWs\app_offline.htm) skipped due to skip directive 'CommandLineSkipDirective 2'.
[10:36:32][Step 9/9] Info: Object filePath (C:\inetpub\dev.proplatform\web\ipsWebApi\app_offline.htm) skipped due to skip directive 'CommandLineSkipDirective 2'.
[10:36:42][Step 9/9] Info: Object dirPath (C:\inetpub\dev.proplatform\web\uploads) skipped due to skip directive 'CommandLineSkipDirective 1'.
[10:36:42][Step 9/9] Info: Using ID '54b3890e-330d-4d09-a7f7-e1026f63b338' for connections to the remote server.
[10:37:13][Step 9/9] Error Code: ERROR_CONNECTION_TERMINATED
[10:37:13][Step 9/9] More Information: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
[10:37:13][Step 9/9] Error: Unexpected end of file has occurred. The following elements are not closed: results. Line 1, position 550.
[10:37:13][Step 9/9] Error count: 1.
Please sign in to leave a comment.
And TeamCity is updated, version 2022.04.3 (build 108706).
I found what the problem was. It was Windows real time protection which was cousing this problem. So i added process msdeploy.exe as an exception and now it works fine. I hope this helps somebody in the future. I spent days trying to figure it out what the problem was.