tag:help.appveyor.com,2012-11-13:/discussions/problems/15323-service-fabric-cluster-cleanup-hangingAppVeyor: Discussion 2018-10-10T21:00:35Ztag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T10:31:38Z2018-07-26T10:31:38ZService Fabric Cluster Cleanup hanging<div><p>Can you add <strong>non-blocking</strong> RDP at <code>init</code> stage as described <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">here</a>, and connect to build worker when it stuck next time? Maybe you will see the reason it stuck. Let us know what you found.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T10:44:16Z2018-07-26T10:44:18ZService Fabric Cluster Cleanup hanging<div><p>I did that and apparently the problem is that the Service Fabric Host Service is not starting. I tried to start it manually and it didnt start.</p></div>Mauricio Guevara Souzatag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T10:47:39Z2018-07-26T10:47:39ZService Fabric Cluster Cleanup hanging<div><p>Did you check Event viewer? It is not very probable that service does not start without any errors or warnings generated.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T10:51:28Z2018-07-26T10:51:29ZService Fabric Cluster Cleanup hanging<div><p>Just to clarify what i did is to remove the lines that invoke Service Fabric scripts from appveyor.yml and i RD the agent and tried to run the CleanCluster.ps1 script from a PS window inside the agent with the same result. Then I checked the services and i notices that the Service Fabric Host Service status was "starting" but it got stuck there. Then i cancel this build and fired another one and RD the agent and this time i just went to the services and manually tried to start the Service Fabric Host Service but it didn't start.</p></div>Mauricio Guevara Souzatag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T11:11:57Z2018-07-26T11:11:57ZService Fabric Cluster Cleanup hanging<div><p>OK, we need a repro. Can you create a repro in a public repository? Or if this can be reproduced by simple coping your <code>appveyor.yml</code>, please share it.</p>
<p>Also please send us a links to the last good and first bad builds.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T11:17:30Z2018-07-26T11:17:31ZService Fabric Cluster Cleanup hanging<div><p>It can be reproduced by just adding this to the appveyor.yml</p>
<p>image: Visual Studio 2017 init:<br>
- ps: Write-Host "Setting up local cluster"<br>
- ps: ."$ENV:ProgramFiles\Microsoft SDKs\Service Fabric\ClusterSetup\CleanCluster.ps1" - ps: ."$ENV:ProgramFiles\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" - ps: Write-Host "Validating local cluster" - ps: Connect-ServiceFabricCluster localhost:19000</p>
<p>It will get stuck in the CleanCluster.ps1 script. This was working like a month ago and i tested and it works in the "Visual Studio 2017 Preview" image.</p></div>Mauricio Guevara Souzatag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T11:32:50Z2018-07-26T11:32:51ZService Fabric Cluster Cleanup hanging<div><p>Last Good build:<br>
<a href="https://ci.appveyor.com/project/Configit/clm-cloud-service-manager/build/1.0.106">https://ci.appveyor.com/project/Configit/clm-cloud-service-manager/...</a></p>
<p>First Bad Build (Stopped to dont block the agent)<br>
<a href="https://ci.appveyor.com/project/Configit/clm-cloud-service-manager/build/1.0.107">https://ci.appveyor.com/project/Configit/clm-cloud-service-manager/...</a></p></div>Mauricio Guevara Souzatag:help.appveyor.com,2012-11-13:Comment/457770002018-07-26T17:13:04Z2018-07-26T17:13:04ZService Fabric Cluster Cleanup hanging<div><p>This indeed appears to be the problem. But you are not using <code>Visual Studio 2017</code>, you are using <code>Previous Visual Studio 2017</code>. Can you please clarify why?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-27T07:27:50Z2018-07-27T07:27:50ZService Fabric Cluster Cleanup hanging<div><p>I started to use Previous Visual Studio 2017 because i start having this problem with Visual Studio 2017 but now i have the same problem with Previous Visual Studio 2017 and with Visual Studio 2017. Now i noticed that only Visual Studio 2017 Preview will start the local service fabric cluster correctly. Here is a link of a build using Visual Studio 2017 image that has the same problem.</p>
<p><a href="https://ci.appveyor.com/project/Configit/resource-repository/build/1.0.1626">https://ci.appveyor.com/project/Configit/resource-repository/build/...</a></p></div>Mauricio Guevaratag:help.appveyor.com,2012-11-13:Comment/457770002018-07-27T09:37:52Z2018-07-27T09:37:52ZService Fabric Cluster Cleanup hanging<div><p>Oh, please do not do that silently next time. If you found this kind of issue, please report and we will fix it before or as part of next major image update (when current image becomes previous and old previous is gone).</p>
<p>I filed <a href="https://github.com/appveyor/ci/issues/2543">this</a> issue to track it. Do you need some temporary workaround or you are unblocked with <code>Visual Studio 2017 Preview</code>?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-27T10:59:50Z2018-07-27T10:59:54ZService Fabric Cluster Cleanup hanging<div><p>Hello:</p>
<p>I would need a temporary workaround if possible.</p></div>Mauricio Guevaratag:help.appveyor.com,2012-11-13:Comment/457770002018-07-28T13:06:36Z2018-07-28T13:06:36ZService Fabric Cluster Cleanup hanging<div><p>For workaround, add the following in the beginning of <code>init</code> before your cluster setup commands:</p>
<pre>
<code>- '"C:\Program Files\Docker\Docker\Docker for Windows Installer.exe" uninstall'
- ps: $fabricSdk = Get-WmiObject Win32_Product | ? {$_.Name -match "Microsoft Azure Service Fabric SDK"}; $fabricSdk.Reinstall(10)</code>
</pre>
<p>Let us know if this works for you.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-07-30T08:17:53Z2018-07-30T08:17:55ZService Fabric Cluster Cleanup hanging<div><p>Thanks for the workaround. Is there an approximate date to have this fixed in the Visual Studio 2017 image so i can remove the workaround?</p></div>Mauricio Guevaratag:help.appveyor.com,2012-11-13:Comment/457770002018-07-30T08:41:33Z2018-07-30T08:41:33ZService Fabric Cluster Cleanup hanging<div><p>It should not take longer than a month from now, probably less. Please subscribe to technical updates at <a href="https://ci.appveyor.com/profile">https://ci.appveyor.com/profile</a> to be notified when image update happens. Or watch <a href="https://github.com/appveyor/ci/issues/2543">this</a> issue.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457770002018-08-09T22:34:47Z2018-08-09T22:34:58ZService Fabric Cluster Cleanup hanging<div><p>Hi guys,</p>
<p>I've figured out a better, and faster workaround! Add the following line into <code>appveyor.yml</code>:</p>
<pre>
<code>install:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/fix-service-fabric-docker.ps1'))</code>
</pre>
<p>The script downloads Docker CE and puts its directory to <code>PATH</code> so Service Fabric could see "correct" <code>dockerd.exe</code> while starting.</p>
<p>Successful build run: <a href="https://ci.appveyor.com/project/appveyor-tests/service-fabric-docker">https://ci.appveyor.com/project/appveyor-tests/service-fabric-docker</a></p></div>Feodor Fitsner